Iterate through all the controls on CFormView
-
I want to disable or enable all the controls on a form, but i don't want to use the classwizard to create control variables for each of them (since there are many controls). I've tried to disable the CFormView itself (EnableWindow), but that didn't work :(. Does anybody have any ideas? :confused: Thanks. :-D Er zit een korstje op mijn aars.
-
I want to disable or enable all the controls on a form, but i don't want to use the classwizard to create control variables for each of them (since there are many controls). I've tried to disable the CFormView itself (EnableWindow), but that didn't work :(. Does anybody have any ideas? :confused: Thanks. :-D Er zit een korstje op mijn aars.
-
I want to disable or enable all the controls on a form, but i don't want to use the classwizard to create control variables for each of them (since there are many controls). I've tried to disable the CFormView itself (EnableWindow), but that didn't work :(. Does anybody have any ideas? :confused: Thanks. :-D Er zit een korstje op mijn aars.
Create a array of UINT that you want to enable or disable in group. assign each element of the array the value of the item id as a example UINT uControls[10]; uControls[0] = IDC_STATIC; uControls[0] = IDC_BUTTON1; etc then when you want to enable or disable; for(int i =0;i<10;i++) { GetDlgItem(uContorols[i])->EnableWindow(TRUE or FALSE); } Hope this helpes. My God is more powerfull Than Your God. (the line that divides the world)
-
I want to disable or enable all the controls on a form, but i don't want to use the classwizard to create control variables for each of them (since there are many controls). I've tried to disable the CFormView itself (EnableWindow), but that didn't work :(. Does anybody have any ideas? :confused: Thanks. :-D Er zit een korstje op mijn aars.
See
EnumChildWindows()
. /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com -
Create a array of UINT that you want to enable or disable in group. assign each element of the array the value of the item id as a example UINT uControls[10]; uControls[0] = IDC_STATIC; uControls[0] = IDC_BUTTON1; etc then when you want to enable or disable; for(int i =0;i<10;i++) { GetDlgItem(uContorols[i])->EnableWindow(TRUE or FALSE); } Hope this helpes. My God is more powerfull Than Your God. (the line that divides the world)
-
See
EnumChildWindows()
. /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com -
See
EnumChildWindows()
. /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com -
You're welcome! Glad you're up and running! /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com