Leaked source code of windows server 2003
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.

152 lines
4.4 KiB

  1. #ifdef ARRAYSIZE
  2. #undef ARRAYSIZE
  3. #endif
  4. #ifdef SIZEOF
  5. #undef SIZEOF
  6. #endif
  7. #define CCH_MAX_STRING 256
  8. #define CCH_NONE 20 /* ARRAYSIZE( "(None)" ), big enough for German */
  9. #define CMSEC_COVER_WINDOW_TIMEOUT (15 * 1000) // 15 second timeout
  10. #define ID_CVRWND_TIMER 0x96F251CC // somewhat uniq id
  11. //
  12. // Extra bits for the TraceMsg function
  13. //
  14. #define TF_DUMP_DEVMODE 0x20000000
  15. #define TF_DUMP_CSETTINGS 0x40000000
  16. #define TF_DUMP_DEVMODELIST 0x80000000
  17. #define TF_OC 0x01000000
  18. #define TF_SETUP 0x02000000
  19. // Maximum number of pages we will put in the PropertySheets
  20. #define MAX_PAGES 24
  21. // information about the monitor bitmap
  22. // x, y, dx, dy define the size of the "screen" part of the bitmap
  23. // the RGB is the color of the screen's desktop
  24. // these numbers are VERY hard-coded to a monitor bitmap
  25. #define MON_X 16
  26. #define MON_Y 17
  27. #define MON_DX 152
  28. #define MON_DY 112
  29. #define MON_W 184
  30. #define MON_H 170
  31. #define MON_RGB RGB(0, 128, 128)
  32. #define MON_TRAY 8
  33. #define CDPI_NORMAL 96 // Arbitrarily, 96dpi is "Normal"
  34. BOOL DeskInitCpl(void);
  35. void DeskShowPropSheet( HINSTANCE hInst, HWND hwndParent, LPCTSTR szCmdLine );
  36. BOOL CALLBACK _AddDisplayPropSheetPage(HPROPSHEETPAGE hpage, LPARAM lParam);
  37. INT_PTR APIENTRY BackgroundDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  38. INT_PTR APIENTRY ScreenSaverDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  39. INT_PTR APIENTRY AppearanceDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  40. INT_PTR APIENTRY AdvancedAppearanceDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  41. INT_PTR CALLBACK GeneralPageProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  42. INT_PTR CALLBACK MultiMonitorDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  43. BOOL GetAdvMonitorPropPage(LPVOID lpv, LPFNADDPROPSHEETPAGE lpfnAdd, LPARAM lparam);
  44. BOOL GetAdvMonitorPropPageParam(LPVOID lpv, LPFNADDPROPSHEETPAGE lpfnAdd, LPARAM lparam, LPARAM lparamPage);
  45. INT_PTR APIENTRY DeskDefPropPageProc( HWND hDlg, UINT message, UINT wParam, LONG lParam);
  46. // logging API
  47. #define DeskOpenLog() SetupOpenLog(FALSE)
  48. #define DeskCloseLog() SetupCloseLog()
  49. BOOL
  50. CDECL
  51. DeskLogError(
  52. LogSeverity Severity,
  53. UINT MsgId,
  54. ...
  55. ) ;
  56. // fixreg.c
  57. void FixupRegistryHandlers(void);
  58. BOOL GetDisplayKey(int i, LPTSTR szKey, DWORD cb);
  59. void NukeDisplaySettings(void);
  60. // background previewer includes
  61. #define BP_NEWPAT 0x01 // pattern changed
  62. #define BP_NEWWALL 0x02 // wallpaper changed
  63. #define BP_TILE 0x04 // tile the wallpaper (center otherwise)
  64. #define BP_REINIT 0x08 // reload the image (system colors changed)
  65. #define WM_SETBACKINFO (WM_USER + 1)
  66. #define BACKPREV_CLASS TEXT("BackgroundPreview")
  67. BOOL FAR PASCAL RegisterLookPreviewClass(HINSTANCE hInst);
  68. HBITMAP FAR LoadMonitorBitmap( BOOL bFillDesktop );
  69. //#define Assert(p) /* nothing */
  70. #define ARRAYSIZE( a ) (sizeof(a) / sizeof(a[0]))
  71. #define SIZEOF( a ) sizeof(a)
  72. //
  73. // CreateCoverWindow
  74. //
  75. // creates a window which obscures the display
  76. // flags:
  77. // 0 means erase to black
  78. // COVER_NOPAINT means "freeze" the display
  79. //
  80. // just post it a WM_CLOSE when you're done with it
  81. //
  82. #define COVER_NOPAINT (0x1)
  83. //
  84. HWND FAR PASCAL CreateCoverWindow( DWORD flags );
  85. void DestroyCoverWindow(HWND hwndCover);
  86. int FmtMessageBox(HWND hwnd, UINT fuStyle, DWORD dwTitleID, DWORD dwTextID);
  87. typedef struct tagREPLACEPAGE_LPARAM
  88. {
  89. PROPSHEETHEADER FAR * ppsh;
  90. IThemeUIPages * ptuiPages;
  91. } REPLACEPAGE_LPARAM;
  92. //
  93. // Macro to replace MAKEPOINT() since points now have 32 bit x & y
  94. //
  95. #define LPARAM2POINT( lp, ppt ) \
  96. ((ppt)->x = (int)(short)LOWORD(lp), (ppt)->y = (int)(short)HIWORD(lp))
  97. //
  98. // Globals
  99. //
  100. extern HINSTANCE hInstance;
  101. extern TCHAR gszDeskCaption[CCH_MAX_STRING];
  102. extern TCHAR g_szNULL[];
  103. extern TCHAR g_szNone[CCH_NONE];
  104. extern TCHAR g_szControlIni[];
  105. extern TCHAR g_szPatterns[];
  106. extern TCHAR g_szCurPattern[]; // name of currently selected pattern
  107. extern TCHAR g_szCurWallpaper[]; // name of currently selected wallpaper
  108. extern BOOL g_bValidBitmap; // whether or not wallpaper is valid
  109. extern TCHAR g_szBoot[];
  110. extern TCHAR g_szSystemIni[];
  111. extern TCHAR g_szWindows[];
  112. extern HDC g_hdcMem;
  113. extern HBITMAP g_hbmDefault;