RECT windowRect;
windowRect.left = left;
windowRect.top = top;
windowRect.bottom = top + height;
windowRect.right = left + width;
WNDCLASSEX windowClass;
windowClass.cbSize = sizeof(WNDCLASSEX);
windowClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // Redraw the window on resizing
windowClass.lpfnWndProc = windowProc;
windowClass.cbClsExtra = 0;
windowClass.cbWndExtra = 0;
windowClass.hInstance = hInstance;
windowClass.hIcon = NULL;
windowClass.hIconSm = NULL;
windowClass.hCursor = LoadCursor(NULL, IDC_ARROW);
windowClass.hbrBackground = (HBRUSH) (COLOR_WINDOW);
windowClass.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1);
windowClass.lpszClassName = "MainClass";
if (!RegisterClassEx(&windowClass)) return false;
DWORD dwStyle = WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU |
WS_CLIPCHILDREN | WS_CLIPSIBLINGS |WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME;
AdjustWindowRectEx(&windowRect, dwStyle, FALSE, WS_EX_APPWINDOW);
hWnd = CreateWindowEx( WS_EX_APPWINDOW,
className,
"caption",
dwStyle,
windowRect.left, windowRect.top,
windowRect.right-windowRect.left,
windowRect.bottom-windowRect.top,
NULL,
NULL,
hInstance,
NULL);
CreateWindow("BUTTON",0, WS_VISIBLE | WS_CHILD | BS_GROUPBOX,
495, 90, 220, 135, hWnd, (HMENU) IDB_GROUP1, hInstance, NULL);
Groupbox on window resizing becomes transparant
I ran into another small problem. I'm using straight win32 to create a window with (amongst others) a groupbox control. Now when i minimize or resize the window all the controls act normal, except for the groupbox control which becomes transparant - which isn't really what i'm looking for.
screenshot :
the code for creating the window & groupbox :
I hope someone can help me out here.
Not sure about prevention but can you implement a cure?
Set the property of it back to opaque after the event or run a refresh?
Set the property of it back to opaque after the event or run a refresh?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement