A simple win32 question!
Hello, my question is not about games, but i hope you guys help me. i made a main window, and then a child window of clas edit, and embbeded into the main window, you know, something like notepad, my problem is that when i maximize the main window the edit window does not expand to cover the new client area, some help?. Thanks in advanced!.I used all the updates, redraw function, etc and still don''t work.
"I stole the colour of night,to get out of your sight.I am the Visionaire, follow me if you dare..."
"I stole the colour of night,to get out of your sight.I am the Visionaire, follow me if you dare..."
August 11, 2000 05:48 PM
Why should it? It''s just as reasonable for the child window to stay just like it is as it is for the window to automagically more around based on the parent.
You need to watch for a WM_SIZE message in the parent window and when you get it redo the layout of the child windows the way you want them. If you''re a MFC guy you do this by overriding OnSize. There may be some MFC stuff to arrange your windows for you, I don''t really know.
-Mike
You need to watch for a WM_SIZE message in the parent window and when you get it redo the layout of the child windows the way you want them. If you''re a MFC guy you do this by overriding OnSize. There may be some MFC stuff to arrange your windows for you, I don''t really know.
-Mike
Try this:
static HWND hEdit1;
case WM_SIZE:
MoveWindow(hEdit1, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
break;
Well, that''s how I do it. Simple.
#define MY_LIFE BUSY
static HWND hEdit1;
case WM_SIZE:
MoveWindow(hEdit1, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
break;
Well, that''s how I do it. Simple.
#define MY_LIFE BUSY
http://www.crosswinds.net/~druidgames/resist.jpg
Thanks mates!, i''m really know it with mfc, but i want to learn win32.The_C_guy, that is what i''m looking for,now, for te background of the edit window, i catch the WM_CTLCOLOREDIT and call the SetBkColor(hDCEdit, COLORREF),but don''t know how to especify the color in a COLORREF notation.Please tell me , Thanks... Sorry for my bad english.
"I stole the colour of night,to get out of your sight.I am the Visionaire, follow me if you dare..."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement