Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
2.8 KiB

  1. /***************************************************************************/
  2. /** Microsoft Windows **/
  3. /** Copyright(c) Microsoft Corp., 1991, 1992 **/
  4. /***************************************************************************/
  5. /****************************************************************************
  6. dlg.h
  7. Aug 92, JimH
  8. Dialog classes are declared here.
  9. CScoreDlg shows current score sheet
  10. CQuoteDlg quote dialog
  11. CWelcomeDlg welcome to hearts, do you want to be GameMeister?
  12. COptionsDlg set options
  13. ****************************************************************************/
  14. #ifndef DLG_INC
  15. #define DLG_INC
  16. typedef WORD (FAR PASCAL *BROWSEPROC)(HWND, LPCSTR, LPSTR, UINT, LONG);
  17. const int MAXHANDS = 12; // can display this many in score sheet
  18. const int MAXPLAYER = 4;
  19. const int UNKNOWN = -1; // third BOOL value
  20. class CScoreDlg : public CModalDialog
  21. {
  22. public:
  23. CScoreDlg(CWnd *pParent);
  24. CScoreDlg(CWnd *pParent, int s[MAXPLAYER], int id);
  25. BOOL IsGameOver() { return bGameOver; }
  26. void ResetScore() { nHandsPlayed = 0; bGameOver = FALSE; }
  27. void SetText();
  28. private:
  29. CStatic *text[MAXPLAYER];
  30. int m_myid;
  31. static int score[MAXPLAYER][MAXHANDS+1];
  32. static int nHandsPlayed;
  33. static BOOL bGameOver;
  34. virtual BOOL OnInitDialog();
  35. afx_msg void OnPaint();
  36. DECLARE_MESSAGE_MAP()
  37. };
  38. class CQuoteDlg : public CModalDialog
  39. {
  40. public:
  41. CQuoteDlg(CWnd *pParent);
  42. afx_msg void OnPaint();
  43. DECLARE_MESSAGE_MAP()
  44. };
  45. class CWelcomeDlg : public CModalDialog
  46. {
  47. public:
  48. CWelcomeDlg(CWnd *pParent);
  49. virtual BOOL OnInitDialog();
  50. virtual void OnOK();
  51. CString GetMyName() { return m_myname; }
  52. BOOL IsGameMeister() { return m_bGameMeister; }
  53. BOOL IsNetDdeActive();
  54. afx_msg void OnHelp();
  55. private:
  56. CString m_myname;
  57. BOOL m_bGameMeister;
  58. BOOL m_bNetDdeActive;
  59. DECLARE_MESSAGE_MAP()
  60. };
  61. class COptionsDlg : public CModalDialog
  62. {
  63. public:
  64. COptionsDlg(CWnd *pParent);
  65. virtual BOOL OnInitDialog();
  66. virtual void OnOK();
  67. private:
  68. BOOL IsAutoStart(BOOL bToggle = FALSE);
  69. BOOL m_bInitialState;
  70. BYTE m_buffer[200];
  71. };
  72. class CLocateDlg : public CModalDialog
  73. {
  74. public:
  75. CLocateDlg(CWnd *pParent);
  76. virtual BOOL OnInitDialog();
  77. virtual void OnOK();
  78. CString GetServer() { return m_server; }
  79. afx_msg void OnBrowse();
  80. afx_msg void OnHelp();
  81. private:
  82. CString m_server;
  83. HINSTANCE m_hmodNetDriver;
  84. DECLARE_MESSAGE_MAP()
  85. };
  86. #endif