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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -