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.

63 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: cdialog.h
  7. //
  8. // Contents: definition for common dialog functionality
  9. //
  10. // Classes: CHlprDialog (pure virtual class)
  11. //
  12. // Functions: DialogProc
  13. //
  14. // History: 4-12-94 stevebl Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __CDIALOG_H__
  18. #define __CDIALOG_H__
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  23. #ifdef __cplusplus
  24. }
  25. //+---------------------------------------------------------------------------
  26. //
  27. // Class: CHlprDialog
  28. //
  29. // Purpose: virtual base class for wrapping Windows' dialog functionality
  30. //
  31. // Interface: ShowDialog -- analagous to the Windows DialogBox function
  32. // DialogProc -- pure virtual DialogProc for the dialog box
  33. // ~CHlprDialog -- destructor
  34. //
  35. // History: 4-12-94 stevebl Created
  36. //
  37. // Notes: This class allows a dialog box to be cleanly wrapped in
  38. // a c++ class. Specifically, it provides a way for a c++ class
  39. // to use one of its methods as a DialogProc, giving it a "this"
  40. // pointer and allowing it to have direct access to all of its
  41. // private members.
  42. //
  43. //----------------------------------------------------------------------------
  44. class CHlprDialog
  45. {
  46. public:
  47. virtual int ShowDialog(HINSTANCE hinst, LPCTSTR lpszTemplate, HWND hwndOwner);
  48. virtual BOOL DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) = 0;
  49. virtual ~CHlprDialog(){};
  50. protected:
  51. HINSTANCE _hInstance;
  52. };
  53. #endif //__cplusplus
  54. #endif //__CDIALOG_H__