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