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.

36 lines
912 B

  1. #ifndef DIALOG_H_INCLUDED
  2. #define DIALOG_H_INCLUDED
  3. class CDialogBase
  4. {
  5. protected:
  6. virtual INT_PTR DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) = 0;
  7. public:
  8. virtual ~CDialogBase() {}
  9. };
  10. class CPropertyPage: public CDialogBase
  11. {
  12. public:
  13. void SetPropSheetPageMembers(PROPSHEETPAGE* ppsp)
  14. {
  15. ppsp->lParam = (LPARAM) this;
  16. ppsp->pfnDlgProc = CPropertyPage::StaticProc;
  17. }
  18. private:
  19. static INT_PTR StaticProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  20. };
  21. class CDialog: public CDialogBase
  22. {
  23. public:
  24. INT_PTR DoModal(HINSTANCE hInstance, LPCTSTR lpTemplate, HWND hWndParent)
  25. {return DialogBoxParam(hInstance, lpTemplate, hWndParent, CDialog::StaticProc, (LPARAM) this);}
  26. private:
  27. static INT_PTR StaticProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  28. };
  29. #endif //!DIALOG_H_INCLUDED