Article View: comp.windows.ms.programmer
Article #164Maximizing MDI document windows
From: Rick Ekle (CompSci)
Date: Sun, 02 Aug 1992 04:19
Date: Sun, 02 Aug 1992 04:19
50 lines
2042 bytes
2042 bytes
Got a question for y'all:
What message controls the maximizing of MDI child windows. I suspect that
it is WM_MDIMAXIMIZE... My program maximizes the child window ok, but it
doesn't draw the system menu or the resize button in the menu bar for the
child window while it's maximized. So I end up with a window I can maximize
but I can't reduce in size once it it maximized...
A snippet of my code:
// Frame Window procedure
long FAR PASCAL FrameWndProc(HWND hwnd, UINT message, WPARAM, wParam,
LPARAM lParam)
{
switch (message)
{
case WM_COMMAND:
return ProcessMenuCommands(hwnd,wParam,lParam);
default:
return DefFrameProc(hwnd,hWndClient,message,wParam,lParam);
}
return 0; // Exactly what does this 0 mean?
}
LRESULT ProcessMenuCommands(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
HWND hChild;
switch (wParam)
{
case EDIT_NEW:
EditNew(hwnd,NULL); // Seperate function to open a new window
break;
default: // What am I supposed to put for the default case???
hChild = LOWORD(SendMessage(hWndClient,WM_MDIGETACTIVE,0,0L));
if (IsWindow(hChild))
SendMessage(hChild,WM_COMMAND,wParam,lParam);
break;
}
return 0; // Why 0???
}
// Thanks for all your help folks... I can't exactly release this app
// if this problem exists...
--
/---------------------------------------------------------------------------\
| Rick Ekle | rekle@loligo.cc.fsu.edu | Birth, School, Work, Death. |
\---------------------------------------------------------------------------/
Technical Details
Message-ID:
<1992Jul27.233719.22732@mailer.cc.fsu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!uflorida!mailer.cc.fsu.edu!loligo!rekleReferences:
<1992Jul27.114422.28979@Cadence.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!uflorida!mailer.cc.fsu.edu!loligo!rekle From: rekle@loligo.cc.fsu.edu (Rick Ekle (CompSci)) Newsgroups: comp.windows.ms.programmer Subject: Maximizing MDI document windows Message-ID: <1992Jul27.233719.22732@mailer.cc.fsu.edu> Date: 2 Aug 92 04:19:31 GMT References: <1992Jul27.114422.28979@Cadence.COM> Organization: Florida State University Computing Center Lines: 50