c++ - SetCheck for multiple buttons or using converting strings to defines -
i have 32 check boxes , need enable of them. can them individually using:
cbutton* button; button = (cbutton *)getdlgitem(idc_check1); button->setcheck(bst_checked); button = (cbutton *)getdlgitem(idc_check2); button->setcheck(bst_checked);
...
is there way @ once or in loop can increment check number though define.
idc_check1 , idc_check2 defined dword in resource.h file, can define them in sequenced number, , use loop them:
for(int index=0;index<100;index++) { cbutton* button = (cbutton *)getdlgitem(baseid+index); ....... }
Comments
Post a Comment