INT_PTR DialogBox( HINSTANCE hInstance,
LPCTSTR lpTemplate,
HWND hWndParent,
DLGPROC lpDialogFunc
);
a process call DialogBox("xxx", hwndParent, DlgProc), and soon a dialogbox popup(It's hwnd is hwndChild)
Now, I know hwndChild, how can I get hwndParent?
Thank you.
Try the simple API GeParent() for the parent handle.
If you're the one creating the dialog box, then the hWndParent parameter will be the handle of your main application window.