A
alikim
Guest
I need to create two windows - one main window with different controls that has standard appearance and another dependent window without any style for drawing. Dependent window should be closed when the main does, both should be brought to foreground with Alt+Tab, minimized/maximized together. Both windows can be positioned anywhere on the screen and can overlap.
The closest solution I found is this:
// main window
_hWnd = CreateWindow(wcMain.lpszClassName, VER, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, MWW, MWH, NULL, NULL, hInstance, NULL);
// graphics window
_cWnd = CreateWindow(wcDraw.lpszClassName, "Draw Window", WS_POPUP, 0, 0, CWW, CWH, _hWnd, NULL, hInstance, NULL);
I'm happy with this behavior except that the graphics window is always on top of the main one when they overlap. I need these windows to swap z-order when they are clicked on, is that possible?
Thank you!
Continue reading...
The closest solution I found is this:
// main window
_hWnd = CreateWindow(wcMain.lpszClassName, VER, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, MWW, MWH, NULL, NULL, hInstance, NULL);
// graphics window
_cWnd = CreateWindow(wcDraw.lpszClassName, "Draw Window", WS_POPUP, 0, 0, CWW, CWH, _hWnd, NULL, hInstance, NULL);
I'm happy with this behavior except that the graphics window is always on top of the main one when they overlap. I need these windows to swap z-order when they are clicked on, is that possible?
Thank you!
Continue reading...