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.

167 lines
5.2 KiB

  1. /*---------------------------------------------------------------------------*/
  2. /* PrivComd.h : UI dialog header */
  3. /* */
  4. /* Copyright (c) Microsoft Corporation, 1991- */
  5. /*---------------------------------------------------------------------------*/
  6. #include "commdlg.h"
  7. #include "dlgs.h"
  8. #include "_xlib.h"
  9. #include "isz.h"
  10. #include "cderr.h"
  11. #ifdef FILEOPENDIALOGS
  12. #include "fileopen.h"
  13. #endif
  14. #define CODESEG _based(_segname("_CODE"))
  15. #define MAXFILENAMELEN 12
  16. #define SEM_NOERROR 0x8003
  17. /*---------------------------------------------------------------------------
  18. * DOS Disk Transfer Area Structure -
  19. *--------------------------------------------------------------------------*/
  20. typedef struct tagDOSDTA
  21. {
  22. BYTE Reserved[21]; /* 21 */
  23. BYTE Attrib; /* 22 */
  24. WORD Time; /* 24 */
  25. WORD Date; /* 26 */
  26. DWORD Length; /* 30 */
  27. char szName[MAXFILENAMELEN+1]; /* 43 */
  28. char buffer[5]; /* 48 */
  29. } DOSDTA;
  30. typedef DOSDTA *PDOSDTA;
  31. typedef DOSDTA FAR *LPDOSDTA;
  32. /* Avoids sharing violations. Defined 21 Jan 1991 clarkc */
  33. #define SHARE_EXIST (OF_EXIST | OF_SHARE_DENY_NONE)
  34. /*---------------------------------------------------------------------------
  35. * DOS Extended File Control Block Structure -
  36. *--------------------------------------------------------------------------*/
  37. typedef struct tagEFCB
  38. {
  39. BYTE Flag;
  40. BYTE Reserve1[5];
  41. BYTE Attrib;
  42. BYTE Drive;
  43. BYTE Filename[11];
  44. BYTE Reserve2[5];
  45. BYTE NewName[11];
  46. BYTE Reserve3[9];
  47. } EFCB;
  48. #define ATTR_VOLUME 0x0008
  49. /*----Globals---------------------------------------------------------------*/
  50. extern HINSTANCE hinsCur; /* Instance handle of Library */
  51. extern DWORD dwExtError; /* Extended error code */
  52. extern short cyCaption, cyBorder, cyVScroll;
  53. extern short cxVScroll, cxBorder, cxSize;
  54. extern char szNull[];
  55. extern char szStar[];
  56. extern char szStarDotStar[];
  57. extern BOOL bMouse; /* System has a mouse */
  58. extern BOOL bCursorLock;
  59. extern BOOL bWLO; /* Running with WLO */
  60. extern BOOL bDBCS; /* Running Double-Byte Character Support? */
  61. extern WORD wWinVer; /* Windows version */
  62. extern WORD wDOSVer; /* DOS version */
  63. extern UINT msgHELP; /* Initialized via RegisterWindowMessage */
  64. extern DOSDTA DTAGlobal;
  65. extern EFCB VolumeEFCB;
  66. /*----Functions--------------------------------------------------------------*/
  67. LONG FAR RgbInvertRgb(LONG);
  68. HBITMAP FAR HbmpLoadBmp(WORD);
  69. void FAR TermFind(void);
  70. void FAR TermColor(void);
  71. void FAR TermFont(void);
  72. void FAR TermFile(void);
  73. void FAR TermPrint(void);
  74. /* Common */
  75. VOID FAR PASCAL HourGlass(BOOL);
  76. HBITMAP FAR PASCAL LoadAlterBitmap(int, DWORD, DWORD);
  77. VOID FAR PASCAL MySetObjectOwner(HANDLE);
  78. VOID FAR PASCAL RepeatMove(LPSTR, LPSTR, WORD);
  79. /* File Open/Save */
  80. #ifdef FILEOPENDIALOGS
  81. BOOL FAR PASCAL SetCurrentDrive(short);
  82. short FAR PASCAL GetCurrentDrive(VOID);
  83. BOOL GetCurDirectory(PSTR);
  84. BOOL FAR PASCAL mygetcwd(LPSTR, int);
  85. BOOL FAR PASCAL mychdir(LPSTR);
  86. BOOL FAR PASCAL FindFirst4E(LPSTR, WORD);
  87. BOOL FAR PASCAL FindNext4F(VOID);
  88. VOID FAR PASCAL MySetDTAAddress(LPDOSDTA);
  89. VOID FAR PASCAL ResetDTAAddress(VOID);
  90. BOOL UpdateListBoxes(HWND, PMYOFN, LPSTR, WORD);
  91. #endif
  92. /* Color */
  93. #ifdef COLORDLG
  94. #include "color.h"
  95. /* Color */
  96. extern HDC hDCFastBlt;
  97. extern DWORD rgbClient;
  98. extern WORD H,S,L;
  99. extern HBITMAP hRainbowBitmap;
  100. extern BOOL bMouseCapture;
  101. extern WNDPROC lpprocStatic;
  102. extern short nDriverColors;
  103. extern char szOEMBIN[];
  104. extern short nBoxHeight, nBoxWidth;
  105. extern HWND hSave;
  106. extern FARPROC qfnColorDlg;
  107. BOOL FAR PASCAL ColorDlgProc(HWND, WORD, WORD, LONG);
  108. LONG FAR PASCAL WantArrows(HWND, WORD, WPARAM, LPARAM);
  109. void RainbowPaint(PCOLORINFO, HDC, LPRECT);
  110. VOID NearestSolid(PCOLORINFO);
  111. DWORD HLStoRGB(WORD, WORD, WORD);
  112. VOID RGBtoHLS(DWORD);
  113. VOID HLStoHLSPos(short, PCOLORINFO);
  114. VOID SetRGBEdit(short, PCOLORINFO);
  115. VOID SetHLSEdit(short, PCOLORINFO);
  116. short RGBEditChange(short, PCOLORINFO);
  117. VOID ChangeColorSettings(PCOLORINFO);
  118. VOID CrossHairPaint(HDC, short, short, PCOLORINFO);
  119. void EraseCrossHair(HDC, PCOLORINFO);
  120. VOID LumArrowPaint(HDC, short, PCOLORINFO);
  121. VOID EraseLumArrow(HDC, PCOLORINFO);
  122. VOID HLSPostoHLS(short, PCOLORINFO);
  123. WORD InitColor(HWND, WORD, LPCHOOSECOLOR);
  124. BOOL InitRainbow(PCOLORINFO);
  125. BOOL InitScreenCoords(HWND, PCOLORINFO);
  126. VOID ColorPaint(HWND, PCOLORINFO, HDC, LPRECT);
  127. VOID ChangeBoxSelection(PCOLORINFO, short);
  128. VOID ChangeBoxFocus(PCOLORINFO, short);
  129. VOID PaintBox(PCOLORINFO, HDC, short);
  130. BOOL ColorKeyDown(WORD, int FAR *, PCOLORINFO);
  131. BOOL BoxDrawItem(LPDIS);
  132. VOID SetupRainbowCapture(PCOLORINFO);
  133. void PaintRainbow(HDC, LPRECT, PCOLORINFO);
  134. #endif
  135. /* Dlgs.c */
  136. int FAR PASCAL LibMain(HANDLE, WORD, WORD, LPSTR);
  137. int FAR PASCAL WEP(int);
  138. LONG FAR RgbInvertRgb(LONG);