-
Dialog Handle
Hi everybody,
How do I get the handle of a Dialog template. For example I have a dialog with an ID IDD_NEW_DIALOG and I need to get the CWnd* handle of this dialog. How will I do that. Please some one Help me out of this problem.
Thanks & Regards,
Bala.
-
Re: Dialog Handle
Hi Bala,
you can try:
CWnd* pWnd = GetDlgItem(IDD_NEW_DIALOG);
HWND hWnd = pWnd->m_hWnd;
Milan
-
Re: Dialog Handle
Hi Milan,
I must correct you:
The GetDlgItem function retrieves the handle of a control in the specified
dialog box, not the handle of a dialog box.
Bala you can retrieves the handle of your dialog box if you create or modal your dialog, and if you do this you allready hava a variable of type CMyDialog
Let me know if this help u
Regards,
Burlacu Ovidiu