motorway
asked on
Getting window pointer of a control
I've placed a text control with ID say IDC_TEST_1. Without using the member variables option, or CEDIT class's Create function how can I get a CWnd pointer for this control.
I know it can be done using CEdit's create function, but is there any way I can get the window pointer provided i only know the ID of the text control?
I know it can be done using CEdit's create function, but is there any way I can get the window pointer provided i only know the ID of the text control?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I want to show a rectangle on the selected text control. How can i do it?
ASKER
I've tried to show a rectangle over the selected control. But, when I try to move the rectangle using the movewindow() function, the rectangle just disappears. My guess is that I'm not getting the coordinates of the selected control with respect to the dialog containing that control. How can I do it?
pEdit = (CEdit*) GetDlgItem(IDC_TEST_1);