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.

162 lines
4.8 KiB

  1. #ifndef REG_COMMON
  2. #define REG_COMMON
  3. #ifdef NOHELP
  4. #define MyHelp( x , y , z)
  5. #endif
  6. #include <shellapi.h>
  7. /*********************************************************/
  8. /******************* Constants ***************************/
  9. /*********************************************************/
  10. #define OPENDLG 4096
  11. #define MAINICON 4097
  12. #define MAINMENU 4098
  13. #define SDKMAINMENU 4099
  14. #define ID_HELP 0x0400
  15. #define ID_HELPBUTTON 0x0401
  16. #define ID_MERGEFILE 0x0410
  17. #define ID_EXIT (ID_MERGEFILE+1)
  18. #define ID_ADD 0x0420
  19. #define ID_COPY (ID_ADD+1)
  20. #define ID_MODIFY (ID_ADD+2)
  21. #define ID_DELETE (ID_ADD+3)
  22. #define ID_EDITVAL (ID_ADD+4)
  23. #define ID_FINISHMERGE 0x0430
  24. #define ID_IDLIST (ID_FINISHMERGE+1)
  25. #define ID_FIRSTREGEDIT 0x0500
  26. #define ID_FIRSTSDKREGED 0x0600
  27. /* The help ID's should be last */
  28. #define ID_HELPINDEX 0x0700
  29. #define ID_HELPSEARCH (ID_HELPINDEX+1)
  30. #define ID_HELPUSINGHELP (ID_HELPINDEX+2)
  31. #define ID_ABOUT (ID_HELPINDEX+3)
  32. #define IDS_SHORTNAME 0x0100
  33. #define IDS_WIDTH (IDS_SHORTNAME+1)
  34. #define IDS_HEIGHT (IDS_SHORTNAME+2)
  35. #define IDS_MEDIUMNAME 0x0110
  36. #define IDS_DESCRIPTION (IDS_MEDIUMNAME+1)
  37. #define IDS_MERGETITLE 0x0120
  38. #define IDS_REGS (IDS_MERGETITLE+1)
  39. #define IDS_CUSTREGS (IDS_MERGETITLE+2)
  40. #define IDS_OUTOFMEMORY 0x0130
  41. #define IDS_LONGNAME (IDS_OUTOFMEMORY+1)
  42. #define IDS_CANTOPENFILE 0x0140
  43. #define IDS_CANTREADFILE (IDS_CANTOPENFILE+1)
  44. #define IDS_REGHEADER (IDS_CANTOPENFILE+2)
  45. #define IDS_BADFORMAT (IDS_CANTOPENFILE+3)
  46. #define IDS_SUCCESSREAD (IDS_CANTOPENFILE+4)
  47. #define IDS_HELPFILE 0x0150
  48. #define IDS_HELP (IDS_HELPFILE+1)
  49. #define IDS_HELPERR (IDS_HELPFILE+2)
  50. #define IDS_SDKHELPFILE (IDS_HELPFILE+3)
  51. #define IDS_BADDB 0x0160
  52. #define IDS_BADKEY (IDS_BADDB+1)
  53. #define IDS_CANTOPENDB (IDS_BADDB+2)
  54. #define IDS_CANTREADDB (IDS_BADDB)
  55. #define IDS_CANTWRITEDB (IDS_BADDB+3)
  56. #define IDS_INVALIDPARM (IDS_BADKEY)
  57. #define IDS_ENDERROR (IDS_BADDB+4)
  58. #define IDS_BUSY 0x0170
  59. #define IDS_FIRSTREGEDIT 0x0200
  60. #define IDS_FIRSTSDKREGED 0x0300
  61. #define FLAG_SILENT 0x0001
  62. #define FLAG_NOMESSAGES 0x0002
  63. #define FLAG_VERBOSE 0x0004
  64. #define FLAG_WRITETHROUGH 0x0008
  65. #define FLAG_LEAVECOMMAND 0x0010
  66. #define IDH_SYSMENU 0x2000
  67. #define IDW_MAIN (IDH_SYSMENU+1)
  68. #define IDW_SDKMAIN (IDW_MAIN+0x80)
  69. #define IDW_OPENREG 0x3000
  70. #define IDW_OPENEXE (IDW_OPENREG+1)
  71. #define IDW_SAVEREG (IDW_OPENREG+2)
  72. #define IDW_MODIFY 0x4000
  73. #define MAX_KEY_LENGTH 64
  74. /*********************************************************/
  75. /******************* Macros ******************************/
  76. /*********************************************************/
  77. #define OFFSET(x) ((PSTR)(LOWORD((DWORD)(x))))
  78. /*********************************************************/
  79. /******************* Globals *****************************/
  80. /*********************************************************/
  81. extern HANDLE hInstance;
  82. extern HWND hWndMain, hWndDlg, hWndHelp;
  83. extern LPSTR lpCmdLine;
  84. extern WORD wCmdFlags, wHelpMenuItem, wHelpId;
  85. extern LONG (FAR PASCAL *lpfnEditor)(HWND, WORD, WORD, LONG);
  86. extern FARPROC lpOldHook;
  87. extern FARPROC lpMainWndDlg;
  88. extern WORD wHelpIndex;
  89. /*********************************************************/
  90. /******************* Functions ***************************/
  91. /*********************************************************/
  92. /***** cutils1.c *****/
  93. extern HANDLE NEAR PASCAL StringToLocalHandle(LPSTR szStr, WORD wFlags);
  94. extern LPSTR NEAR _fastcall MyStrTok(LPSTR szList, char cEnd);
  95. extern int NEAR PASCAL DoDialogBoxParam(LPCSTR lpDialog, HWND hWnd,
  96. FARPROC lpfnProc, DWORD dwParam);
  97. extern int NEAR PASCAL DoDialogBox(LPCSTR, HWND, FARPROC);
  98. extern unsigned long NEAR PASCAL MyQueryValue(HKEY hKey, PSTR pSubKey,
  99. HANDLE *hBuf);
  100. extern HANDLE NEAR PASCAL GetEditString(HWND hWndEdit);
  101. extern HANDLE NEAR _fastcall MyLoadString(WORD wId, WORD *pwSize, WORD wFlags);
  102. extern int NEAR cdecl MyMessageBox(HWND hWnd, WORD wText, WORD wType,
  103. WORD wExtra, ...);
  104. extern VOID NEAR PASCAL WriteProfileInt(WORD wAppName, WORD wKey, int nVal);
  105. extern int NEAR PASCAL MyGetProfileInt(WORD wAppName, WORD wKey, int nDefault);
  106. extern HANDLE NEAR PASCAL StringToHandle(LPSTR szStr);
  107. extern int FAR PASCAL MessageFilter(int nCode, WORD wParam, LPMSG lpMsg);
  108. #ifndef NOHELP
  109. extern VOID NEAR PASCAL MyHelp(HWND hWnd, WORD wCommand, DWORD wId);
  110. #endif
  111. extern HANDLE NEAR PASCAL GetListboxString(HWND hWndEdit, int nId);
  112. extern unsigned long NEAR PASCAL MyEnumKey(HKEY hKey, WORD wIndex,
  113. HANDLE *hBuf);
  114. extern WORD NEAR _fastcall GetErrMsg(WORD wRet);
  115. extern VOID NEAR PASCAL RepeatMove(LPSTR lpDest, LPSTR lpSrc, WORD wBytes);
  116. /***** merge.c *****/
  117. extern VOID NEAR PASCAL ProcessFiles(HWND hDlg, HANDLE hCmdLine, WORD wFlags);
  118. /***** filename.c *****/
  119. extern BOOL NEAR PASCAL DoFileOpenDlg(HWND hWnd, WORD wTitle, WORD wFilter,
  120. WORD wCustomFilter, HANDLE *hCustomFilter, HANDLE *hFileName, BOOL bOpen);
  121. #endif