How can I get a controls HWND ?
-
For example the ID of the dialog control is IDC_BUTTON2. CWnd *pWnd = GetDlgItem(IDC_BUTTON2); if (pWnd) { HWND hwnd = pWnd->m_hWnd; // hwnd is your handle to the control } I hope I could help you... Gregor Mitsch E-Mail: abacus-@gmx.de
-
Try using FindWindowEx
-
For example the ID of the dialog control is IDC_BUTTON2. CWnd *pWnd = GetDlgItem(IDC_BUTTON2); if (pWnd) { HWND hwnd = pWnd->m_hWnd; // hwnd is your handle to the control } I hope I could help you... Gregor Mitsch E-Mail: abacus-@gmx.de
Hi Gregor Mitsch! do you know how to use this function bellow? I found it in the sdk, but fail to use it. Basically, I have 2 dialog. I need to change a value of an edit box on the second dialog, when a button on the first dialog is clicked. //here is the function prototype HWND GetDlgItem( HWND hDlg, // handle to dialog box int nIDDlgItem // control identifier ); Thank You Vu vucsuf