Changeset 760 for trunk/src/user32/new/win32wmdichild.cpp
- Timestamp:
- Aug 31, 1999, 7:14:52 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/win32wmdichild.cpp
r750 r760 1 /* $Id: win32wmdichild.cpp,v 1. 1 1999-08-31 10:36:23sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.2 1999-08-31 17:14:51 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 9 9 * Copyright 1994, Bob Amstadt 10 10 * 1995,1996 Alex Korobka 11 * 12 * 13 * TODO: See #if 0's 11 14 * 12 15 * Project Odin Software License can be found in LICENSE.TXT … … 50 53 { 51 54 } 55 //****************************************************************************** 56 //****************************************************************************** 57 LRESULT Win32MDIChildWindow::DefMDIChildProcA(UINT Msg, WPARAM wParam, LPARAM lParam) 58 { 59 Win32MDIClientWindow *client = (Win32MDIClientWindow *)getParent(); 60 61 switch (Msg) 62 { 63 case WM_SETTEXT: 64 DefWindowProcA(Msg, wParam, lParam); 65 menuModifyItem(); 66 #if 0 67 if( client->getMaximizedChild() == this ) 68 MDI_UpdateFrameText( clientWnd->parent, ci->self, MDI_REPAINTFRAME, NULL ); 69 #endif 70 return 0; 71 72 case WM_GETMINMAXINFO: 73 { 74 childGetMinMaxInfo((MINMAXINFO *)lParam); 75 return 0; 76 } 77 78 case WM_MENUCHAR: 79 /* MDI children don't have menu bars */ 80 client->PostMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)LOWORD(wParam) ); 81 return 0x00010000L; 82 83 case WM_CLOSE: 84 client->SendMessageA(WM_MDIDESTROY,(WPARAM16)getWindowHandle(), 0L); 85 return 0; 86 87 case WM_SETFOCUS: 88 if(client->getActiveChild() != this ) 89 client->childActivate(this); 90 break; 91 92 case WM_CHILDACTIVATE: 93 client->childActivate(this); 94 return 0; 95 96 case WM_NCPAINT: 97 break; 98 99 case WM_SYSCOMMAND: 100 switch( wParam ) 101 { 102 case SC_MOVE: 103 if( client->getMaximizedChild() == this) 104 { 105 return 0; 106 } 107 break; 108 case SC_RESTORE: 109 case SC_MINIMIZE: 110 setStyle(getStyle() | WS_SYSMENU); 111 break; 112 113 case SC_MAXIMIZE: 114 if( client->getMaximizedChild() == this) 115 { 116 return client->SendMessageA(Msg, wParam, lParam); 117 } 118 setStyle(getStyle() & ~WS_SYSMENU); 119 break; 120 121 case SC_NEXTWINDOW: 122 client->SendMessageA(WM_MDINEXT, 0, 0); 123 return 0; 124 125 case SC_PREVWINDOW: //WM_MDINEXT?? 126 client->SendMessageA(WM_MDINEXT, 0, 0); 127 return 0; 128 } 129 break; 130 131 case WM_SETVISIBLE: 132 #if 0 133 if( client->getMaximizedChild()) ci->mdiFlags &= ~MDIF_NEEDUPDATE; 134 else 135 MDI_PostUpdate(clientWnd->hwndSelf, ci, SB_BOTH+1); 136 #endif 137 break; 138 139 #if 0 140 case WM_SIZE: 141 /* do not change */ 142 143 if( ci->hwndActiveChild == hwnd && wParam != SIZE_MAXIMIZED ) 144 { 145 ci->hwndChildMaximized = 0; 146 147 MDI_RestoreFrameMenu( clientWnd->parent, hwnd); 148 MDI_UpdateFrameText( clientWnd->parent, ci->self, 149 MDI_REPAINTFRAME, NULL ); 150 } 151 152 if( wParam == SIZE_MAXIMIZED ) 153 { 154 HWND16 hMaxChild = ci->hwndChildMaximized; 155 156 if( hMaxChild == hwnd ) break; 157 158 if( hMaxChild) 159 { 160 SendMessage16( hMaxChild, WM_SETREDRAW, FALSE, 0L ); 161 162 MDI_RestoreFrameMenu( clientWnd->parent, hMaxChild); 163 ShowWindow16( hMaxChild, SW_SHOWNOACTIVATE); 164 165 SendMessage16( hMaxChild, WM_SETREDRAW, TRUE, 0L ); 166 } 167 168 ci->hwndChildMaximized = hwnd; /* !!! */ 169 ci->hwndActiveChild = hwnd; 170 171 MDI_AugmentFrameMenu( ci, clientWnd->parent, hwnd); 172 MDI_UpdateFrameText( clientWnd->parent, ci->self, 173 MDI_REPAINTFRAME, NULL ); 174 } 175 176 if( wParam == SIZE_MINIMIZED ) 177 { 178 HWND16 switchTo = MDI_GetWindow(clientWnd, hwnd, TRUE, WS_MINIMIZE); 179 180 if( switchTo ) 181 SendMessage16( switchTo, WM_CHILDACTIVATE, 0, 0L); 182 } 183 184 MDI_PostUpdate(clientWnd->hwndSelf, ci, SB_BOTH+1); 185 break; 186 #endif 187 188 #if 0 189 case WM_NEXTMENU: 190 if( wParam == VK_LEFT ) /* switch to frame system menu */ 191 { 192 return MAKELONG( GetSubMenu(clientWnd->parent->hSysMenu, 0), 193 clientWnd->parent->hwndSelf ); 194 goto END; 195 } 196 if( wParam == VK_RIGHT ) /* to frame menu bar */ 197 { 198 retvalue = MAKELONG( clientWnd->parent->wIDmenu, 199 clientWnd->parent->hwndSelf ); 200 goto END; 201 } 202 #endif 203 case WM_SYSCHAR: 204 if (wParam == '-') 205 { 206 SendMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE); 207 return 0; 208 } 209 } 210 return DefWindowProcA(Msg, wParam, lParam); 211 } 212 //****************************************************************************** 213 //****************************************************************************** 214 LRESULT Win32MDIChildWindow::DefMDIChildProcW(UINT Msg, WPARAM wParam, LPARAM lParam) 215 { 216 switch (Msg) 217 { 218 case WM_SETTEXT: 219 DefWindowProcW(Msg, wParam, lParam); 220 menuModifyItem(); 221 #if 0 222 if( client->getMaximizedChild() == this ) 223 MDI_UpdateFrameText( clientWnd->parent, ci->self, MDI_REPAINTFRAME, NULL ); 224 #endif 225 return 0; 226 227 case WM_GETMINMAXINFO: 228 case WM_MENUCHAR: 229 case WM_CLOSE: 230 case WM_SETFOCUS: 231 case WM_CHILDACTIVATE: 232 case WM_NCPAINT: 233 case WM_SYSCOMMAND: 234 case WM_SETVISIBLE: 235 case WM_SIZE: 236 case WM_NEXTMENU: 237 return DefMDIChildProcA(Msg, wParam, lParam ); 238 239 case WM_SYSCHAR: 240 if (wParam == '-') 241 { 242 SendMessageW(WM_SYSCOMMAND, SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE); 243 return 0; 244 } 245 break; 246 } 247 return DefWindowProcW(Msg, wParam, lParam); 248 } 52 249 /********************************************************************** 53 250 * MDICreateChild
Note:
See TracChangeset
for help on using the changeset viewer.