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.

133 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. util.h
  5. --*/
  6. /****************************************************************************
  7. PROTOTYPES DECLARATION FOR UTIL MODULE
  8. ****************************************************************************/
  9. //Current Help Id for Open, Merge, Save and Open project dialog box
  10. extern WORD g_CurHelpId;
  11. // Number of dialog/message boxes currently open
  12. extern int g_nBoxCount;
  13. // Opens a standard error Dialog Box (Parent is hwnd)
  14. BOOL ErrorBox(HWND hwnd, UINT type, int wErrorFormat, ...);
  15. void InformationBox(WORD wDescript, ...);
  16. // Opens a message box with the QCWin title
  17. int MsgBox(HWND hwndParent, PTSTR szText, UINT wType);
  18. // Loads and execute dialog box 'rcDlgNb' with 'dlgProc' function
  19. int StartDialog(int rcDlgNb, DLGPROC dlgProc, LPARAM);
  20. // Loads a resource string from resource file
  21. void LoadResourceString(
  22. WORD wStrId,
  23. PTSTR lpszStrBuffer);
  24. //Opens a standard question box containing combination
  25. //of : Yes, No, Cancel
  26. int CDECL QuestionBox(
  27. WORD wMsgFormat,
  28. UINT wType,
  29. ...);
  30. //Opens a standard question box containing combination
  31. //of : Yes, No, Cancel
  32. int CDECL QuestionBox2(HWND hwnd, WORD wMsgFormat, UINT wType, ...);
  33. // Drain the thread message queue.
  34. void ProcessPendingMessages(void);
  35. //Initialize files filters for dialog boxes using commonfile DLL
  36. void InitFilterString(WORD id, PTSTR filter, int maxLen);
  37. //Check if keyboard hit is NUMLOCK, CAPSLOCK or INSERT
  38. LRESULT KeyboardHook( int iCode, WPARAM wParam, LPARAM lParam );
  39. //Opens a Dialog box with a title and accepting a printf style for text
  40. int InfoBox(
  41. PTSTR text,
  42. ...);
  43. UINT_PTR
  44. APIENTRY
  45. DlgFile(
  46. HWND hDlg,
  47. UINT uMsg,
  48. WPARAM wParam,
  49. LPARAM lParam
  50. );
  51. BOOL StartFileDlg(HWND hwnd, int titleId, int defExtId,
  52. int helpId, int templateId,
  53. PTSTR InitialDir, PTSTR fileName,
  54. DWORD *pFlags, LPOFNHOOKPROC lpfnHook);
  55. void DECLSPEC_NORETURN ExitDebugger(PDEBUG_CLIENT Client, ULONG Code);
  56. void DECLSPEC_NORETURN ErrorExit(PDEBUG_CLIENT Client, PCSTR Format, ...);
  57. HWND
  58. MDIGetActive(
  59. HWND hwndParent,
  60. BOOL *lpbMaximized
  61. );
  62. LPSTR
  63. FormatAddr64(
  64. ULONG64 addr
  65. );
  66. int matchExt (PTSTR pTargExt, PTSTR pSrcList);
  67. void ActivateNewMDIChild(
  68. HWND hwndPrev,
  69. HWND hwndNew,
  70. BOOL bUserActivated);
  71. void ActivateMDIChild(
  72. HWND hwndNew,
  73. BOOL bUserActivated);
  74. void SetProgramArguments(
  75. PTSTR lpszTmp);
  76. void
  77. AppendTextToAnEditControl(
  78. HWND hwnd,
  79. PTSTR pszNewText);
  80. VOID
  81. CopyToClipboard(
  82. PSTR str);
  83. void SetAllocString(PSTR* Str, PSTR New);
  84. BOOL DupAllocString(PSTR* Str, PSTR New);
  85. BOOL PrintAllocString(PSTR* Str, int Len, PCSTR Format, ...);
  86. HMENU CreateContextMenuFromToolbarButtons(ULONG NumButtons,
  87. TBBUTTON* Buttons,
  88. ULONG IdBias);
  89. HWND AddButtonBand(HWND Bar, PTSTR Text, PTSTR SizingText, UINT Id);