- Timestamp:
- Oct 8, 1999, 6:13:09 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/Makefile
r1077 r1189 1 # $Id: Makefile,v 1.2 5 1999-09-28 08:00:57 dengertExp $1 # $Id: Makefile,v 1.26 1999-10-08 16:13:07 cbratschi Exp $ 2 2 3 3 # … … 27 27 defwndproc.obj syscolor.obj char.obj initterm.obj \ 28 28 uitools.obj unknown.obj spy.obj wndmsg.obj \ 29 pmwindow.obj win32class.obj win32wnd.obj win32dlg.obj \29 pmwindow.obj pmframe.obj win32class.obj win32wnd.obj win32dlg.obj \ 30 30 msgbox.obj window.obj windowmsg.obj windowclass.obj win32wbase.obj \ 31 31 windowword.obj gen_object.obj oslibwin.obj win32wndchild.obj \ … … 103 103 104 104 pmwindow.obj: pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h dc.h 105 pmframe.obj: pmframe.cpp win32class.h win32wbase.h pmframe.h win32wndchild.h 105 106 win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h 106 win32wbase.obj: win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h 107 win32wbase.obj: win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h 107 108 win32wnd.obj: win32wnd.cpp win32class.h win32wbase.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h oslibmenu.h 108 109 win32dlg.obj: win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h oslibmsg.h -
trunk/src/user32/oslibwin.cpp
r1186 r1189 1 /* $Id: oslibwin.cpp,v 1.1 6 1999-10-08 14:57:17 sandervlExp $ */1 /* $Id: oslibwin.cpp,v 1.17 1999-10-08 16:13:07 cbratschi Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 90 90 //****************************************************************************** 91 91 //****************************************************************************** 92 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle )92 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle, ULONG *borderWidth, ULONG *borderHeight) 93 93 { 94 94 *OSWinStyle = 0; 95 95 *OSFrameStyle = 0; 96 *borderWidth = 0; 97 *borderHeight = 0; 96 98 97 99 /* Window styles */ … … 126 128 dwExStyle & WS_EX_STATICEDGE_W || 127 129 dwExStyle & WS_EX_WINDOWEDGE_W) 128 *OSFrameStyle |= FCF_DLGBORDER; 130 { 131 *OSFrameStyle |= FCF_DLGBORDER; 132 *borderHeight = *borderWidth = 2; //CB: right? 133 } 129 134 130 135 if(dwStyle & WS_VSCROLL_W) … … 834 839 void OSLibSetWindowStyle(HWND hwnd, ULONG dwStyle) 835 840 { 836 ULONG OSWinStyle, OSFrameStyle ;837 838 OSLibWinConvertStyle(dwStyle, 0, &OSWinStyle, &OSFrameStyle );841 ULONG OSWinStyle, OSFrameStyle, borderWidth, borderHeight; 842 843 OSLibWinConvertStyle(dwStyle, 0, &OSWinStyle, &OSFrameStyle, &borderWidth, &borderHeight); 839 844 840 845 WinSetWindowULong(hwnd, QWL_STYLE, -
trunk/src/user32/oslibwin.h
r1186 r1189 1 /* $Id: oslibwin.h,v 1.1 1 1999-10-08 14:57:17 sandervlExp $ */1 /* $Id: oslibwin.h,v 1.12 1999-10-08 16:13:08 cbratschi Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 39 39 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame); 40 40 41 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle );41 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle, ULONG *borderWidth, ULONG *borderHeight); 42 42 void OSLibSetWindowStyle(HWND hwnd, ULONG dwStyle); 43 43 … … 57 57 ULONG OSLibDosBeep(ULONG freg,ULONG dur); 58 58 HWND OSLibWinQueryFocus(HWND hwndDeskTop); 59 60 #define OSLIB_FID_SYSMENU 0x8002 61 #define OSLIB_FID_TITLEBAR 0x8003 62 #define OSLIB_FID_MINMAX 0x8004 63 #define OSLIB_FID_MENU 0x8005 64 #define OSLIB_FID_VERTSCROLL 0x8006 65 #define OSLIB_FID_HORZSCROLL 0x8007 66 #define OSLIB_FID_CLIENT 0x8008 67 59 68 HWND OSLibWinWindowFromID(HWND hwndParent,ULONG id); 60 69 BOOL OSLibWinSetFocus(HWND hwndDeskTop,HWND hwndNewFocus, BOOL activate); … … 248 257 HWND OSLibWinObjectWindowFromID(HWND hwndOwner, ULONG ID); 249 258 250 #define OSLIB_HSCROLL 251 #define OSLIB_VSCROLL 259 #define OSLIB_HSCROLL 0 260 #define OSLIB_VSCROLL 1 252 261 BOOL OSLibWinEnableScrollBar(HWND hwndParent, int scrollBar, BOOL fEnable); 253 262 BOOL OSLibWinShowScrollBar(HWND hwndParent, HWND hwndScroll, int scrollBar, BOOL fShow); … … 255 264 ULONG OSLibWinGetScrollPos(HWND hwndParent, HWND hwndScroll); 256 265 ULONG OSLibWinSetScrollPos(HWND hwndParent, HWND hwndScroll, int pos, int fRedraw); 257 BOOL OSLibWinSetScrollRange(HWND hwndParent, HWND hwndScroll, int minpos, 266 BOOL OSLibWinSetScrollRange(HWND hwndParent, HWND hwndScroll, int minpos, 258 267 int maxpos, int fRedraw); 259 BOOL OSLibWinSetScrollPageSize(HWND hwndParent, HWND hwndScroll, int pagesize, 268 BOOL OSLibWinSetScrollPageSize(HWND hwndParent, HWND hwndScroll, int pagesize, 260 269 int totalsize, int fRedraw); 261 270 -
trunk/src/user32/win32wbase.cpp
r1186 r1189 1 /* $Id: win32wbase.cpp,v 1. 29 1999-10-08 14:57:18 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.30 1999-10-08 16:13:08 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 38 38 #include "heapshared.h" 39 39 #include "dc.h" 40 #include "pmframe.h" 40 41 41 42 #define HAS_DLGFRAME(style,exStyle) \ … … 109 110 windowId = 0xFFFFFFFF; //default = -1 110 111 userData = 0; 112 113 pOldFrameProc = NULL; 114 borderWidth = 0; 115 borderHeight = 0; 111 116 112 117 hwndLinkAfter = HWND_BOTTOM; … … 424 429 DWORD dwOSWinStyle, dwOSFrameStyle; 425 430 426 OSLibWinConvertStyle(cs->style, cs->dwExStyle, &dwOSWinStyle, &dwOSFrameStyle );431 OSLibWinConvertStyle(cs->style, cs->dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight); 427 432 428 433 //CB: dwOSFrameStyle handled by OSLibWinConvertStyle 429 // todo: subclass frame WM_PAINT -> call DrawEdge() if HAS_3DFRAME (code below) 430 // OSLibWinCreateWindow: perhaps problems 434 // OSLibWinCreateWindow: perhaps problems 431 435 // shouldn't we always use a frame? -> no problems with scrollbars 432 436 … … 527 531 } 528 532 //Subclass frame 529 if (dwStyle & WS_CHILD && HAS_3DFRAME(dwExStyle)) 533 534 if (isFrameWindow()) 530 535 { 531 //CB: use a win32 window procedure and call DrawEdge() or532 // emulate DrawEdge() in a OS/2 procedure536 pOldFrameProc = FrameSubclassFrameWindow(this); 537 if (dwStyle & WS_CHILD && HAS_3DFRAME(dwExStyle)) FrameSetBorderSize(this); 533 538 } 534 539 … … 2397 2402 ss.styleNew = value; 2398 2403 SendMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss); 2399 oldval = dwExStyle; 2400 setExStyle(value); 2404 setExStyle(ss.styleNew); 2401 2405 SendMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss); 2402 return oldval;2406 return ss.styleOld; 2403 2407 } 2404 2408 case GWL_STYLE: … … 2409 2413 ss.styleNew = value; 2410 2414 SendMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss); 2411 oldval = dwStyle; 2412 setStyle(value); 2415 setStyle(ss.styleNew); 2413 2416 OSLibSetWindowStyle(OS2HwndFrame, dwStyle); 2414 2417 SendMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss); 2415 return oldval;2418 return ss.styleOld; 2416 2419 } 2417 2420 case GWL_WNDPROC: … … 2536 2539 //****************************************************************************** 2537 2540 //****************************************************************************** 2541 Win32BaseWindow *Win32BaseWindow::GetWindowFromFrameHandle(HWND hwnd) 2542 { 2543 Win32BaseWindow *win32wnd; 2544 DWORD magic; 2545 2546 return GetWindowFromOS2Handle(OSLibWinWindowFromID(hwnd,OSLIB_FID_CLIENT)); 2547 2548 //CB: doesn't work with frame window words 2549 /* 2550 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR); 2551 magic = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC); 2552 2553 if(win32wnd && CheckMagicDword(magic)) { 2554 return win32wnd; 2555 } 2556 return 0; 2557 */ 2558 } 2559 //****************************************************************************** 2560 //****************************************************************************** 2538 2561 HWND Win32BaseWindow::Win32ToOS2Handle(HWND hwnd) 2539 2562 { -
trunk/src/user32/win32wbase.h
r1159 r1189 1 /* $Id: win32wbase.h,v 1.1 4 1999-10-07 09:28:02 sandervlExp $ */1 /* $Id: win32wbase.h,v 1.15 1999-10-08 16:13:09 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 76 76 ULONG MsgKillFocus(HWND hwnd); 77 77 ULONG MsgTimer(ULONG TimerID); 78 78 ULONG MsgScroll(ULONG msg, ULONG scrollCode, ULONG scrollPos); 79 79 ULONG MsgCommand(ULONG cmd, ULONG Id, HWND hwnd); 80 80 ULONG MsgSysCommand(ULONG win32sc, ULONG x, ULONG y); … … 199 199 static Win32BaseWindow *GetWindowFromHandle(HWND hwnd); 200 200 static Win32BaseWindow *GetWindowFromOS2Handle(HWND hwnd); 201 static Win32BaseWindow *GetWindowFromFrameHandle(HWND hwnd); 202 203 PVOID getOldFrameProc() { return pOldFrameProc; }; 204 VOID setOldFrameProc(PVOID aOldFrameProc) { pOldFrameProc = aOldFrameProc; }; 205 ULONG getBorderWidth() { return borderWidth; }; 206 ULONG getBorderHeight() { return borderHeight; }; 201 207 202 208 protected: … … 235 241 BOOL fFirstShow; 236 242 BOOL fIsDialog; 237 BOOL fInternalMsg; //Used to distinguish between messages 243 BOOL fInternalMsg; //Used to distinguish between messages 238 244 //sent by PM and those sent by apps 245 246 PVOID pOldFrameProc; 247 ULONG borderWidth; 248 ULONG borderHeight; 249 239 250 Win32BaseWindow *owner; 240 251
Note:
See TracChangeset
for help on using the changeset viewer.