source: trunk/src/user32/new/pmwindow.cpp@ 715

Last change on this file since 715 was 715, checked in by dengert, 26 years ago

window creation, positioning, sizing

File size: 19.1 KB
Line 
1/* $Id: pmwindow.cpp,v 1.22 1999-08-27 17:50:56 dengert Exp $ */
2/*
3 * Win32 Window Managment Code for OS/2
4 *
5 * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
6 * Copyright 1999 Daniela Engert (dani@ngrt.de)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#define INCL_WIN
13#define INCL_GPI
14
15#include <os2.h> /* PM header file */
16#include <os2wrap.h>
17#include <stdlib.h>
18#include "win32type.h"
19#include <winconst.h>
20#include <wprocess.h>
21#include <misc.h>
22#include <win32wnd.h>
23#include <win32dlg.h>
24#include "pmwindow.h"
25#include "oslibwin.h"
26#include "oslibutil.h"
27#include "oslibgdi.h"
28#include "oslibmsg.h"
29
30HMQ hmq = 0; /* Message queue handle */
31HAB hab = 0;
32
33RECTL desktopRectl = {0};
34ULONG ScreenWidth = 0;
35ULONG ScreenHeight = 0;
36
37MRESULT EXPENTRY Win32WindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
38
39//******************************************************************************
40//Initialize PM; create hab, message queue and register special Win32 window classes
41//******************************************************************************
42BOOL InitPM()
43{
44 hab = WinInitialize(0);
45 dprintf(("Winitialize returned %x", hab));
46 hmq = WinCreateMsgQueue(hab, 0);
47
48 if(!hab || !hmq)
49 {
50 UINT error;
51 //CB: only fail on real error
52 error = WinGetLastError(hab) & 0xFFFF; //error code
53 if (!hab || error != PMERR_MSG_QUEUE_ALREADY_EXISTS)
54 {
55 dprintf(("WinInitialize or WinCreateMsgQueue failed %x %x", hab, hmq));
56 dprintf((" Error = %x",error));
57 return(FALSE);
58 }
59 else
60 {
61 if(!hab) {
62 hab = WinQueryAnchorBlock(HWND_DESKTOP);
63 dprintf(("WinQueryAnchorBlock returned %x", hab));
64 }
65 if(!hmq) {
66 hmq = HMQ_CURRENT;
67 }
68 }
69 }
70 SetThreadHAB(hab);
71 dprintf(("InitPM: hmq = %x", hmq));
72 SetThreadMessageQueue(hmq);
73
74 if(!WinRegisterClass( /* Register window class */
75 hab, /* Anchor block handle */
76 (PSZ)WIN32_STDCLASS, /* Window class name */
77 (PFNWP)Win32WindowProc, /* Address of window procedure */
78 CS_SIZEREDRAW | CS_HITTEST,
79 8)) {
80 dprintf(("WinRegisterClass Win32Window failed"));
81 return(FALSE);
82 }
83
84 WinQueryWindowRect(HWND_DESKTOP, &desktopRectl);
85 ScreenWidth = desktopRectl.xRight;
86 ScreenHeight = desktopRectl.yTop;
87
88 dprintf(("InitPM: Desktop (%d,%d)", ScreenWidth, ScreenHeight));
89 return OSLibInitMsgQueue();
90} /* End of main */
91//******************************************************************************
92//Win32 window message handler
93//******************************************************************************
94MRESULT EXPENTRY Win32WindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
95{
96 POSTMSG_PACKET *postmsg;
97 OSLIBPOINT point, ClientPoint;
98 Win32Window *win32wnd;
99 APIRET rc;
100
101 //Restore our FS selector
102 SetWin32TIB();
103
104 win32wnd = Win32Window::GetWindowFromOS2Handle(hwnd);
105
106 if(msg != WM_CREATE && win32wnd == NULL) {
107 dprintf(("Invalid win32wnd pointer for window %x!!", hwnd));
108 goto RunDefWndProc;
109 }
110 switch( msg )
111 {
112 //internal messages
113 case WM_WIN32_POSTMESSAGEA:
114 postmsg = (POSTMSG_PACKET *)mp1;
115 if(postmsg == NULL) {
116 dprintf(("WM_WIN32_POSTMESSAGEA, postmsg NULL!!"));
117 break;
118 }
119 win32wnd->SendMessageA(postmsg->Msg, postmsg->wParam, postmsg->lParam);
120 free(postmsg);
121 break;
122
123 case WM_WIN32_POSTMESSAGEW:
124 postmsg = (POSTMSG_PACKET *)mp1;
125 if(postmsg == NULL) {
126 dprintf(("WM_WIN32_POSTMESSAGEW, postmsg NULL!!"));
127 break;
128 }
129 win32wnd->SendMessageW(postmsg->Msg, postmsg->wParam, postmsg->lParam);
130 free(postmsg);
131 break;
132
133 //OS/2 msgs
134 case WM_CREATE:
135 //Processing is done in after WinCreateWindow returns
136 dprintf(("OS2: WM_CREATE %x", hwnd));
137 RestoreOS2TIB();
138 return (MRESULT)FALSE;
139
140 case WM_QUIT:
141 dprintf(("OS2: WM_QUIT %x", hwnd));
142 if(win32wnd->MsgQuit()) {
143 goto RunDefWndProc;
144 }
145 break;
146
147 case WM_CLOSE:
148 dprintf(("OS2: WM_CLOSE %x", hwnd));
149 if(win32wnd->MsgClose()) {
150 goto RunDefWndProc;
151 }
152 break;
153
154 case WM_DESTROY:
155 dprintf(("OS2: WM_DESTROY %x", hwnd));
156 if(win32wnd->MsgDestroy()) {
157 goto RunDefWndProc;
158 }
159 break;
160
161 case WM_ENABLE:
162 dprintf(("OS2: WM_ENABLE %x", hwnd));
163 if(win32wnd->MsgEnable((ULONG)mp1)) {
164 goto RunDefWndProc;
165 }
166 break;
167
168 case WM_SHOW:
169 dprintf(("OS2: WM_SHOW %x", hwnd));
170 if(win32wnd->MsgShow((ULONG)mp1)) {
171 goto RunDefWndProc;
172 }
173 break;
174
175 case WM_ADJUSTWINDOWPOS:
176 {
177 PSWP pswp = (PSWP)mp1;
178 SWP swpOld;
179 WINDOWPOS wp;
180 ULONG parentHeight = 0;
181 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE;
182
183 dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
184
185 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
186
187 WinQueryWindowPos(hwnd, &swpOld);
188
189 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
190 if (win32wnd->isChild())
191 hParent = win32wnd->getParent()->getOS2WindowHandle();
192 else
193 hFrame = win32wnd->getOS2FrameWindowHandle();
194 }
195 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame);
196
197 wp.hwnd = win32wnd->getWindowHandle();
198 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
199 {
200 Win32Window *wndAfter = Win32Window::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
201 wp.hwndInsertAfter = wndAfter->getWindowHandle();
202 }
203 win32wnd->MsgPosChanging((LPARAM)&wp);
204 break;
205 }
206
207 case WM_WINDOWPOSCHANGED:
208 {
209 PSWP pswp = (PSWP)mp1;
210 PSWP pswpo = pswp + 1;
211 WINDOWPOS wp;
212 ULONG parentHeight = 0;
213 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE;
214
215 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
216
217 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
218
219 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
220 if (win32wnd->isChild())
221 hParent = win32wnd->getParent()->getOS2WindowHandle();
222 else
223 hFrame = win32wnd->getOS2FrameWindowHandle();
224 }
225 OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswpo, hParent, hFrame);
226
227 win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);
228 win32wnd->setClientRect(pswpo->x, pswpo->y, pswpo->x + pswpo->cx, pswpo->y + pswpo->cy);
229
230 wp.hwnd = win32wnd->getWindowHandle();
231 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
232 {
233 Win32Window *wndAfter = Win32Window::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
234 wp.hwndInsertAfter = wndAfter->getWindowHandle();
235 }
236 win32wnd->MsgPosChanged((LPARAM)&wp);
237 break;
238 }
239
240 case WM_ERASEBACKGROUND:
241 {
242 return (MRESULT) FALSE;
243 }
244 case WM_SIZE:
245 {
246 SWP swp;
247
248 rc = WinQueryWindowPos(hwnd, &swp);
249 if(rc == FALSE) {
250 dprintf(("WM_SIZE: WinQueryWindowPos failed!"));
251 break;
252 }
253 dprintf(("OS2: WM_SIZE %x %x (%d,%d) (%d,%d) (%d,%d)", hwnd, swp.fl, swp.x, swp.y, swp.cx, swp.cy, SHORT1FROMMP(mp2), SHORT2FROMMP(mp2)));
254#if 0
255 if(win32wnd->MsgSize(SHORT1FROMMP(mp2), SHORT2FROMMP(mp2),
256 (swp.fl & SWP_MINIMIZE) != 0,
257 (swp.fl & SWP_MAXIMIZE) != 0))
258 {
259 goto RunDefWndProc;
260 }
261#endif
262 break;
263 }
264
265 case WM_ACTIVATE:
266 {
267 HWND hwndActivate = (HWND)mp1;
268
269 dprintf(("OS2: WM_ACTIVATE %x", hwnd));
270 if(WinQueryWindowULong(hwndActivate, OFFSET_WIN32PM_MAGIC) != WIN32PM_MAGIC) {
271 //another (non-win32) application's window
272 //set to NULL (allowed according to win32 SDK) to avoid problems
273 hwndActivate = NULL;
274 }
275 if(win32wnd->MsgActivate(1, hwndActivate)) {
276 goto RunDefWndProc;
277 }
278 break;
279 }
280 case WM_FOCUSCHANGE:
281 dprintf(("OS2: WM_FOCUSCHANGE %x", hwnd));
282 goto RunDefWndProc;
283
284 case WM_SETFOCUS:
285 {
286 HWND hwndFocus = (HWND)mp1;
287
288 dprintf(("OS2: WM_SETFOCUS %x %d", hwnd, mp2));
289 if(WinQueryWindowULong(hwndFocus, OFFSET_WIN32PM_MAGIC) != WIN32PM_MAGIC) {
290 //another (non-win32) application's window
291 //set to NULL (allowed according to win32 SDK) to avoid problems
292 hwndFocus = NULL;
293 }
294 if((ULONG)mp2 == TRUE) {
295 rc = win32wnd->MsgSetFocus(hwndFocus);
296 }
297 else rc = win32wnd->MsgKillFocus(hwndFocus);
298 if(rc) {
299 goto RunDefWndProc;
300 }
301 break;
302 }
303 //**************************************************************************
304 //Mouse messages (OS/2 Window coordinates -> Win32 coordinates relative to screen
305 //**************************************************************************
306 case WM_BUTTON1DOWN:
307 dprintf(("OS2: WM_BUTTON1DOWN %x", hwnd));
308 point.x = (*(POINTS *)&mp1).x;
309 point.y = (*(POINTS *)&mp1).y;
310 ClientPoint.x = point.x;
311 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
312 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
313 if(win32wnd->MsgButton(BUTTON_LEFTDOWN, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
314 goto RunDefWndProc;
315 }
316 break;
317
318 case WM_BUTTON1UP:
319 dprintf(("OS2: WM_BUTTON1UP %x", hwnd));
320 point.x = (*(POINTS *)&mp1).x;
321 point.y = (*(POINTS *)&mp1).y;
322 ClientPoint.x = point.x;
323 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
324 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
325 if(win32wnd->MsgButton(BUTTON_LEFTUP, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
326 goto RunDefWndProc;
327 }
328 break;
329 case WM_BUTTON1DBLCLK:
330 point.x = (*(POINTS *)&mp1).x;
331 point.y = (*(POINTS *)&mp1).y;
332 ClientPoint.x = point.x;
333 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
334 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
335 if(win32wnd->MsgButton(BUTTON_LEFTDBLCLICK, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
336 goto RunDefWndProc;
337 }
338 break;
339 case WM_BUTTON2DOWN:
340 point.x = (*(POINTS *)&mp1).x;
341 point.y = (*(POINTS *)&mp1).y;
342 ClientPoint.x = point.x;
343 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
344 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
345 if(win32wnd->MsgButton(BUTTON_RIGHTDOWN, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
346 goto RunDefWndProc;
347 }
348 break;
349 case WM_BUTTON2UP:
350 point.x = (*(POINTS *)&mp1).x;
351 point.y = (*(POINTS *)&mp1).y;
352 ClientPoint.x = point.x;
353 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
354 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
355 if(win32wnd->MsgButton(BUTTON_RIGHTUP, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
356 goto RunDefWndProc;
357 }
358 break;
359 case WM_BUTTON2DBLCLK:
360 point.x = (*(POINTS *)&mp1).x;
361 point.y = (*(POINTS *)&mp1).y;
362 ClientPoint.x = point.x;
363 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
364 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
365 if(win32wnd->MsgButton(BUTTON_RIGHTDBLCLICK, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
366 goto RunDefWndProc;
367 }
368 break;
369 case WM_BUTTON3DOWN:
370 point.x = (*(POINTS *)&mp1).x;
371 point.y = (*(POINTS *)&mp1).y;
372 ClientPoint.x = point.x;
373 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
374 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
375 if(win32wnd->MsgButton(BUTTON_MIDDLEDOWN, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
376 goto RunDefWndProc;
377 }
378 break;
379 case WM_BUTTON3UP:
380 point.x = (*(POINTS *)&mp1).x;
381 point.y = (*(POINTS *)&mp1).y;
382 ClientPoint.x = point.x;
383 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
384 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
385 if(win32wnd->MsgButton(BUTTON_MIDDLEUP, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
386 goto RunDefWndProc;
387 }
388 break;
389 case WM_BUTTON3DBLCLK:
390 point.x = (*(POINTS *)&mp1).x;
391 point.y = (*(POINTS *)&mp1).y;
392 ClientPoint.x = point.x;
393 ClientPoint.y = MapOS2ToWin32Y(hwnd, 1, point.y);
394 MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
395 if(win32wnd->MsgButton(BUTTON_MIDDLEDBLCLICK, point.x, point.y, ClientPoint.x, ClientPoint.y)) {
396 goto RunDefWndProc;
397 }
398 break;
399
400 case WM_BUTTON2MOTIONSTART:
401 case WM_BUTTON2MOTIONEND:
402 case WM_BUTTON2CLICK:
403 case WM_BUTTON1MOTIONSTART:
404 case WM_BUTTON1MOTIONEND:
405 case WM_BUTTON1CLICK:
406 case WM_BUTTON3MOTIONSTART:
407 case WM_BUTTON3MOTIONEND:
408 case WM_BUTTON3CLICK:
409 goto RunDefWndProc;
410
411 case WM_MOUSEMOVE:
412 {
413 ULONG keystate = 0;
414 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON1))
415 keystate |= WMMOVE_LBUTTON;
416 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON2))
417 keystate |= WMMOVE_MBUTTON;
418 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON3))
419 keystate |= WMMOVE_RBUTTON;
420 if(WinGetKeyState(HWND_DESKTOP, VK_SHIFT))
421 keystate |= WMMOVE_SHIFT;
422 if(WinGetKeyState(HWND_DESKTOP, VK_CTRL))
423 keystate |= WMMOVE_CTRL;
424
425 //OS/2 Window coordinates -> Win32 Window coordinates
426 //TODO: What do windows apps that handle this messages return?
427 if(!win32wnd->MsgMouseMove(keystate, SHORT1FROMMP(mp1), MapOS2ToWin32Y(win32wnd, SHORT2FROMMP(mp1)))) {
428 goto RunDefWndProc;
429 }
430 break;
431 }
432
433 //**************************************************************************
434 //Slider messages
435 //**************************************************************************
436 case WM_VSCROLL:
437 case WM_HSCROLL:
438
439 case WM_CONTROL:
440
441 case WM_COMMAND:
442 if(SHORT1FROMMP(mp2) == CMDSRC_MENU) {
443 win32wnd->MsgCommand(CMD_MENU, SHORT1FROMMP(mp1), 0);
444 }
445 if(SHORT1FROMMP(mp2) == CMDSRC_ACCELERATOR) {
446 win32wnd->MsgCommand(CMD_ACCELERATOR, SHORT1FROMMP(mp1), 0);
447 }
448 //todo controls + accelerators
449 break;
450
451 case WM_SYSCOMMAND:
452 {
453 ULONG x = 0, y = 0;
454 ULONG win32sc;
455
456 if(SHORT2FROMMP(mp2) == TRUE) {//syscommand caused by mouse action
457 POINTL pointl;
458 WinQueryPointerPos(HWND_DESKTOP, &pointl);
459 x = pointl.x;
460 y = ScreenHeight - y;
461 }
462 switch(SHORT1FROMMP(mp1)) {
463 case SC_MOVE:
464 win32sc = WIN32SC_MOVE;
465 break;
466 case SC_CLOSE:
467 win32sc = WIN32SC_CLOSE;
468 break;
469 case SC_MAXIMIZE:
470 win32sc = WIN32SC_MAXIMIZE;
471 break;
472 case SC_MINIMIZE:
473 win32sc = WIN32SC_MINIMIZE;
474 break;
475 case SC_NEXTFRAME:
476 case SC_NEXTWINDOW:
477 win32sc = WIN32SC_NEXTWINDOW;
478 break;
479 case SC_RESTORE:
480 win32sc = WIN32SC_RESTORE;
481 break;
482 case SC_TASKMANAGER:
483 win32sc = WIN32SC_TASKLIST;
484 break;
485 default:
486 goto RunDefWndProc;
487 }
488 dprintf(("WM_SYSCOMMAND %x %x (%d,%d)", hwnd, win32sc, x, y));
489 if(win32wnd->MsgSysCommand(win32sc, x, y)) {
490 goto RunDefWndProc;
491 }
492 break;
493 }
494 case WM_CHAR:
495 {
496 ULONG keyflags = 0, vkey = 0;
497 ULONG fl = SHORT1FROMMP(mp1);
498
499 if(!(fl & KC_CHAR)) {
500 dprintf(("WM_CHAR: no valid character code"));
501 goto RunDefWndProc;
502 }
503 if(fl & KC_VIRTUALKEY) {
504 vkey = SHORT2FROMMP(mp2);
505 }
506 if(fl & KC_KEYUP) {
507 keyflags |= KEY_UP;
508 }
509 if(fl & KC_ALT) {
510 keyflags |= KEY_ALTDOWN;
511 }
512 if(fl & KC_PREVDOWN) {
513 keyflags |= KEY_PREVDOWN;
514 }
515 if(fl & KC_DEADKEY) {
516 keyflags |= KEY_DEADKEY;
517 }
518 if(win32wnd->MsgChar(SHORT1FROMMP(mp2), CHAR3FROMMP(mp1), CHAR4FROMMP(mp1), vkey, keyflags)) {
519 goto RunDefWndProc;
520 }
521 break;
522 }
523 case WM_INITMENU:
524 case WM_MENUSELECT:
525 case WM_MENUEND:
526 case WM_NEXTMENU:
527
528 case WM_TIMER:
529 goto RunDefWndProc;
530
531 case WM_SETWINDOWPARAMS:
532 {
533 WNDPARAMS *wndParams = (WNDPARAMS *)mp1;
534
535 dprintf(("OS2: WM_SETWINDOWPARAMS %x", hwnd));
536 if(wndParams->fsStatus & WPM_TEXT) {
537 if(win32wnd->MsgSetText(wndParams->pszText, wndParams->cchText)) {
538 goto RunDefWndProc;
539 }
540 }
541 goto RunDefWndProc;
542 }
543
544 case WM_QUERYWINDOWPARAMS:
545 {
546 PWNDPARAMS wndpars = (PWNDPARAMS)mp1;
547 ULONG textlen;
548 PSZ wintext;
549
550 if(wndpars->fsStatus & (WPM_CCHTEXT | WPM_TEXT)) {
551 if(wndpars->fsStatus & WPM_CCHTEXT)
552 wndpars->cchText = win32wnd->MsgGetTextLength();
553 if(wndpars->fsStatus & WPM_TEXT)
554 wndpars->pszText = win32wnd->MsgGetText();
555 return (MRESULT)TRUE;
556 }
557 goto RunDefWndProc;
558 }
559
560 case WM_PAINT:
561 dprintf(("OS2: WM_PAINT %x", hwnd));
562 if(win32wnd->MsgPaint(0, 0)) {
563 goto RunDefWndProc;
564 }
565 break;
566
567 case WM_HITTEST:
568 if(win32wnd->MsgHitTest((*(POINTS *)&mp1).x, MapOS2ToWin32Y(OSLIB_HWND_DESKTOP, hwnd, (*(POINTS *)&mp1).y))) {
569 goto RunDefWndProc;
570 }
571 break;
572
573 case WM_SYSCOLORCHANGE:
574 case WM_SYSVALUECHANGED:
575 case WM_CALCVALIDRECTS:
576 case WM_SETSELECTION:
577 case WM_PPAINT:
578 case WM_PSETFOCUS:
579 case WM_PSYSCOLORCHANGE:
580 case WM_PSIZE:
581 case WM_PACTIVATE:
582 case WM_PCONTROL:
583 case WM_HELP:
584 case WM_APPTERMINATENOTIFY:
585 case WM_PRESPARAMCHANGED:
586 case WM_DRAWITEM:
587 case WM_MEASUREITEM:
588 case WM_CONTROLPOINTER:
589 case WM_QUERYDLGCODE:
590 case WM_SUBSTITUTESTRING:
591 case WM_MATCHMNEMONIC:
592 case WM_SAVEAPPLICATION:
593 case WM_SEMANTICEVENT:
594 default:
595// dprintf(("OS2: RunDefWndProc msg %x for %x", msg, hwnd));
596 RestoreOS2TIB();
597 return WinDefWindowProc( hwnd, msg, mp1, mp2 );
598 }
599 RestoreOS2TIB();
600 return (MRESULT)FALSE;
601
602RunDefWndProc:
603// dprintf(("OS2: RunDefWndProc msg %x for %x", msg, hwnd));
604 RestoreOS2TIB();
605 return WinDefWindowProc( hwnd, msg, mp1, mp2 );
606} /* End of Win32WindowProc */
607//******************************************************************************
608//******************************************************************************
Note: See TracBrowser for help on using the repository browser.