I have a group box on which there are three buttons. When you click on one of them, this group box should become invisible. I tried SetWindowLong, but it does not work. Maybe she is not in the subject at all (I don’t know English, so I don’t understand English-speaking resources). In general, the question is: how to change the styles of elements? When you click on the button, the whole window hangs, although if you remove SetWindowLong and leave the MessageBox, then everything is fine. Where could screw up?
LRESULT CALLBACK GrpBoxWndProc(HWND hGroupMainMenu, UINT message, WPARAM wParam, LPARAM lParam) { LONG style; switch (message) { case WM_COMMAND: if(wParam == BM_NEWGAME){ MessageBox(NULL,_T("DFGGDF") , _T("Win32 Guided Tour"), NULL); style = GetWindowLong(hGroupMainMenu,GWL_STYLE); style = style = style || WS_BORDER ; SetWindowLong(hGroupMainMenu,GWL_STYLE,style); } break; default: return DefWindowProc(hGroupMainMenu, message, wParam, lParam); break; } return 0; }