Changeset 10316 for trunk/src/user32/pmwindow.cpp
- Timestamp:
- Nov 12, 2003, 3:13:26 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r10285 r10316 1 /* $Id: pmwindow.cpp,v 1.22 3 2003-10-22 12:43:51sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.224 2003-11-12 14:10:19 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 59 59 #include "menu.h" 60 60 #include "user32api.h" 61 #include <kbdhook.h> 61 62 62 63 #define DBG_LOCALLOG DBG_pmwindow 63 64 #include "dbglocal.h" 64 65 66 65 67 #define ODIN_SetExceptionHandler(a) 66 68 #define ODIN_UnsetExceptionHandler(a) 67 68 69 69 70 // Notification that focus change has completed (UNDOCUMENTED) … … 84 85 BOOL fDragDropDisabled = FALSE; 85 86 86 const char WIN32_CDCLASS[] = "Win32CDWindowClass";87 char WIN32_STDCLASS[255] = "Win32WindowClass";87 const char WIN32_CDCLASS[] = ODIN_WIN32_CDCLASS; 88 char WIN32_STDCLASS[255] = ODIN_WIN32_STDCLASS; 88 89 89 90 #define PMMENU_MINBUTTON 0 … … 190 191 SetThreadMessageQueue(hmq); 191 192 193 //initialize keyboard hook for first thread 194 hookInit(hab); 195 192 196 BOOL rc = WinSetCp(hmq, GetDisplayCodepage()); 193 197 dprintf(("InitPM: WinSetCP was %sOK", rc ? "" : "not ")); … … 255 259 // query the font height to find out whether we have small or large fonts 256 260 DevQueryCaps(hdc, CAPS_GRAPHICS_CHAR_HEIGHT, 1, (PLONG)&CapsCharHeight); 261 dprintf(("CAPS_GRAPHICS_CHAR_HEIGHT = %d", CapsCharHeight)); 262 if(CapsCharHeight > 16) { 263 CapsCharHeight = 16; 264 } 265 266 #ifdef DEBUG 267 ULONG temp; 268 DevQueryCaps(hdc, CAPS_GRAPHICS_CHAR_WIDTH, 1, (PLONG)&temp); 269 dprintf(("CAPS_GRAPHICS_CHAR_WIDTH = %d", temp)); 270 DevQueryCaps(hdc, CAPS_CHAR_HEIGHT, 1, (PLONG)&temp); 271 dprintf(("CAPS_CHAR_HEIGTH = %d", temp)); 272 DevQueryCaps(hdc, CAPS_CHAR_WIDTH, 1, (PLONG)&temp); 273 dprintf(("CAPS_CHAR_WIDTH = %d", temp)); 274 DevQueryCaps(hdc, CAPS_SMALL_CHAR_HEIGHT, 1, (PLONG)&temp); 275 dprintf(("CAPS_SMALL_CHAR_HEIGTH = %d", temp)); 276 DevQueryCaps(hdc, CAPS_SMALL_CHAR_WIDTH, 1, (PLONG)&temp); 277 dprintf(("CAPS_SMALL_CHAR_WIDTH = %d", temp)); 278 DevQueryCaps(hdc, CAPS_VERTICAL_FONT_RES, 1,(PLONG)&temp); 279 dprintf(("CAPS_VERTICAL_FONT_RES = %d", temp)); 280 DevQueryCaps(hdc, CAPS_HORIZONTAL_FONT_RES, 1,(PLONG)&temp); 281 dprintf(("CAPS_HORIZONTAL_FONT_RES = %d", temp)); 282 #endif 257 283 258 284 DevCloseDC(hdc); 259 285 260 dprintf(("InitPM: Desktop (%d,%d) bpp %d ", ScreenWidth, ScreenHeight, ScreenBitsPerPel));286 dprintf(("InitPM: Desktop (%d,%d) bpp %d font size %d", ScreenWidth, ScreenHeight, ScreenBitsPerPel, CapsCharHeight)); 261 287 return TRUE; 262 288 } /* End of main */ … … 638 664 639 665 case WM_SHOW: 666 { 640 667 dprintf(("OS2: WM_SHOW %x %d", hwnd, mp1)); 641 668 win32wnd->MsgShow((ULONG)mp1); 642 break; 669 670 //if a child window is hidden, then the update region of the 671 //parent changes and a WM_ERASEBKGND is required during the next 672 //BeginPaint call. 673 if((ULONG)mp1 == FALSE) 674 { 675 Win32BaseWindow *parent = win32wnd->getParent(); 676 if(parent) { 677 dprintf(("PM Update region changed for parent %x", win32wnd->getWindowHandle())); 678 parent->SetPMUpdateRegionChanged(TRUE); 679 } 680 } 681 break; 682 } 643 683 644 684 case WM_ACTIVATE: … … 658 698 { 659 699 dprintf(("OS2: WM_SIZE (%d,%d) (%d,%d)", SHORT1FROMMP(mp2), SHORT2FROMMP(mp2), SHORT1FROMMP(mp1), SHORT2FROMMP(mp1))); 660 win32wnd->Set VisibleRegionChanged(TRUE);700 win32wnd->SetPMUpdateRegionChanged(TRUE); 661 701 goto RunDefWndProc; 662 702 } … … 1267 1307 case WM_PAINT: 1268 1308 { 1269 RECTL rectl; 1309 RECTL rectl; 1310 HRGN hrgn; 1311 1312 hrgn = CreateRectRgn(0, 0, 0, 0); 1313 GetUpdateRgnFrame(win32wnd->getWindowHandle(), hrgn); 1270 1314 1271 1315 HPS hps = WinBeginPaint(hwnd, NULL, &rectl); … … 1285 1329 1286 1330 mapOS2ToWin32Rect(win32wnd->getWindowHeight(), (PRECTLOS2)&rectl, &rectUpdate); 1287 win32wnd->MsgNCPaint(&rectUpdate );1331 win32wnd->MsgNCPaint(&rectUpdate, hrgn); 1288 1332 } 1289 1333 } 1290 1334 WinEndPaint(hps); 1335 1336 DeleteObject(hrgn); 1291 1337 break; 1292 1338 } … … 1599 1645 if ((pswp->fl & SWP_MAXIMIZE) && (win32wnd->getExStyle() & WS_EX_MDICHILD_W)) 1600 1646 { 1601 SendMessageA(win32wnd->getWindowHandle(), WM_SYSCOMMAND_W, SC_MAXIMIZE_W, 0);1602 goto PosChangedEnd;1647 SendMessageA(win32wnd->getWindowHandle(), WM_SYSCOMMAND_W, SC_MAXIMIZE_W, 0); 1648 goto PosChangedEnd; 1603 1649 } 1604 1650 … … 2478 2524 //****************************************************************************** 2479 2525 //****************************************************************************** 2526 char *WIN32API QueryCustomStdClassName() 2527 { 2528 return WIN32_STDCLASS; 2529 } 2530 //****************************************************************************** 2531 //****************************************************************************** 2480 2532 2481 2533 #ifdef DEBUG
Note:
See TracChangeset
for help on using the changeset viewer.