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.

81 lines
1.9 KiB

  1. #ifndef __FAXSTRINGTABLE_H_
  2. #define __FAXSTRINGTABLE_H_
  3. /*++
  4. Copyright (c) 1996 Microsoft Corporation
  5. Module Name:
  6. faxstrt.h
  7. Abstract:
  8. This file implements string table functions.
  9. Environment:
  10. WIN32 User Mode
  11. Author:
  12. Darwin Ouyang (t-darouy) 30-Sept-1997
  13. Snagged and Modified from:
  14. Wesley Witt (wesw) 17-Feb-1996
  15. --*/
  16. #include "resource.h"
  17. // string table struct
  18. typedef struct _STRING_TABLE {
  19. DWORD ResourceId;
  20. LPTSTR String;
  21. } STRING_TABLE;
  22. typedef STRING_TABLE* PSTRING_TABLE;
  23. // The CStringTable Class encapsulates the concept of string resources.
  24. // The Constructor will automatically find and load all the defined string resources for the program.
  25. class CStringTable
  26. {
  27. // this is the string table composed of resource ID string pairs stored in _STRING_TABLE structs
  28. // don't forget to define the string resource IDs in resource.h.
  29. // the actual strings go in the .res file.
  30. static STRING_TABLE StringTable [];
  31. public:
  32. // constructor
  33. CStringTable( HMODULE thisModule );
  34. // destructor - clean up nicely
  35. ~CStringTable();
  36. // ***************************************
  37. // Gets a const string pointer given a resource ID.
  38. const LPTSTR GetString( DWORD ResourceId );
  39. // **************************************
  40. // Does a quick popup given a resource ID
  41. int PopUpMsg( HWND hwnd, DWORD ResourceId, BOOL Error, DWORD Type );
  42. // **************************************
  43. // Does a quick popup given a resource ID, and some formatting flags
  44. int PopUpMsgFmt( HWND hwnd, DWORD ResourceId, BOOL Error, DWORD Type, ... );
  45. // **************************************
  46. // Does a quick popup with the system error code
  47. VOID CStringTable::SystemErrorMsg(DWORD ErrorCode);
  48. // **************************************
  49. // Returns the instance
  50. HMODULE GetInstance();
  51. private:
  52. HINSTANCE gInstance;
  53. };
  54. #endif