6 #ifndef _INC_cWndDialog_H
7 #define _INC_cWndDialog_H
13 #if defined(_WIN32) && ! defined(_MFC_VER)
23 typedef cWndHandle SUPER_t;
26 virtual bool OnInitDialog(LPARAM lParam);
27 virtual bool OnCommand(
DLGID_t wID, HWND hwndCtl, WORD wNotifyCode);
28 virtual void OnMove(POINTS pt);
30 virtual BOOL DefDialogProc(
WINMSG_t message, WPARAM wParam, LPARAM lParam);
33 virtual ~cWndDialogBase();
35 INT_PTR DoModal(
DLGID_t idResource, HWND hWndParent = HWND_DESKTOP);
36 bool EndDialog(INT_PTR nRetCode);
38 bool CreateDialogX(
DLGID_t idDialog, HWND hWndParent);
40 bool IsDialogMessageX(MSG* pMsg)
const
49 SendMessageX(DM_SETDEFID, nID, 0);
53 return DLGID_t(SendMessageX(DM_GETDEFID, 0, 0));
57 static INT_PTR CALLBACK DialogProc(HWND hWnd,
WINMSG_t message, WPARAM wParam, LPARAM lParam);
73 #define DECLARE_MESSAGE_MAP()
74 #define BEGIN_MESSAGE_MAP(_TYPE, _TBASE)
75 #define END_MESSAGE_MAP()
77 typedef cWndDialogBase SUPER_t;
81 cWndHandle* m_pParent;
85 virtual void DoDataExchange(CDataExchange* pDX)
91 cWndDialog(
DLGID_t idd, cWndHandle* pParent =
nullptr)
98 virtual DLGID_t GetDlgCtrlID()
const
103 DLGID_t get_SortValue() const noexcept
108 HWND GetParent2()
const
110 if (m_pParent !=
nullptr)
111 return m_pParent->get_Hwnd();
117 INT_PTR DoModal(HWND hWndParent = HWND_DESKTOP)
119 if (hWndParent == HWND_DESKTOP)
121 hWndParent = GetParent2();
123 return SUPER_t::DoModal(m_IDD, hWndParent);
127 return SUPER_t::CreateDialogX(m_IDD, GetParent2());
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define _GTN(c)
_WIN32 name has a A or W for UTF8 or UNICODE (like _FNF)
Definition: StrConst.h:28
#define UNREFERENCED_PARAMETER(P)
< _WIN32 type thing. get rid of stupid warning.
Definition: SysTypes.h:299
UINT WINMSG_t
Supplement _WIN32 "windows.h".
Definition: WinTypes.h:111
#define WINHANDLE_NULL
HWND, HPEN, etc are NOT OS Handles. like HWND_DESKTOP. like HANDLEPTR_NULL. This is a WINAPI void* ha...
Definition: cOSHandle.h:23
UINT DLGID_t
old window format this was a WORD, EX format this is UINT32.
Definition: cResDialog.h:68