- Timestamp:
- Nov 3, 1999, 8:51:44 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibwin.cpp
r1540 r1576 1 /* $Id: oslibwin.cpp,v 1.4 1 1999-11-01 19:11:40sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.42 1999-11-03 19:51:42 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 50 50 //****************************************************************************** 51 51 HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle, 52 char *pszName, HWND Owner, ULONG f Bottom, HWND *hwndFrame,52 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame, 53 53 ULONG id) 54 54 { … … 66 66 Owner = HWND_DESKTOP; 67 67 } 68 69 68 ULONG dwClientStyle; 69 #if 1 70 70 71 71 BOOL TopLevel = hwndParent == HWND_DESKTOP; 72 // if(dwFrameStyle & FCF_TITLEBAR) 73 // TopLevel = TRUE; 74 72 75 FRAMECDATA FCData = {sizeof (FRAMECDATA), 0, 0, 0}; 73 76 … … 98 101 dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB()))); 99 102 return 0; 103 #else 104 dwClientStyle = dwWinStyle & ~(WS_TABSTOP | WS_GROUP); 105 106 dwFrameStyle |= FCF_NOBYTEALIGN; 107 if (hwndParent == HWND_DESKTOP && dwFrameStyle & FCF_TITLEBAR) 108 dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER; 109 110 dwWinStyle &= ~WS_CLIPCHILDREN; 111 112 *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle, 113 &dwFrameStyle, WIN32_STDCLASS, 114 "", dwClientStyle, 0, id, &hwndClient); 115 if(*hwndFrame) { 116 if(pszName) { 117 WinSetWindowText(*hwndFrame, pszName); 118 } 119 return hwndClient; 120 } 121 dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB()))); 122 return 0; 123 #endif 100 124 } 101 125 //****************************************************************************** … … 1051 1075 OSLibWinConvertStyle(dwStyle, &dwExStyle, &OSWinStyle, &OSFrameStyle, &borderWidth, &borderHeight); 1052 1076 1053 OSWinStyle = OSWinStyle & ~(WS_TABSTOP | WS_GROUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); 1077 // OSWinStyle = OSWinStyle & ~(WS_TABSTOP | WS_GROUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); 1078 OSWinStyle = OSWinStyle & ~(WS_TABSTOP | WS_GROUP | WS_CLIPCHILDREN); 1054 1079 1055 1080 WinSetWindowULong(hwnd, QWL_STYLE, -
trunk/src/user32/pmframe.cpp
r1572 r1576 1 /* $Id: pmframe.cpp,v 1.1 8 1999-11-03 18:00:25 cbratschiExp $ */1 /* $Id: pmframe.cpp,v 1.19 1999-11-03 19:51:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 257 257 258 258 if(!win32wnd->CanReceiveSizeMsgs()) { 259 goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken 259 //SvL: Doing this breaks button.exe, header4(a).exe & style.exe 260 // goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken 260 261 break; 261 262 } … … 293 294 pswp->hwnd = hwnd; 294 295 295 goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken296 //RestoreOS2TIB();297 //return (MRESULT)0xf;296 // goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken 297 RestoreOS2TIB(); 298 return (MRESULT)0xf; 298 299 } 299 300 goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken … … 422 423 if (win32wnd->IsModalDialog()) 423 424 { 424 Win32BaseWindow *topOwner = win32wnd->getOwner()-> getTopParent();425 Win32BaseWindow *topOwner = win32wnd->getOwner()->GetTopParent(); 425 426 426 427 if (topOwner) WinSetWindowPos(topOwner->getOS2FrameWindowHandle(),hwnd,0,0,0,0,SWP_ZORDER); -
trunk/src/user32/win32dlg.cpp
r1572 r1576 1 /* $Id: win32dlg.cpp,v 1.2 8 1999-11-03 18:00:26 cbratschiExp $ */1 /* $Id: win32dlg.cpp,v 1.29 1999-11-03 19:51:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 261 261 topOwner = windowDesktop; 262 262 } 263 else topOwner = getOwner()-> getTopParent();263 else topOwner = getOwner()->GetTopParent(); 264 264 265 265 if(topOwner == NULL) { -
trunk/src/user32/win32wbase.cpp
r1572 r1576 1 /* $Id: win32wbase.cpp,v 1.7 3 1999-11-03 18:00:27 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.74 1999-11-03 19:51:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1026 1026 return SendInternalMessageA(WM_KILLFOCUS, hwnd, 0); 1027 1027 } 1028 //******************************************************************************1029 1028 //****************************************************************************** 1030 1029 //****************************************************************************** … … 1102 1101 } 1103 1102 1104 if(fClick) { 1103 if(fClick) 1104 { 1105 HWND hwndTop; 1106 1105 1107 /* Activate the window if needed */ 1106 HWND hwndTop = (getTopParent()) ? getTopParent()->getWindowHandle() : 0; 1107 1108 if (getWindowHandle() != GetActiveWindow()) 1108 if(isSubclassedOS2Wnd()) { 1109 Win32BaseWindow *parentwnd = GetWindowFromOS2FrameHandle(OSLibWinQueryWindow(OS2Hwnd, QWOS_PARENT)); 1110 if(parentwnd) { 1111 hwndTop = (parentwnd->GetTopParent()) ? parentwnd->GetTopParent()->getWindowHandle() : 0; 1112 } 1113 else hwndTop = 0; 1114 } 1115 else hwndTop = (GetTopParent()) ? GetTopParent()->getWindowHandle() : 0; 1116 1117 if (hwndTop && getWindowHandle() != GetActiveWindow()) 1109 1118 { 1110 1119 LONG ret = SendMessageA(WM_MOUSEACTIVATE, hwndTop, … … 1864 1873 window = parentwindow; 1865 1874 } 1866 }1867 //******************************************************************************1868 //******************************************************************************1869 Win32BaseWindow *Win32BaseWindow::getTopParent()1870 {1871 Win32BaseWindow *tmpWnd = this;1872 1873 while( tmpWnd && (tmpWnd->getStyle() & WS_CHILD))1874 {1875 tmpWnd = tmpWnd->getParent();1876 }1877 return tmpWnd;1878 1875 } 1879 1876 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r1572 r1576 1 /* $Id: win32wbase.h,v 1. 39 1999-11-03 18:00:29 cbratschiExp $ */1 /* $Id: win32wbase.h,v 1.40 1999-11-03 19:51:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 186 186 Win32BaseWindow *getOwner() { return owner; }; 187 187 188 Win32BaseWindow *getTopParent();189 188 SCROLLBAR_INFO *getScrollInfo(int nBar); 190 189 HWND getVertScrollHandle() { return hwndVertScroll; }; -
trunk/src/user32/winicon.cpp
r949 r1576 1 /* $Id: winicon.cpp,v 1. 1 1999-09-15 23:19:03sandervl Exp $ */1 /* $Id: winicon.cpp,v 1.2 1999-11-03 19:51:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Icon Code for OS/2 … … 55 55 //****************************************************************************** 56 56 //****************************************************************************** 57 HICON WIN32API CreateIconIndirect(LPICONINFO arg1)57 HICON WIN32API CreateIconIndirect(LPICONINFO pIcon) 58 58 { 59 #ifdef DEBUG 60 WriteLog("USER32: CreateIconIndirect\n"); 61 #endif 62 return O32_CreateIconIndirect(arg1); 59 HICON hIcon; 60 HDC hdcSrc, hdcDst; 61 62 dprintf(("USER32: CreateIconIndirect\n")); 63 if(pIcon->hbmMask && pIcon->hbmColor) 64 { 65 ICONINFO iconinfo; 66 SIZE bmpsize; 67 68 iconinfo = *pIcon; 69 if(GetBitmapDimensionEx(pIcon->hbmColor, &bmpsize) == FALSE) { 70 return 0; 71 } 72 //if there's a color bitmap, the mask bitmap contains only the AND bits 73 //Open32 calls WinCreatePointerIndirect which expects AND & XOR bits 74 //To solve this we create a bitmap that's 2x height of the mask, copy 75 //the AND bits and set the XOR bits to 0 76 hdcSrc = CreateCompatibleDC(0); 77 hdcDst = CreateCompatibleDC(0); 78 79 iconinfo.hbmMask = CreateCompatibleBitmap (hdcDst, bmpsize.cx, bmpsize.cy*2); 80 SelectObject (hdcDst, iconinfo.hbmMask); 81 SelectObject (hdcSrc, pIcon->hbmMask); 82 BitBlt (hdcDst, 0, 0, bmpsize.cx, bmpsize.cy, 83 hdcSrc, bmpsize.cx, 0, SRCCOPY); 84 PatBlt (hdcDst, bmpsize.cx, bmpsize.cy, bmpsize.cx, bmpsize.cy, BLACKNESS); 85 86 hIcon = O32_CreateIconIndirect(&iconinfo); 87 88 DeleteObject(iconinfo.hbmMask); 89 DeleteDC(hdcSrc); 90 DeleteDC(hdcDst); 91 92 return hIcon; 93 } 94 hIcon = O32_CreateIconIndirect(pIcon); 95 if(hIcon == 0) { 96 dprintf(("CreateIconIndirect %d (%d,%d) %x %x failed with %x", pIcon->fIcon, pIcon->xHotspot, pIcon->yHotspot, pIcon->hbmMask, pIcon->hbmColor, GetLastError())); 97 } 98 return hIcon; 63 99 } 64 100 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.