Leaked source code of windows server 2003
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.

122 lines
1.9 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. IN ULONG Path1Length );
  59. HRESULT
  60. FindImageSource(
  61. HWND hDlg );
  62. HRESULT
  63. GetHelpAndDescriptionTextFromSif(
  64. OUT PWSTR HelpText,
  65. IN DWORD HelpTextSizeInChars,
  66. OUT PWSTR DescriptionText,
  67. IN DWORD DescriptionTextSizeInChars
  68. );
  69. HRESULT
  70. GetSetRanFlag(
  71. BOOL bQuery,
  72. BOOL bClear
  73. );
  74. DWORD
  75. MyGetFileVersionInfo(
  76. PCWSTR FilePath
  77. );
  78. BOOLEAN
  79. GetBuildNumberFromImagePath(
  80. PDWORD pdwVersion,
  81. PCWSTR SearchDir,
  82. PCWSTR SubDir OPTIONAL
  83. );
  84. VOID
  85. GetProcessorType(
  86. );
  87. class CWaitCursor
  88. {
  89. private:
  90. HCURSOR _hOldCursor;
  91. public:
  92. CWaitCursor( ) { _hOldCursor = SetCursor( LoadCursor( NULL, IDC_WAIT ) ); };
  93. ~CWaitCursor( ) { SetCursor( _hOldCursor ); };
  94. };
  95. #endif // _UTILS_H_