hi guys i am creating many child windows using cdialog pointer at run time , depending upon the combo box selection in parent window; now i have to disable some controls of child window; using getdlgitem( control id, handle_of_child_window)->enable(FALSE); so prob is how do i obtain the handle_of_child_window; thanks in advance ankur
There are lots of ways to be doing it 1. In your dialog you will have the control ddx'ed variables of your child window. 2. You know the control ID of the window's and can get the handle to the window. 3. You can go the hard way by enumerating the child window's as well.
suppose i have the ID of the child window , then how can i get it's handel please explain. i am just a beginner thanks
na it's not working GetDlgItem(IDC_NAME, IDD_CHILD_DLG)->EnableWindow(FALSE); IDC_NAME is id of edit box , and the IDD_CHILD_DLG is id of chld dialog; i want to disable the edit box depending upon some value in main dialog thanks
If the API's are not working you are somewhere really wrong because they are tested over times to work correctly. Debug your code and see if you are getting the handle correctly and see if you have the parameters correctly.