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.

144 lines
4.1 KiB

  1. #include "windows.h"
  2. #include "pif.h"
  3. #include "pifhelp.h"
  4. extern char hextobyte(LPSTR);
  5. /* EQUATES for special virtual key values that are used a lot */
  6. #define ALTLPARAM (DWORD)((DWORD)(MapVirtualKey(VK_MENU,0)) << 16L)
  7. #define CTRLLPARAM (DWORD)((DWORD)(MapVirtualKey(VK_CONTROL,0)) << 16L)
  8. #define SHIFTLPARAM (DWORD)((DWORD)(MapVirtualKey(VK_SHIFT,0)) << 16L)
  9. /* Special private messages for PIFEDIT */
  10. #define WM_PRIVGETSIZE WM_USER+20
  11. #define WM_PRIVCLOSEOK WM_USER+21
  12. #define WM_PRIVCLOSECANCEL WM_USER+22
  13. #define IDADVCANCEL WM_USER+23
  14. #define IDNTCANCEL WM_USER+24
  15. #define IDNTOK WM_USER+25
  16. /* Max Length of all of the status bar texts, INCLUDING THE NUL */
  17. #define PIFSTATUSLEN 90
  18. /* There is no control for these, IDI_GENSTAT is for the default status text */
  19. #define IDI_GENSTAT 1001
  20. /* IDI_CLOSE is for when IDCANCEL appears as CLOSE */
  21. #define IDI_CANCLOSE 1002
  22. #define IDI_NTCANCLOSE 1003
  23. /* Status paint helper structure */
  24. typedef struct {
  25. int dyBorder; /* System Border Width/Height */
  26. int dyBorderx2; /* System Border Width/Height * 2 */
  27. int dyBorderx3; /* System Border Width/Height * 3 */
  28. int dyStatus; /* Status Bar height */
  29. int Fntheight; /* Height of the font */
  30. HGDIOBJ hFontStatus; /* Font used in status bar */
  31. } PIFSTATUSPAINT;
  32. /* String table equates */
  33. #define errTitle 2000
  34. #define errNoPIFfnf 2001
  35. #define errNoPIFpnf 2002
  36. #define errNoCreate 2003
  37. #define errMmMaxMin386 2004
  38. #define errHiLow 2005
  39. #define errNoFileHnds 2006
  40. #define warSave 2007
  41. #define errNoAcc 2008
  42. #define EINSMEMORY 2009
  43. #define errNOEND 2010
  44. #define EINVALIDFILE 2011
  45. #define errDiskFull 2012
  46. #define IABOUT 2013
  47. #define errBadExt 2014
  48. #define errBadProgram 2015
  49. #define IS386 2016
  50. #define IS286 2017
  51. #define PIFCAPTIONADV 2018
  52. #define PIFCAPTION 2019
  53. #define errNoOpen 2020
  54. #define PIFBADFIL 2021
  55. #define PIFOLDFIL 2022
  56. #define WARNCLOSE 2023
  57. #define NONE 2024
  58. #define BADHK 2025
  59. #define WININISECT 2026
  60. #define WININIADV 2027
  61. #define WININION 2028
  62. #define MENUMNEMONIC1 2029
  63. #define MENUMNEMONIC2 2030
  64. #define MENUMNEMONIC3 2031
  65. #define KEYSEPCHAR 2032
  66. #define errBadNumberP 2033
  67. #define errBadNumberMR 2034
  68. #define errBadNumberMD 2035
  69. #define errBadNumberXEMSR 2036
  70. #define errBadNumberXEMSD 2037
  71. #define NOMODE386 2038
  72. #define NOMODE286 2039
  73. #define NOTITLE 2040
  74. #define PIFCANCELSTRNG 2041
  75. #define PIFDONESTRNG 2042
  76. #define errXMSMaxMin386 2044
  77. #define errXMSMaxMin286 2045
  78. #define errEMMMaxMin386 2046
  79. /*
  80. * #define PIFOLDFIL2 2047
  81. * #define errEMMMaxMin286 2048
  82. */
  83. #define errWrongExt 2049
  84. #define errSharing 2050
  85. #define errCrtRO 2051
  86. #define errFlTypePIF 2052
  87. #define errFlTypeAll 2053
  88. #define PIFCAPTIONNT 2054
  89. #define errNoNTAFile 2055
  90. #define errNoNTCFile 2056
  91. #define errNTAFilene 2057
  92. #define errNTCFilene 2058
  93. #define NTSYSTEMROOT 2059
  94. #define NTSYSTEM32 2060
  95. #define NOMODENT 2061
  96. #define NTAUTOEXECFILE 2062
  97. #define NTCONFIGFILE 2063
  98. #define errBadAutoPath 2064
  99. #define errBadConfigPath 2065
  100. #define errBadAutoName 2070
  101. #define errBadConName 2071
  102. /* DIALOG IDs for DialogBox dialogs */
  103. #define DTOPEN 10
  104. #define DTSAVE 11
  105. #define DTABOUT 12
  106. /* Return values for SAVE dialog */
  107. #define SAVERETRY 1
  108. #define SAVEDONE 2
  109. #define SAVEERROR 3
  110. /* IDs of special controls in Save As, Open, etc dialogs */
  111. #define ID_PATH 10
  112. #define ID_EDIT 11
  113. #define ID_LISTBOX 12
  114. #define ID_LISTBOXDIR 13
  115. #define IDSCROLL 16
  116. #define IDTEXTBOX 17
  117. #define PATHMAX 128
  118. /* LISTBOX type equates */
  119. #define ATTRDIRLIST 0xC010 /* dirs and drives only */
  120. #define ATTRFILELIST 0x0000 /* normal files */
  121. #define ATTRDIRFILE 0x4010 /* normal files */
  122. #define ID_PIFICON 1
  123. #define ID_PIFMENU 1
  124. /* Dialog templates for main and advanced window dialogs */
  125. #define ID_PIF286TEMPLATE 1
  126. #define ID_PIF386TEMPLATE 2
  127. #define ID_PIF386ADVTEMPLT 3
  128. #define ID_PIFNTTEMPLT 4