Click to See Complete Forum and Search --> : 36 buttons and I want show them


abab
April 18th, 2007, 02:05 AM
I have 36 buttons (they have only ID ) and I want when they are hide and when somebody click "new game" from menu they Show - I can't use this:

ShowWindow((HWND)lParam, SW_SHOW);

because in this I must use names of buttons and I have only ID - what should I do ?

golanshahar
April 18th, 2007, 05:01 AM
If you have the id of the button you can get its HWND using ::GetDlgItem() (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/WindowsUserInterface/Windowing/DialogBoxes/DialogBoxReference/DialogBoxFunctions/GetDlgItem.asp).

Cheers

abab
April 18th, 2007, 09:24 AM
thanks