7 * Provides separate window message handlers for every window object based on
13 INT_PTR
DoModal(HINSTANCE hInstance
, int resID
, HWND hWndParent
);
15 virtual LRESULT CALLBACK
DlgFunc(HWND hwndDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
) = 0;
17 operator HWND() {return m_hwnd
;}
22 void InitDialog(HWND hwndDlg
, UINT iconID
);
24 // the real message handler
25 static INT_PTR CALLBACK
stDlgFunc(HWND hwndDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
27 // returns a pointer the dialog (stored as the WindowLong)
28 inline static CDialog
* GetObjectFromWindow(HWND hWnd
)
30 return (CDialog
*)GetWindowLongPtr(hWnd
, GWLP_USERDATA
);