sync minor mod.

svn path=/trunk/; revision=3224
This commit is contained in:
Robert Dickenson 2002-07-14 22:38:37 +00:00
parent 17731321a4
commit 1713f73a79
2 changed files with 63 additions and 76 deletions

View file

@ -41,21 +41,19 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Global Variables: // Globals and Variables:
// //
BOOL bInMenuLoop = FALSE; // Tells us if we are in the menu loop BOOL bInMenuLoop = FALSE; // Tells us if we are in the menu loop
static HHOOK hcbthook;
static ChildWnd* newchild = NULL;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Local module support methods // Local module support methods
// //
//////////////////////////////////////////////////////////////////////////////// static LRESULT CALLBACK CBTProc(int code, WPARAM wParam, LPARAM lParam)
static HHOOK hcbthook;
static ChildWnd* newchild = NULL;
LRESULT CALLBACK CBTProc(int code, WPARAM wParam, LPARAM lParam)
{ {
if (code == HCBT_CREATEWND && newchild) { if (code == HCBT_CREATEWND && newchild) {
ChildWnd* pChildWnd = newchild; ChildWnd* pChildWnd = newchild;
@ -102,7 +100,8 @@ static HWND InitChildWindow(LPTSTR param)
} }
return 0; return 0;
} }
BOOL CALLBACK CloseEnumProc(HWND hWnd, LPARAM lParam)
static BOOL CALLBACK CloseEnumProc(HWND hWnd, LPARAM lParam)
{ {
if (!GetWindow(hWnd, GW_OWNER)) { if (!GetWindow(hWnd, GW_OWNER)) {
SendMessage(GetParent(hWnd), WM_MDIRESTORE, (WPARAM)hWnd, 0); SendMessage(GetParent(hWnd), WM_MDIRESTORE, (WPARAM)hWnd, 0);
@ -113,18 +112,9 @@ BOOL CALLBACK CloseEnumProc(HWND hWnd, LPARAM lParam)
return 1; return 1;
} }
//////////////////////////////////////////////////////////////////////////////// static LRESULT _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
//
// FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes WM_COMMAND messages for the main frame window.
//
//
LRESULT _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
HWND hChildWnd; HWND hChildWnd;
if (1) {
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case ID_WINDOW_CLOSEALL: case ID_WINDOW_CLOSEALL:
EnumChildWindows(hMDIClient, &CloseEnumProc, 0); EnumChildWindows(hMDIClient, &CloseEnumProc, 0);
@ -178,7 +168,6 @@ LRESULT _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
else else
return DefFrameProc(hWnd, hMDIClient, message, wParam, lParam); return DefFrameProc(hWnd, hMDIClient, message, wParam, lParam);
} }
}
return 0; return 0;
} }

View file

@ -247,7 +247,7 @@ HWND CreateChildWindow(int drv_id)
return 0; return 0;
} }
BOOL CALLBACK CloseEnumProc(HWND hWnd, LPARAM lParam) static BOOL CALLBACK CloseEnumProc(HWND hWnd, LPARAM lParam)
{ {
if (!GetWindow(hWnd, GW_OWNER)) { if (!GetWindow(hWnd, GW_OWNER)) {
SendMessage(GetParent(hWnd), WM_MDIRESTORE, (WPARAM)hWnd, 0); SendMessage(GetParent(hWnd), WM_MDIRESTORE, (WPARAM)hWnd, 0);
@ -258,7 +258,7 @@ BOOL CALLBACK CloseEnumProc(HWND hWnd, LPARAM lParam)
return 1; return 1;
} }
void OnEnterMenuLoop(HWND hWnd) static void OnEnterMenuLoop(HWND hWnd)
{ {
int nParts; int nParts;
@ -269,7 +269,7 @@ void OnEnterMenuLoop(HWND hWnd)
SendMessage(Globals.hStatusBar, SB_SETTEXT, (WPARAM)0, (LPARAM)_T("")); SendMessage(Globals.hStatusBar, SB_SETTEXT, (WPARAM)0, (LPARAM)_T(""));
} }
void OnExitMenuLoop(HWND hWnd) static void OnExitMenuLoop(HWND hWnd)
{ {
RECT rc; RECT rc;
int nParts[3]; int nParts[3];
@ -286,7 +286,7 @@ void OnExitMenuLoop(HWND hWnd)
UpdateStatusBar(); UpdateStatusBar();
} }
void OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu) static void OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu)
{ {
TCHAR str[100]; TCHAR str[100];
@ -364,8 +364,6 @@ static void toggle_child(HWND hWnd, UINT cmd, HWND hchild)
resize_frame_client(hWnd); resize_frame_client(hWnd);
} }
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
// FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG) // FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
@ -571,7 +569,7 @@ static TBBUTTON tbButtonNew[] = {
{0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON}, {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
}; };
LRESULT MsgNotify(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam) static LRESULT MsgNotify(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam)
{ {
LPNMHDR lpnmhdr; LPNMHDR lpnmhdr;