Handle of that particular button style and caption

HI, In my project i receive style of the button(ex-Pushbutton) and caption of that button(ex-cancel) now i have to find the exact button and have to return the handle of button.. i need related examples ( buttons.)
You need to have available at global scope the control id of the button such as you would have if it were defined like so ...

 
#define IDC_BUTTON  1500 


Then, you would have set that control id in your CreateWindow() call that created the button. It would go in the HMENU parameter ...

 
... ,  (HMENU)IDC_BUTTON, ...


Then, to find the HWND of the button whose parent is hDialog, do this ...

 
HWND hButton=GetDlgItem(hDialog, IDC_BUTTON);


Topic archived. No new replies allowed.