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.

52 lines
1.3 KiB

  1. #ifndef BASEDLG_H
  2. #define BASEDLG_H
  3. class CBaseDlg
  4. {
  5. public:
  6. CBaseDlg(ULONG_PTR ulpAHelpIDsArray);
  7. LONG AddRef();
  8. LONG Release();
  9. public:
  10. INT_PTR DoModal(HINSTANCE hinst, LPTSTR pszResource, HWND hwndParent);
  11. protected:
  12. virtual ~CBaseDlg();
  13. virtual LRESULT OnCommand(WPARAM wParam, LPARAM lParam);
  14. virtual LRESULT OnNotify(WPARAM wParam, LPARAM lParam);
  15. virtual LRESULT OnInitDialog(WPARAM wParam, LPARAM lParam) = 0;
  16. virtual LRESULT OnDestroy(WPARAM wParam, LPARAM lParam);
  17. virtual LRESULT OnHelp(WPARAM wParam, LPARAM lParam);
  18. virtual LRESULT OnContextMenu(WPARAM wParam, LPARAM lParam);
  19. virtual LRESULT OnOK(WORD wNotif);
  20. virtual LRESULT OnCancel(WORD wNotif);
  21. virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  22. ULONG_PTR GetHelpIDsArray();
  23. // Misc
  24. void SetHWND(HWND hwnd) { _hwnd = hwnd; }
  25. void ResetHWND() { _hwnd = NULL; }
  26. protected:
  27. HWND _hwnd;
  28. HCURSOR _hcursorWait;
  29. HCURSOR _hcursorOld;
  30. ULONG_PTR _rgdwHelpIDsArray;
  31. private:
  32. LONG _cRef;
  33. public:
  34. static BOOL_PTR CALLBACK BaseDlgWndProc(HWND hwnd, UINT uMsg,
  35. WPARAM wParam, LPARAM lParam);
  36. static UINT CALLBACK BaseDlgPropSheetCallback( HWND hwnd,
  37. UINT uMsg, LPPROPSHEETPAGE ppsp);
  38. };
  39. #endif //BASEDLG_H}