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.

109 lines
1.6 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. void
  19. MessageBoxFromError(
  20. HWND hParent,
  21. LPTSTR pszTitle,
  22. DWORD dwErr );
  23. void
  24. ErrorBox(
  25. HWND hParent,
  26. LPTSTR pszTitle );
  27. //
  28. // Enum for SetDialogFont().
  29. //
  30. typedef enum {
  31. DlgFontTitle,
  32. DlgFontBold
  33. } MyDlgFont;
  34. VOID
  35. SetDialogFont(
  36. IN HWND hdlg,
  37. IN UINT ControlId,
  38. IN MyDlgFont WhichFont
  39. );
  40. void
  41. DrawBitmap(
  42. HANDLE hBitmap,
  43. LPDRAWITEMSTRUCT lpdis,
  44. LPRECT prc );
  45. BOOL
  46. VerifyCancel(
  47. HWND hParent );
  48. HRESULT
  49. CheckImageSource(
  50. HWND hDlg );
  51. HRESULT
  52. CheckIntelliMirrorDrive(
  53. HWND hDlg );
  54. VOID
  55. ConcatenatePaths(
  56. IN OUT LPWSTR Path1,
  57. IN LPCWSTR Path2 );
  58. HRESULT
  59. FindImageSource(
  60. HWND hDlg );
  61. HRESULT
  62. GetHelpAndDescriptionTextFromSif(
  63. OUT PWSTR HelpText,
  64. IN DWORD HelpTextSizeInChars,
  65. OUT PWSTR DescriptionText,
  66. IN DWORD DescriptionTextSizeInChars
  67. );
  68. HRESULT
  69. GetSetRanFlag(
  70. BOOL bQuery,
  71. BOOL bClear
  72. );
  73. VOID
  74. GetProcessorType(
  75. );
  76. class CWaitCursor
  77. {
  78. private:
  79. HCURSOR _hOldCursor;
  80. public:
  81. CWaitCursor( ) { _hOldCursor = SetCursor( LoadCursor( NULL, IDC_WAIT ) ); };
  82. ~CWaitCursor( ) { SetCursor( _hOldCursor ); };
  83. };
  84. #endif // _UTILS_H_