- Timestamp:
- Jun 21, 1999, 2:48:57 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/defwndproc.cpp
r134 r140 1 /* $Id: defwndproc.cpp,v 1. 3 1999-06-20 16:47:39 sandervlExp $ */1 /* $Id: defwndproc.cpp,v 1.4 1999-06-21 00:48:57 buerkle Exp $ */ 2 2 3 3 /* … … 23 23 switch(Msg) { 24 24 case WM_SETREDRAW: //Open32 does not set the visible flag 25 { 26 long dwStyle = GetWindowLongA (hwnd, GWL_STYLE); 27 if(wParam) 28 SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE); 29 else 30 SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE); 31 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 32 } 25 if(wParam) 26 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 27 else 28 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 29 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 33 30 case WM_NCCREATE://SvL: YAFMO (yet another feature missing in Open32) 34 31 return(TRUE); … … 61 58 switch(Msg) { 62 59 case WM_SETREDRAW: //Open32 does not set the visible flag 63 { 64 long dwStyle = GetWindowLongA (hwnd, GWL_STYLE); 65 if(wParam) 66 SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE); 67 else 68 SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE); 69 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 70 } 71 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 72 return(TRUE); 73 case WM_CTLCOLORMSGBOX: 74 case WM_CTLCOLOREDIT: 75 case WM_CTLCOLORLISTBOX: 76 case WM_CTLCOLORBTN: 77 case WM_CTLCOLORDLG: 78 case WM_CTLCOLORSTATIC: 79 case WM_CTLCOLORSCROLLBAR: 80 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 81 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 82 return GetSysColorBrush(COLOR_BTNFACE); 83 84 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 85 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 86 return 0; 87 88 default: 60 if(wParam) 61 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 62 else 63 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 89 64 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 65 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 66 return(TRUE); 67 case WM_CTLCOLORMSGBOX: 68 case WM_CTLCOLOREDIT: 69 case WM_CTLCOLORLISTBOX: 70 case WM_CTLCOLORBTN: 71 case WM_CTLCOLORDLG: 72 case WM_CTLCOLORSTATIC: 73 case WM_CTLCOLORSCROLLBAR: 74 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 75 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 76 return GetSysColorBrush(COLOR_BTNFACE); 77 78 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 79 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 80 return 0; 81 82 default: 83 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 90 84 } 91 85 } … … 99 93 switch(Msg) { 100 94 case WM_SETREDRAW: //Open32 does not set the visible flag 101 { 102 long dwStyle = GetWindowLongA (hwnd, GWL_STYLE); 103 if(wParam) 104 SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE); 105 else 106 SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE); 107 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 108 } 109 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 110 return(TRUE); 111 case WM_CTLCOLORMSGBOX: 112 case WM_CTLCOLOREDIT: 113 case WM_CTLCOLORLISTBOX: 114 case WM_CTLCOLORBTN: 115 case WM_CTLCOLORDLG: 116 case WM_CTLCOLORSTATIC: 117 case WM_CTLCOLORSCROLLBAR: 118 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 119 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 120 return GetSysColorBrush(COLOR_BTNFACE); 121 122 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 123 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 124 return 0; 125 126 default: 95 if(wParam) 96 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 97 else 98 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 127 99 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 100 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 101 return(TRUE); 102 case WM_CTLCOLORMSGBOX: 103 case WM_CTLCOLOREDIT: 104 case WM_CTLCOLORLISTBOX: 105 case WM_CTLCOLORBTN: 106 case WM_CTLCOLORDLG: 107 case WM_CTLCOLORSTATIC: 108 case WM_CTLCOLORSCROLLBAR: 109 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 110 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 111 return GetSysColorBrush(COLOR_BTNFACE); 112 113 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 114 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 115 return 0; 116 117 default: 118 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 128 119 } 129 120 } … … 138 129 switch(Msg) { 139 130 case WM_SETREDRAW: //Open32 does not set the visible flag 140 { 141 long dwStyle = GetWindowLongA (hwnd, GWL_STYLE); 142 if(wParam) 143 SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE); 144 else 145 SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE); 146 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 147 } 148 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 149 return(TRUE); 150 case WM_CTLCOLORMSGBOX: 151 case WM_CTLCOLOREDIT: 152 case WM_CTLCOLORLISTBOX: 153 case WM_CTLCOLORBTN: 154 case WM_CTLCOLORDLG: 155 case WM_CTLCOLORSTATIC: 156 case WM_CTLCOLORSCROLLBAR: 157 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 158 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 159 return GetSysColorBrush(COLOR_BTNFACE); 160 161 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 162 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 163 return 0; 164 165 default: 131 if(wParam) 132 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 133 else 134 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 166 135 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 136 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 137 return(TRUE); 138 case WM_CTLCOLORMSGBOX: 139 case WM_CTLCOLOREDIT: 140 case WM_CTLCOLORLISTBOX: 141 case WM_CTLCOLORBTN: 142 case WM_CTLCOLORDLG: 143 case WM_CTLCOLORSTATIC: 144 case WM_CTLCOLORSCROLLBAR: 145 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 146 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 147 return GetSysColorBrush(COLOR_BTNFACE); 148 149 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 150 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 151 return 0; 152 153 default: 154 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 167 155 } 168 156 } … … 176 164 switch(Msg) { 177 165 case WM_SETREDRAW: //Open32 does not set the visible flag 178 { 179 //Frame 180 long dwStyle = GetWindowLongA (hwndFrame, GWL_STYLE); 181 if(wParam) 182 SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle | WS_VISIBLE); 183 else 184 SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle & ~WS_VISIBLE); 185 return O32_DefWindowProc(hwndFrame, Msg, wParam, lParam); 186 //Client 187 dwStyle = GetWindowLongA (hwndClient, GWL_STYLE); 188 if(wParam) 189 SetWindowLongA (hwndClient, GWL_STYLE, dwStyle | WS_VISIBLE); 190 else 191 SetWindowLongA (hwndClient, GWL_STYLE, dwStyle & ~WS_VISIBLE); 192 return O32_DefWindowProc(hwndClient, Msg, wParam, lParam); 193 } 166 if(wParam) 167 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) | WS_VISIBLE); 168 else 169 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) & ~WS_VISIBLE); 170 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam); 194 171 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 195 172 return(TRUE); … … 223 200 switch(Msg) { 224 201 case WM_SETREDRAW: //Open32 does not set the visible flag 225 { 226 //Frame 227 long dwStyle = GetWindowLongA (hwndFrame, GWL_STYLE); 228 if(wParam) 229 SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle | WS_VISIBLE); 230 else 231 SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle & ~WS_VISIBLE); 232 return O32_DefWindowProc(hwndFrame, Msg, wParam, lParam); 233 //Client 234 dwStyle = GetWindowLongA (hwndClient, GWL_STYLE); 235 if(wParam) 236 SetWindowLongA (hwndClient, GWL_STYLE, dwStyle | WS_VISIBLE); 237 else 238 SetWindowLongA (hwndClient, GWL_STYLE, dwStyle & ~WS_VISIBLE); 239 return O32_DefWindowProc(hwndClient, Msg, wParam, lParam); 240 } 202 if(wParam) 203 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) | WS_VISIBLE); 204 else 205 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) & ~WS_VISIBLE); 206 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam); 241 207 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 242 208 return(TRUE); … … 269 235 switch(Msg) { 270 236 case WM_SETREDRAW: //Open32 does not set the visible flag 271 { 272 long dwStyle = GetWindowLongA (hwnd, GWL_STYLE); 273 if(wParam) 274 SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE); 275 else 276 SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE); 277 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 278 } 279 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 280 return(TRUE); 281 case WM_CTLCOLORMSGBOX: 282 case WM_CTLCOLOREDIT: 283 case WM_CTLCOLORLISTBOX: 284 case WM_CTLCOLORBTN: 285 case WM_CTLCOLORDLG: 286 case WM_CTLCOLORSTATIC: 287 case WM_CTLCOLORSCROLLBAR: 288 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 289 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 290 return GetSysColorBrush(COLOR_BTNFACE); 291 292 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 293 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 294 return 0; 295 296 default: 237 if(wParam) 238 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 239 else 240 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 297 241 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 242 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 243 return(TRUE); 244 case WM_CTLCOLORMSGBOX: 245 case WM_CTLCOLOREDIT: 246 case WM_CTLCOLORLISTBOX: 247 case WM_CTLCOLORBTN: 248 case WM_CTLCOLORDLG: 249 case WM_CTLCOLORSTATIC: 250 case WM_CTLCOLORSCROLLBAR: 251 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 252 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 253 return GetSysColorBrush(COLOR_BTNFACE); 254 255 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 256 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 257 return 0; 258 259 default: 260 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 298 261 } 299 262 } … … 308 271 switch(Msg) { 309 272 case WM_SETREDRAW: //Open32 does not set the visible flag 310 { 311 long dwStyle = GetWindowLongA (hwnd, GWL_STYLE); 312 if(wParam) 313 SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE); 314 else 315 SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE); 316 return O32_DefWindowProc(hwnd, Msg, wParam, lParam); 317 } 318 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 319 return(TRUE); 320 case WM_CTLCOLORMSGBOX: 321 case WM_CTLCOLOREDIT: 322 case WM_CTLCOLORLISTBOX: 323 case WM_CTLCOLORBTN: 324 case WM_CTLCOLORDLG: 325 case WM_CTLCOLORSTATIC: 326 case WM_CTLCOLORSCROLLBAR: 327 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 328 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 329 return GetSysColorBrush(COLOR_BTNFACE); 330 331 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 332 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 333 return 0; 334 335 default: 273 if(wParam) 274 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 275 else 276 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 336 277 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 337 } 338 } 339 //****************************************************************************** 340 //****************************************************************************** 278 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 279 return(TRUE); 280 case WM_CTLCOLORMSGBOX: 281 case WM_CTLCOLOREDIT: 282 case WM_CTLCOLORLISTBOX: 283 case WM_CTLCOLORBTN: 284 case WM_CTLCOLORDLG: 285 case WM_CTLCOLORSTATIC: 286 case WM_CTLCOLORSCROLLBAR: 287 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 288 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 289 return GetSysColorBrush(COLOR_BTNFACE); 290 291 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 292 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 293 return 0; 294 295 default: 296 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 297 } 298 } 299 //****************************************************************************** 300 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.