home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / gdi / setdisp / setdisp.h < prev    next >
C/C++ Source or Header  |  1996-04-29  |  3KB  |  84 lines

  1. /**************************************************************\
  2. *                                                              * 
  3. *   Header file for SetDisp.c                                 * 
  4. *                                                              *
  5. \**************************************************************/
  6. #define STRICT
  7.  
  8. #define _INC_OLE
  9. #include <windows.h>
  10. #undef  _INC_OLE
  11.  
  12.  
  13. /**************************************************************\
  14. *                                                              * 
  15. *   Misc contants to control app behaviour                     *
  16. *                                                              * 
  17. \**************************************************************/
  18. #define MYWM_NOTIFYICON        (WM_APP+100)
  19. #define VERIFY_RESCHANGE  1
  20.  
  21. //Milliseconds  -- set to 10 seconds
  22. #define VERIFY_TIMEOUT         10000
  23.  
  24. #define MAX_MODES              40
  25. #define MIN_FREQUENCY          60
  26. #define MIN_WIDTH              400
  27.  
  28. /**************************************************************\
  29. *                                                              * 
  30. *   Global to everybody...                                     *
  31. *                                                              * 
  32. \**************************************************************/
  33. HINSTANCE g_hinst       = NULL;
  34.  
  35. PDEVMODE  gpDevModes    = NULL;
  36. PDEVMODE  gpCurrentMode = NULL;
  37.  
  38. HANDLE    ghVerifyDlg   = NULL;
  39.  
  40. INT       gnModes       = -1;
  41. UINT      gnCurrentMode =  0;  //Default to the first until 
  42.                                //we determine which it really is
  43.  
  44.  
  45. /**************************************************************\
  46. *                                                              * 
  47. *  Function Prototypes                                         *
  48. *                                                              * 
  49. \**************************************************************/
  50. BOOL CALLBACK SetDispDlgProc (HWND hDlg, UINT uMsg,
  51.                                WPARAM wParam, LPARAM lParam);
  52.  
  53. VOID CALLBACK VerifyTimerProc(HWND hwnd, UINT uMsg, 
  54.                               UINT idEvent,DWORD dwTime);
  55.  
  56. BOOL CALLBACK VerifyDlgProc (HWND hDlg, UINT uMsg, 
  57.                              WPARAM wParam, LPARAM lParam);
  58.  
  59. BOOL APIENTRY About (HWND hDlg, UINT message,
  60.                      UINT wParam, LONG lParam);
  61.  
  62. VOID APIENTRY HandlePopupMenu (HWND   hwnd, POINT point);
  63.  
  64.  
  65. BOOL SetResolutionMenu (HWND hwnd);
  66. BOOL ChangeResolution (UINT nNewMode, HWND hwnd);
  67.  
  68. BOOL GetDevModes (HWND hWnd);
  69.  
  70. int CompareDevModes (DEVMODE *leftDM, DEVMODE *rightDM);
  71.  
  72.  
  73. BOOL TrayMessage (HWND hDlg, DWORD dwMessage, UINT uID,
  74.                   HICON hIcon, PSTR pszTip );
  75.  
  76. void NotifyAdd (HWND hDlg, UINT uIndex);
  77. void NotifyDelete (HWND hDlg, UINT uIndex);
  78.  
  79. BOOL IsNT(void);
  80.  
  81.  
  82.  
  83.  
  84.