dialog.h 1016 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _dialog_h_
  2. #define _dialog_h_
  3. //////////////////////////////////////////////////////////////////////////////
  4. //
  5. // Dialog
  6. //
  7. //////////////////////////////////////////////////////////////////////////////
  8. class Dialog : public Window
  9. {
  10. public:
  11. Dialog(Window* pwndParent, int nResourceID);
  12. ~Dialog();
  13. virtual BOOL Create();
  14. virtual void Destroy();
  15. protected:
  16. static BOOL CALLBACK Win32DlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  17. virtual DWORD WndProc(UINT message, WPARAM wParam, LPARAM lParam);
  18. // overridable message handles
  19. virtual BOOL OnInitDialog();
  20. virtual BOOL OnNotify(HWND hwndFrom, UINT idFrom, UINT code, LPARAM lParam, LRESULT* pResult);
  21. virtual void OnDrawItem(UINT nCtrlID, LPDRAWITEMSTRUCT lpdis);
  22. // Dialog Hook functions
  23. static LRESULT CALLBACK DialogCreationHook(int code, WPARAM wParam, LPARAM lParam);
  24. void HookDialogCreate();
  25. BOOL UnhookDialogCreate();
  26. protected:
  27. int m_nResourceID;
  28. };
  29. #endif