Creating button windows
I have a few button windows and on wm_create i create these with createwindow() function and apply bitmaps to them.
when someone clicks on one of these bitmaps i destroy about 90% of them and when someone clicks on the remaining button i must recreate all of the buttons when i try this the project compiles without errors but when i click on the button which recreates the buttons it tells me an unhandled win32 exception happened and the application closes.
How do i make this work??????????
You have posted no source code, or even the error that you get.
Originally Posted by valaris
Maybe you should read before posting it clearly says i used createwindow() from inside the windows proc but if you want it any way here:
hButtona = CreateWindowEx (0,"BUTTON",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_BITMAP,
/* Set the button image */
(and 15 more similar buttons)
(this is inside windowsproc)
if (LOWORD(wParam) == IDB_BUTTON17 &&
HIWORD(wParam) == BN_CLICKED &&
(HWND) lParam == hButtonx)
You really don't need to destroy, then recreate your button cntrls. Just show/hide them.