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.

80 lines
1.3 KiB

  1. /****************************************************************************
  2. Copyright (c) Microsoft Corporation 1997
  3. All rights reserved
  4. ***************************************************************************/
  5. #ifndef _UTILS_H_
  6. #define _UTILS_H_
  7. void
  8. CenterDialog(
  9. HWND hwndDlg );
  10. void
  11. ClearMessageQueue( void );
  12. INT
  13. MessageBoxFromStrings(
  14. HWND hParent,
  15. UINT idsCaption,
  16. UINT idsText,
  17. UINT uType );
  18. INT
  19. MessageBoxFromError(
  20. HWND hParent,
  21. LPTSTR pszTitle,
  22. DWORD dwErr,
  23. LPTSTR pszAdditionalText OPTIONAL,
  24. UINT uType );
  25. INT
  26. MessageBoxFromMessage(
  27. HWND Window,
  28. DWORD MessageId,
  29. BOOL SystemMessage,
  30. LPCTSTR CaptionString,
  31. UINT Style,
  32. ...
  33. );
  34. //
  35. // Enum for SetDialogFont().
  36. //
  37. typedef enum {
  38. DlgFontTitle,
  39. DlgFontBold
  40. } MyDlgFont;
  41. VOID
  42. SetDialogFont(
  43. IN HWND hdlg,
  44. IN UINT ControlId,
  45. IN MyDlgFont WhichFont
  46. );
  47. void
  48. DrawBitmap(
  49. HANDLE hBitmap,
  50. LPDRAWITEMSTRUCT lpdis,
  51. LPRECT prc );
  52. BOOL
  53. VerifyCancel(
  54. HWND hParent );
  55. class CWaitCursor
  56. {
  57. private:
  58. HCURSOR _hOldCursor;
  59. public:
  60. CWaitCursor( ) { _hOldCursor = SetCursor( LoadCursor( NULL, IDC_WAIT ) ); };
  61. ~CWaitCursor( ) { SetCursor( _hOldCursor ); };
  62. };
  63. #endif // _UTILS_H_