Changeset 11993
- Timestamp:
- Oct 22, 1999, 8:11:51 PM (26 years ago)
- Location:
- tags/trunk/src/user32
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/user32/USER32.DEF ¶
r11667 r11993 1 ; $Id: USER32.DEF,v 1.1 4 1999-09-28 08:00:57 dengertExp $1 ; $Id: USER32.DEF,v 1.15 1999-10-22 18:11:41 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 10 10 11 11 IMPORTS 12 WinSetDAXData= PMMERGE.544813 GpiQueryDCData= PMGPI.66514 GpiEnableYInversion= PMGPI.72315 HPSToHDC= PMWINX.102216 DeleteHDC= PMWINX.102317 _ DestroyCaret = PMMERGE.1000118 _ GetCaretBlinkTime = PMMERGE.1000219 _ HideCaret = PMMERGE.1000420 _ SetCaretBlinkTime = PMMERGE.1000521 _ ShowCaret = PMMERGE.1000712 _WinSetDAXData = PMMERGE.5448 13 _GpiQueryDCData = PMGPI.665 14 _GpiEnableYInversion = PMGPI.723 15 _HPSToHDC = PMWINX.1022 16 _DeleteHDC = PMWINX.1023 17 __DestroyCaret = PMMERGE.10001 18 __GetCaretBlinkTime = PMMERGE.10002 19 __HideCaret = PMMERGE.10004 20 __SetCaretBlinkTime = PMMERGE.10005 21 __ShowCaret = PMMERGE.10007 22 22 23 23 EXPORTS … … 629 629 GetSysColorPen = _GetSysColorPen@4 @2002 630 630 ; COMCTL32 helper functions 631 NativeDlgBoxIP = _NativeDlgBoxIP@24 @2003632 NativeCreateDlgIP = _NativeCreateDlgIP@24 @2004633 631 NativeLoadBitmap = _NativeLoadBitmap@8 @2005 634 632 -
TabularUnified tags/trunk/src/user32/caret.cpp ¶
r11757 r11993 1 /* $Id: caret.cpp,v 1. 5 1999-10-07 15:44:15 cbratschiExp $ */1 /* $Id: caret.cpp,v 1.6 1999-10-22 18:11:42 sandervl Exp $ */ 2 2 3 3 /* … … 10 10 #define INCL_WIN 11 11 #define INCL_GPI 12 #include <os2 .h>12 #include <os2wrap.h> 13 13 #include <os2sel.h> 14 14 #include <stdlib.h> … … 20 20 #include "oslibwin.h" 21 21 #include "dcdata.h" 22 #define INCLUDED_BY_DC 22 23 #include "dc.h" 23 24 #include "caret.h" … … 40 41 #pragma data_seg() 41 42 42 PVOID APIENTRY GpiQueryDCData (HPS hps);43 VOID OPEN32API _O32_SetLastError( DWORD );44 BOOL OPEN32API _O32_CreateCaret (HWND hwnd, HBITMAP hbm, int width, int height);45 BOOL APIENTRY _DestroyCaret (void);46 UINT APIENTRY _GetCaretBlinkTime (void);47 BOOL APIENTRY _HideCaret (HWND hwnd);48 BOOL APIENTRY _SetCaretBlinkTime (UINT mSecs);49 BOOL APIENTRY _ShowCaret (HWND hwnd);50 43 51 44 BOOL WIN32API CreateCaret (HWND hwnd, HBITMAP hBmp, int width, int height) … … 64 57 if (!wnd) return (FALSE); 65 58 66 USHORT sel = RestoreOS2FS();67 59 wnd->SetFakeOpen32(); 68 60 … … 77 69 78 70 wnd->RemoveFakeOpen32(); 79 SetFS(sel);80 71 return (rc); 81 72 } … … 85 76 { 86 77 BOOL rc; 87 USHORT sel = RestoreOS2FS();88 78 89 79 dprintf(("USER32: DestroyCaret")); … … 97 87 rc = _DestroyCaret(); 98 88 99 SetFS(sel);100 89 return (rc); 101 90 } … … 103 92 BOOL WIN32API SetCaretBlinkTime (UINT mSecs) 104 93 { 105 USHORT sel = RestoreOS2FS();106 94 BOOL rc; 107 95 … … 110 98 rc = _SetCaretBlinkTime (mSecs); 111 99 112 SetFS(sel);113 100 return (rc); 114 101 } … … 117 104 { 118 105 UINT rc; 119 USHORT sel = RestoreOS2FS();120 106 121 107 dprintf(("USER32: GetCaretBlinkTime")); 122 108 123 109 rc = _GetCaretBlinkTime(); 124 125 SetFS(sel);126 110 return (rc); 127 111 } … … 129 113 BOOL WIN32API SetCaretPos (int x, int y) 130 114 { 131 USHORT sel = RestoreOS2FS();132 115 LONG xNew = 0, yNew = 0; 133 116 BOOL result = TRUE; … … 152 135 { 153 136 _O32_SetLastError (ERROR_INTERNAL_ERROR); 154 SetFS(sel);155 137 return FALSE; 156 138 } … … 184 166 } 185 167 186 SetFS(sel);187 168 return (result); 188 169 } … … 190 171 BOOL WIN32API GetCaretPos (PPOINT pPoint) 191 172 { 192 USHORT sel = RestoreOS2FS();193 173 CURSORINFO cursorInfo; 194 174 … … 207 187 else 208 188 { 209 SetFS(sel);210 189 return FALSE; 211 190 } … … 225 204 pPoint->y = cursorInfo.y; 226 205 227 SetFS(sel);228 206 return TRUE; 229 207 } 230 208 else 231 209 { 232 SetFS(sel);233 210 return FALSE; 234 211 } … … 237 214 BOOL WIN32API ShowCaret (HWND hwnd) 238 215 { 239 USHORT sel = RestoreOS2FS();240 216 BOOL rc = FALSE; 241 217 … … 245 221 rc = _ShowCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 246 222 247 SetFS(sel);248 223 return (rc); 249 224 } … … 251 226 BOOL WIN32API HideCaret (HWND hwnd) 252 227 { 253 USHORT sel = RestoreOS2FS();254 228 BOOL rc = FALSE; 255 229 … … 259 233 rc = _HideCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 260 234 261 SetFS(sel);262 235 return (rc); 263 236 } -
TabularUnified tags/trunk/src/user32/caret.h ¶
r11743 r11993 1 /* $Id: caret.h,v 1. 2 1999-10-06 10:36:39 dengertExp $ */1 /* $Id: caret.h,v 1.3 1999-10-22 18:11:43 sandervl Exp $ */ 2 2 3 3 /* … … 12 12 extern BOOL WIN32API GetCaretPos (PPOINT pPoint); 13 13 14 15 -
TabularUnified tags/trunk/src/user32/dc.cpp ¶
r11939 r11993 1 /* $Id: dc.cpp,v 1.1 6 1999-10-18 11:59:57sandervl Exp $ */1 /* $Id: dc.cpp,v 1.17 1999-10-22 18:11:43 sandervl Exp $ */ 2 2 3 3 /* … … 13 13 14 14 #include <odin.h> 15 #include <odinwrap.h>16 #include <os2sel.h>17 15 18 16 #define INCL_WIN … … 20 18 #define INCL_GREALL 21 19 #define INCL_DEV 22 #include <os2 .h>20 #include <os2wrap.h> 23 21 #include <pmddi.h> 24 22 #include <stdlib.h> 23 25 24 #include "win32type.h" 26 25 #include <winconst.h> 27 #include <wprocess.h>28 26 #include <misc.h> 29 27 #include <win32wbase.h> … … 33 31 #include "dcdata.h" 34 32 35 ODINDEBUGCHANNEL(USER32-DC) 33 #define INCLUDED_BY_DC 34 #include "dc.h" 36 35 37 36 #undef SEVERITY_ERROR 38 37 #include <winerror.h> 39 40 #ifndef OPEN32API41 #define OPEN32API _System42 #endif43 44 /*********************/45 typedef struct46 {47 HDC hdc;48 BOOL fErase;49 RECT rcPaint;50 BOOL fRestore;51 BOOL IncUpdate;52 BYTE rgbReserved[32];53 } PAINTSTRUCT_W, *PPAINTSTRUCT_W, *LPPAINTSTRUCT_W;54 55 #define PS_SOLID_W 0x0000000056 #define PS_DASH_W 0x0000000157 #define PS_DOT_W 0x0000000258 #define PS_DASHDOT_W 0x0000000359 #define PS_DASHDOTDOT_W 0x0000000460 #define PS_NULL_W 0x0000000561 #define PS_INSIDEFRAME_W 0x0000000662 #define PS_USERSTYLE_W 0x0000000763 #define PS_ALTERNATE_W 0x0000000864 #define PS_STYLE_MASK_W 0x0000000f65 66 typedef struct67 {68 UINT lopnStyle;69 POINT lopnWidth;70 ULONG lopnColor;71 } LOGPEN_W, *LPLOGPEN_W;72 73 typedef struct tagEXTLOGPEN74 {75 DWORD elpPenStyle;76 DWORD elpWidth;77 DWORD elpBrushStyle;78 DWORD elpColor;79 DWORD elpNumEntries;80 DWORD elpStyleEntry[1];81 } EXTLOGPEN_W, *PEXTLOGPEN_W, *NPEXTLOGPEN_W, *LPEXTLOGPEN_W;82 83 typedef struct84 {85 UINT lbStyle;86 ULONG lbColor;87 INT lbHatch;88 } LOGBRUSH_W, *LPLOGBRUSH_W;89 90 typedef struct _penobject91 {92 ULONG filler[9];93 union {94 struct {95 PEXTLOGPEN_W pExtLogPen;96 LOGBRUSH_W logbrush;97 LOGPEN_W logpen;98 } ExtPen;99 struct {100 LOGPEN_W logpen;101 } Pen;102 };103 } tPenObject, *pPenObject;104 105 /* DC Graphics Mode */106 #define GM_COMPATIBLE_W 1107 #define GM_ADVANCED_W 2108 109 #define DCX_WINDOW_W 0x00000001L110 #define DCX_CACHE_W 0x00000002L111 #define DCX_NORESETATTRS_W 0x00000004L112 #define DCX_CLIPCHILDREN_W 0x00000008L113 #define DCX_CLIPSIBLINGS_W 0x00000010L114 #define DCX_PARENTCLIP_W 0x00000020L115 #define DCX_EXCLUDERGN_W 0x00000040L116 #define DCX_INTERSECTRGN_W 0x00000080L117 #define DCX_EXCLUDEUPDATE_W 0x00000100L118 #define DCX_INTERSECTUPDATE_W 0x00000200L119 #define DCX_LOCKWINDOWUPDATE_W 0x00000400L120 #define DCX_VALIDATE_W 0x00200000L121 122 #define RDW_INVALIDATE_W 0x0001123 #define RDW_INTERNALPAINT_W 0x0002124 #define RDW_ERASE_W 0x0004125 #define RDW_VALIDATE_W 0x0008126 #define RDW_NOINTERNALPAINT_W 0x0010127 #define RDW_NOERASE_W 0x0020128 #define RDW_NOCHILDREN_W 0x0040129 #define RDW_ALLCHILDREN_W 0x0080130 #define RDW_UPDATENOW_W 0x0100131 #define RDW_ERASENOW_W 0x0200132 #define RDW_FRAME_W 0x0400133 #define RDW_NOFRAME_W 0x0800134 135 typedef struct _RGNDATAHEADER_W {136 DWORD dwSize;137 DWORD iType;138 DWORD nCount;139 DWORD nRgnSize;140 RECT rcBound;141 } RGNDATAHEADER_W, *LPRGNDATAHEADER_W;142 143 typedef struct _RGNDATA_W {144 RGNDATAHEADER_W rdh;145 char Buffer[1];146 } RGNDATA_W , *PRGNDATA_W , *LPRGNDATA_W ;147 148 149 /* Xform FLAGS */150 #define MWT_IDENTITY_W 1151 #define MWT_LEFTMULTIPLY_W 2152 #define MWT_RIGHTMULTIPLY_W 3153 154 /* Mapping Modes */155 #define MM_TEXT_W 1156 #define MM_LOMETRIC_W 2157 #define MM_HIMETRIC_W 3158 #define MM_LOENGLISH_W 4159 #define MM_HIENGLISH_W 5160 #define MM_TWIPS_W 6161 #define MM_ISOTROPIC_W 7162 #define MM_ANISOTROPIC_W 8163 164 #define RGN_OR_W 2165 166 /* Window scrolling */167 #define SW_SCROLLCHILDREN_W 0x0001168 #define SW_INVALIDATE_W 0x0002169 #define SW_ERASE_W 0x0004170 171 /*********************/172 173 BOOL APIENTRY GpiEnableYInversion (HPS hps, LONG lHeight);174 LONG APIENTRY GpiQueryYInversion (HPS hps);175 PVOID APIENTRY GpiAllocateDCData (HPS GpiH, ULONG size);176 PVOID APIENTRY GpiQueryDCData (HPS hps);177 HDC OPEN32API HPSToHDC (HWND hwnd, HPS hps, HDC hdc, PVOID);178 void OPEN32API DeleteHDC (HDC hdc);179 BOOL OPEN32API _O32_EndPaint (HWND hwnd, const PAINTSTRUCT_W *lpps);180 int OPEN32API _O32_GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase);181 ULONG OPEN32API _O32_GetRegionData (HRGN hrgn, ULONG count, PRGNDATA_W pData);182 BOOL OPEN32API _O32_DeleteObject (LHANDLE hgdiobj);183 int OPEN32API _O32_ReleaseDC (HWND hwnd, HDC hdc);184 VOID OPEN32API _O32_SetLastError( DWORD );185 BOOL OPEN32API _O32_SetRectRgn (HRGN dest, int left, int top, int right, int bottom);186 int OPEN32API _O32_CombineRgn (HRGN dest, HRGN src1, HRGN src2, int mode);187 HRGN OPEN32API _O32_CreateRectRgn (int left, int top, int right, int bottom);188 38 189 39 #ifndef DEVESC_SETPS … … 269 119 case MM_ISOTROPIC_W : flOptions = PU_LOMETRIC ; break; 270 120 default: 271 _O32_SetLastError (ERROR_INVALID_PARAMETER);121 O32_SetLastError (ERROR_INVALID_PARAMETER); 272 122 return FALSE; 273 123 } … … 294 144 if (DevEscape(pHps->hdc ? pHps->hdc : pHps->hps, DEVESC_SETPS, 12, (PBYTE)data, 0, 0) == DEVESC_ERROR) 295 145 { 296 _O32_SetLastError (ERROR_INVALID_PARAMETER);146 O32_SetLastError (ERROR_INVALID_PARAMETER); 297 147 return 0; 298 148 } … … 614 464 615 465 GpiSetBitmap (pHps->hps, NULL); 616 _O32_DeleteObject (pHps->nullBitmapHandle);466 O32_DeleteObject (pHps->nullBitmapHandle); 617 467 GpiDestroyPS(pHps->hps); 618 468 … … 636 486 if ( !lpps ) 637 487 { 638 _O32_SetLastError (ERROR_INVALID_PARAMETER);488 O32_SetLastError (ERROR_INVALID_PARAMETER); 639 489 return (HDC)NULLHANDLE; 640 490 } 641 491 642 USHORT sel = RestoreOS2FS();643 492 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 644 493 … … 649 498 if (!pHps) 650 499 { 651 _O32_SetLastError (ERROR_INVALID_PARAMETER); 652 SetFS(sel); 500 O32_SetLastError (ERROR_INVALID_PARAMETER); 653 501 return (HDC)NULLHANDLE; 654 502 } … … 699 547 WINRECT_FROM_PMRECT(lpps->rcPaint, rect); 700 548 701 SetFS(sel); 702 _O32_SetLastError(0); 549 O32_SetLastError(0); 703 550 return (HDC)pHps->hps; 704 551 } … … 711 558 return TRUE; 712 559 713 USHORT sel = RestoreOS2FS();714 560 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 715 561 … … 727 573 else 728 574 { 729 _O32_EndPaint (HWND_DESKTOP, pPaint);575 O32_EndPaint (HWND_DESKTOP, pPaint); 730 576 } 731 577 732 578 exit: 733 SetFS(sel); 734 _O32_SetLastError(0); 579 O32_SetLastError(0); 735 580 return TRUE; 736 581 } … … 740 585 if (hwnd) 741 586 { 742 _O32_SetLastError (ERROR_INVALID_HANDLE);587 O32_SetLastError (ERROR_INVALID_HANDLE); 743 588 return FALSE; 744 589 } 745 590 746 591 RECTL rectl; 747 USHORT sel = RestoreOS2FS();748 592 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 749 593 750 594 BOOL updateRegionExists = WinQueryUpdateRect (hwnd, pRect ? &rectl : NULL); 751 595 if (!pRect) { 752 SetFS(sel);753 596 return (updateRegionExists); 754 597 } … … 762 605 if (!pHps) 763 606 { 764 _O32_SetLastError (ERROR_INVALID_HANDLE); 765 SetFS(sel); 607 O32_SetLastError (ERROR_INVALID_HANDLE); 766 608 return FALSE; 767 609 } … … 787 629 } 788 630 789 SetFS(sel);790 631 return updateRegionExists; 791 632 } … … 793 634 int WIN32API GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase) 794 635 { 795 USHORT sel = RestoreOS2FS();796 636 LONG Complexity; 797 637 798 Complexity = _O32_GetUpdateRgn (hwnd, hrgn, FALSE);638 Complexity = O32_GetUpdateRgn (hwnd, hrgn, FALSE); 799 639 if (erase && (Complexity > NULLREGION_W)) { 800 640 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 802 642 } 803 643 804 SetFS(sel);805 644 return Complexity; 806 645 } … … 814 653 HDC WIN32API GetDCEx (HWND hwnd, HRGN hrgn, ULONG flags) 815 654 { 816 USHORT sel = RestoreOS2FS();817 655 Win32BaseWindow *wnd = NULL; 818 656 HWND hWindow; … … 836 674 hWindow = HWND_DESKTOP; 837 675 838 dprintf (("User32: GetDCEx hwnd %x (%x %x) -> wnd %x", hwnd, hrgn, flags, wnd));676 dprintf (("User32: GetDCEx hwnd %x (%x %x) -> wnd %x", hwnd, hrgn, flags, wnd)); 839 677 840 678 isWindowOwnDC = (((hWindow == HWND_DESKTOP) ? FALSE : wnd->isOwnDC()) 841 679 && !(flags & DCX_CACHE_W)); 680 842 681 if (isWindowOwnDC) 843 682 { … … 857 696 858 697 pHps->hdcType = TYPE_1; 859 SetFS(sel);860 698 return (HDC)hps; 861 699 } … … 904 742 goto error; 905 743 906 BytesNeeded = _O32_GetRegionData (hrgn, 0, NULL);744 BytesNeeded = O32_GetRegionData (hrgn, 0, NULL); 907 745 RgnData = (PRGNDATA_W)_alloca (BytesNeeded); 908 746 if (RgnData == NULL) 909 747 goto error; 910 _O32_GetRegionData (hrgn, BytesNeeded, RgnData);748 O32_GetRegionData (hrgn, BytesNeeded, RgnData); 911 749 912 750 i = RgnData->rdh.nCount; … … 941 779 GpiSetDrawControl (hps, DCTL_DISPLAY, drawingAllowed ? DCTL_ON : DCTL_OFF); 942 780 943 SetFS(sel);944 781 return (HDC)pHps->hps; 945 782 … … 960 797 if (pHps->hrgnHDC) GpiDestroyRegion(pHps->hps, pHps->hrgnHDC); 961 798 962 _O32_DeleteObject (pHps->nullBitmapHandle); 963 } 964 _O32_SetLastError (ERROR_INVALID_PARAMETER); 965 SetFS(sel); 799 O32_DeleteObject (pHps->nullBitmapHandle); 800 } 801 O32_SetLastError (ERROR_INVALID_PARAMETER); 966 802 return NULL; 967 803 } … … 979 815 int WIN32API ReleaseDC (HWND hwnd, HDC hdc) 980 816 { 981 USHORT sel = RestoreOS2FS();982 817 BOOL isOwnDC = FALSE; 983 818 int rc; … … 991 826 rc = TRUE; 992 827 else 993 rc = _O32_ReleaseDC (0, hdc); 994 995 SetFS(sel); 828 rc = O32_ReleaseDC (0, hdc); 829 996 830 dprintf(("ReleaseDC %x %x", hwnd, hdc)); 997 831 return (rc); … … 1003 837 return FALSE; 1004 838 1005 USHORT sel = RestoreOS2FS();1006 839 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 1007 840 … … 1017 850 #endif 1018 851 1019 SetFS(sel);1020 852 return (TRUE); 1021 853 } … … 1031 863 // RDW_UPDATENOW 1032 864 1033 ODINFUNCTION4(BOOL,RedrawWindow,HWND, hwnd, 1034 const RECT*, pRect, 1035 HRGN, hrgn, 1036 DWORD, redraw) 865 BOOL WIN32API RedrawWindow(HWND hwnd, const RECT* pRect, HRGN hrgn, DWORD redraw) 1037 866 { 1038 867 Win32BaseWindow *wnd; … … 1040 869 if (redraw & (RDW_FRAME_W | RDW_NOFRAME_W)) 1041 870 { 1042 _O32_SetLastError (ERROR_NOT_SUPPORTED);871 O32_SetLastError (ERROR_NOT_SUPPORTED); 1043 872 return FALSE; 1044 873 } 1045 1046 //@@@PH USHORT sel = RestoreOS2FS();1047 //@@@PH dprintf(("USER32: RedrawWindow %X, %X %X %X", hwnd, pRect, hrgn, redraw));1048 874 1049 875 if (hwnd == NULLHANDLE) … … 1056 882 dprintf(("USER32:dc: RedrawWindow can't find desktop window %08xh\n", 1057 883 hwnd)); 1058 _O32_SetLastError (ERROR_INVALID_PARAMETER); 1059 //@@@PH SetFS(sel); 884 O32_SetLastError (ERROR_INVALID_PARAMETER); 1060 885 return FALSE; 1061 886 } … … 1070 895 dprintf(("USER32:dc: RedrawWindow can't find window %08xh\n", 1071 896 hwnd)); 1072 _O32_SetLastError (ERROR_INVALID_PARAMETER); 1073 //@@@PH SetFS(sel); 897 O32_SetLastError (ERROR_INVALID_PARAMETER); 1074 898 return FALSE; 1075 899 } … … 1124 948 goto error; 1125 949 1126 BytesNeeded = _O32_GetRegionData (hrgn, 0, NULL);950 BytesNeeded = O32_GetRegionData (hrgn, 0, NULL); 1127 951 RgnData = (PRGNDATA_W)_alloca (BytesNeeded); 1128 952 if (RgnData == NULL) 1129 953 goto error; 1130 _O32_GetRegionData (hrgn, BytesNeeded, RgnData);954 O32_GetRegionData (hrgn, BytesNeeded, RgnData); 1131 955 1132 956 pr = (PRECTL)(RgnData->Buffer); … … 1207 1031 1208 1032 if (!success) 1209 _O32_SetLastError (ERROR_INVALID_PARAMETER); 1210 1211 //@@@PH SetFS(sel); 1033 O32_SetLastError (ERROR_INVALID_PARAMETER); 1034 1212 1035 return (success); 1213 1036 } … … 1215 1038 BOOL WIN32API InvalidateRect (HWND hwnd, const RECT *pRect, BOOL erase) 1216 1039 { 1217 USHORT sel = RestoreOS2FS();1218 1040 // Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 1219 1041 BOOL result; … … 1227 1049 (erase ? RDW_ERASE_W : 0) | 1228 1050 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0)); 1229 SetFS(sel);1230 1051 return (result); 1231 1052 } … … 1233 1054 BOOL WIN32API InvalidateRgn (HWND hwnd, HRGN hrgn, BOOL erase) 1234 1055 { 1235 USHORT sel = RestoreOS2FS();1236 1056 // Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 1237 1057 BOOL result; … … 1245 1065 (erase ? RDW_ERASE_W : 0) | 1246 1066 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0)); 1247 SetFS(sel);1248 1067 return (result); 1249 1068 } … … 1270 1089 rc = GpiQueryRegionRects (hps, hrgnPM, NULL, &rgnRect, Rcls); 1271 1090 1272 rc = _O32_SetRectRgn (hrgnWin, pRcl->xLeft,1091 rc = O32_SetRectRgn (hrgnWin, pRcl->xLeft, 1273 1092 pRcl->xRight, 1274 1093 height - pRcl->yTop, … … 1279 1098 int i; 1280 1099 HRGN temp; 1281 temp = _O32_CreateRectRgn (0, 0, 1, 1);1100 temp = O32_CreateRectRgn (0, 0, 1, 1); 1282 1101 1283 1102 for (i = 1, pRcl++; rc && (i < rgnRect.crcReturned); i++, pRcl++) 1284 1103 { 1285 rc = _O32_SetRectRgn (temp, pRcl->xLeft,1104 rc = O32_SetRectRgn (temp, pRcl->xLeft, 1286 1105 pRcl->xRight, 1287 1106 height - pRcl->yTop, 1288 1107 height - pRcl->yBottom); 1289 rc &= _O32_CombineRgn (hrgnWin, hrgnWin, temp, RGN_OR_W);1108 rc &= O32_CombineRgn (hrgnWin, hrgnWin, temp, RGN_OR_W); 1290 1109 } 1291 _O32_DeleteObject (temp);1110 O32_DeleteObject (temp); 1292 1111 } 1293 1112 delete[] Rcls; … … 1300 1119 else 1301 1120 { 1302 rc = _O32_SetRectRgn (hrgnWin, 0, 0, 0, 0);1121 rc = O32_SetRectRgn (hrgnWin, 0, 0, 0, 0); 1303 1122 } 1304 1123 … … 1310 1129 const RECT *pClip, HRGN hrgnUpdate, LPRECT pRectUpdate) 1311 1130 { 1312 USHORT sel = RestoreOS2FS();1313 1131 BOOL rc = TRUE; 1314 1132 … … 1317 1135 if (!hDC) 1318 1136 { 1319 SetFS(sel);1320 1137 return (FALSE); 1321 1138 } … … 1327 1144 if ((hwnd == NULLHANDLE) || !wnd) 1328 1145 { 1329 SetFS(sel);1330 1146 return (FALSE); 1331 1147 } … … 1413 1229 if (lComplexity == RGN_ERROR) 1414 1230 { 1415 SetFS(sel);1416 1231 return (FALSE); 1417 1232 } … … 1431 1246 rc = setPMRgnIntoWinRgn (hrgn, hrgnUpdate, height); 1432 1247 1433 SetFS(sel);1434 1248 return (rc); 1435 1249 } … … 1439 1253 BOOL WIN32API ScrollWindow(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip) 1440 1254 { 1441 USHORT sel = RestoreOS2FS();1442 1255 Win32BaseWindow *window; 1443 1256 APIRET rc; … … 1452 1265 if(!window) { 1453 1266 dprintf(("ScrollWindow, window %x not found", hwnd)); 1454 SetFS(sel);1455 1267 return 0; 1456 1268 } … … 1497 1309 NULL, scrollFlags); 1498 1310 1499 SetFS(sel);1500 1311 return (rc != RGN_ERROR); 1501 1312 } … … 1505 1316 HRGN hrgnUpdate, PRECT pRectUpdate, UINT scrollFlag) 1506 1317 { 1507 USHORT sel = RestoreOS2FS();1508 1318 Win32BaseWindow *window; 1509 1319 APIRET rc; … … 1516 1326 if(!window) { 1517 1327 dprintf(("ScrollWindowEx, window %x not found", hwnd)); 1518 SetFS(sel);1519 1328 return 0; 1520 1329 } … … 1539 1348 if (lComplexity == RGN_ERROR) 1540 1349 { 1541 SetFS(sel);1542 1350 return (0); 1543 1351 } … … 1563 1371 if (rc == FALSE) 1564 1372 { 1565 SetFS(sel);1566 1373 return (0); 1567 1374 } … … 1584 1391 } 1585 1392 1586 SetFS(sel);1587 1393 return (regionType); 1588 1394 } -
TabularUnified tags/trunk/src/user32/dc.h ¶
r11667 r11993 1 /* $Id: dc.h,v 1. 4 1999-09-28 08:00:56 dengertExp $ */1 /* $Id: dc.h,v 1.5 1999-10-22 18:11:44 sandervl Exp $ */ 2 2 /* 3 3 * public dc functions … … 17 17 extern void releaseOwnDC (HDC hps); 18 18 19 20 #ifdef INCLUDED_BY_DC 21 /*********************/ 22 typedef struct 23 { 24 HDC hdc; 25 BOOL fErase; 26 RECT rcPaint; 27 BOOL fRestore; 28 BOOL IncUpdate; 29 BYTE rgbReserved[32]; 30 } PAINTSTRUCT_W, *PPAINTSTRUCT_W, *LPPAINTSTRUCT_W; 31 32 #define PS_SOLID_W 0x00000000 33 #define PS_DASH_W 0x00000001 34 #define PS_DOT_W 0x00000002 35 #define PS_DASHDOT_W 0x00000003 36 #define PS_DASHDOTDOT_W 0x00000004 37 #define PS_NULL_W 0x00000005 38 #define PS_INSIDEFRAME_W 0x00000006 39 #define PS_USERSTYLE_W 0x00000007 40 #define PS_ALTERNATE_W 0x00000008 41 #define PS_STYLE_MASK_W 0x0000000f 42 43 typedef struct 44 { 45 UINT lopnStyle; 46 POINT lopnWidth; 47 ULONG lopnColor; 48 } LOGPEN_W, *LPLOGPEN_W; 49 50 typedef struct tagEXTLOGPEN 51 { 52 DWORD elpPenStyle; 53 DWORD elpWidth; 54 DWORD elpBrushStyle; 55 DWORD elpColor; 56 DWORD elpNumEntries; 57 DWORD elpStyleEntry[1]; 58 } EXTLOGPEN_W, *PEXTLOGPEN_W, *NPEXTLOGPEN_W, *LPEXTLOGPEN_W; 59 60 typedef struct 61 { 62 UINT lbStyle; 63 ULONG lbColor; 64 INT lbHatch; 65 } LOGBRUSH_W, *LPLOGBRUSH_W; 66 67 typedef struct _penobject 68 { 69 ULONG filler[9]; 70 union { 71 struct { 72 PEXTLOGPEN_W pExtLogPen; 73 LOGBRUSH_W logbrush; 74 LOGPEN_W logpen; 75 } ExtPen; 76 struct { 77 LOGPEN_W logpen; 78 } Pen; 79 }; 80 } tPenObject, *pPenObject; 81 82 /* DC Graphics Mode */ 83 #define GM_COMPATIBLE_W 1 84 #define GM_ADVANCED_W 2 85 86 #define DCX_WINDOW_W 0x00000001L 87 #define DCX_CACHE_W 0x00000002L 88 #define DCX_NORESETATTRS_W 0x00000004L 89 #define DCX_CLIPCHILDREN_W 0x00000008L 90 #define DCX_CLIPSIBLINGS_W 0x00000010L 91 #define DCX_PARENTCLIP_W 0x00000020L 92 #define DCX_EXCLUDERGN_W 0x00000040L 93 #define DCX_INTERSECTRGN_W 0x00000080L 94 #define DCX_EXCLUDEUPDATE_W 0x00000100L 95 #define DCX_INTERSECTUPDATE_W 0x00000200L 96 #define DCX_LOCKWINDOWUPDATE_W 0x00000400L 97 #define DCX_VALIDATE_W 0x00200000L 98 99 #define RDW_INVALIDATE_W 0x0001 100 #define RDW_INTERNALPAINT_W 0x0002 101 #define RDW_ERASE_W 0x0004 102 #define RDW_VALIDATE_W 0x0008 103 #define RDW_NOINTERNALPAINT_W 0x0010 104 #define RDW_NOERASE_W 0x0020 105 #define RDW_NOCHILDREN_W 0x0040 106 #define RDW_ALLCHILDREN_W 0x0080 107 #define RDW_UPDATENOW_W 0x0100 108 #define RDW_ERASENOW_W 0x0200 109 #define RDW_FRAME_W 0x0400 110 #define RDW_NOFRAME_W 0x0800 111 112 typedef struct _RGNDATAHEADER_W { 113 DWORD dwSize; 114 DWORD iType; 115 DWORD nCount; 116 DWORD nRgnSize; 117 RECT rcBound; 118 } RGNDATAHEADER_W, *LPRGNDATAHEADER_W; 119 120 typedef struct _RGNDATA_W { 121 RGNDATAHEADER_W rdh; 122 char Buffer[1]; 123 } RGNDATA_W , *PRGNDATA_W , *LPRGNDATA_W ; 124 125 126 /* Xform FLAGS */ 127 #define MWT_IDENTITY_W 1 128 #define MWT_LEFTMULTIPLY_W 2 129 #define MWT_RIGHTMULTIPLY_W 3 130 131 /* Mapping Modes */ 132 #define MM_TEXT_W 1 133 #define MM_LOMETRIC_W 2 134 #define MM_HIMETRIC_W 3 135 #define MM_LOENGLISH_W 4 136 #define MM_HIENGLISH_W 5 137 #define MM_TWIPS_W 6 138 #define MM_ISOTROPIC_W 7 139 #define MM_ANISOTROPIC_W 8 140 141 #define RGN_OR_W 2 142 143 /* Window scrolling */ 144 #define SW_SCROLLCHILDREN_W 0x0001 145 #define SW_INVALIDATE_W 0x0002 146 #define SW_ERASE_W 0x0004 147 148 /*********************/ 149 150 #ifndef OPEN32API 151 #define OPEN32API _System 152 #endif 153 154 155 BOOL APIENTRY _GpiEnableYInversion (HPS hps, LONG lHeight); 156 157 inline BOOL APIENTRY GpiEnableYInversion (HPS hps, LONG lHeight) 158 { 159 BOOL yyrc; 160 USHORT sel = RestoreOS2FS(); 161 162 yyrc = _GpiEnableYInversion(hps, lHeight); 163 SetFS(sel); 164 165 return yyrc; 166 } 167 168 //LONG APIENTRY GpiQueryYInversion (HPS hps); 169 170 PVOID APIENTRY _GpiAllocateDCData (HPS GpiH, ULONG size); 171 172 inline PVOID APIENTRY GpiAllocateDCData (HPS GpiH, ULONG size) 173 { 174 PVOID yyrc; 175 USHORT sel = RestoreOS2FS(); 176 177 yyrc = _GpiAllocateDCData(GpiH, size); 178 SetFS(sel); 179 180 return yyrc; 181 } 182 183 PVOID APIENTRY _GpiQueryDCData (HPS hps); 184 185 inline PVOID APIENTRY GpiQueryDCData (HPS hps) 186 { 187 PVOID yyrc; 188 USHORT sel = RestoreOS2FS(); 189 190 yyrc = _GpiQueryDCData(hps); 191 SetFS(sel); 192 193 return yyrc; 194 } 195 196 HDC OPEN32API _HPSToHDC (HWND hwnd, HPS hps, HDC hdc, PVOID a); 197 198 inline HDC OPEN32API HPSToHDC (HWND hwnd, HPS hps, HDC hdc, PVOID a) 199 { 200 HDC yyrc; 201 USHORT sel = RestoreOS2FS(); 202 203 yyrc = _HPSToHDC(hwnd, hps, hdc, a); 204 SetFS(sel); 205 206 return yyrc; 207 } 208 209 void OPEN32API _DeleteHDC (HDC hdc); 210 211 inline void OPEN32API DeleteHDC (HDC hdc) 212 { 213 USHORT sel = RestoreOS2FS(); 214 215 _DeleteHDC(hdc); 216 SetFS(sel); 217 } 218 219 BOOL OPEN32API _O32_EndPaint (HWND hwnd, const PAINTSTRUCT_W *lpps); 220 221 inline BOOL O32_EndPaint(HWND a, CONST PAINTSTRUCT_W *b) 222 { 223 BOOL yyrc; 224 USHORT sel = RestoreOS2FS(); 225 226 yyrc = _O32_EndPaint(a, b); 227 SetFS(sel); 228 229 return yyrc; 230 } 231 232 int OPEN32API _O32_GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase); 233 234 inline int O32_GetUpdateRgn(HWND a, HRGN b, BOOL c) 235 { 236 int yyrc; 237 USHORT sel = RestoreOS2FS(); 238 239 yyrc = _O32_GetUpdateRgn(a, b, c); 240 SetFS(sel); 241 242 return yyrc; 243 } 244 245 ULONG OPEN32API _O32_GetRegionData (HRGN hrgn, ULONG count, PRGNDATA_W pData); 246 247 inline DWORD O32_GetRegionData(HRGN a, DWORD b, PRGNDATA_W c) 248 { 249 DWORD yyrc; 250 USHORT sel = RestoreOS2FS(); 251 252 yyrc = _O32_GetRegionData(a, b, c); 253 SetFS(sel); 254 255 return yyrc; 256 } 257 258 BOOL OPEN32API _O32_DeleteObject (LHANDLE hgdiobj); 259 260 inline BOOL O32_DeleteObject(HANDLE a) 261 { 262 BOOL yyrc; 263 USHORT sel = RestoreOS2FS(); 264 265 yyrc = _O32_DeleteObject(a); 266 SetFS(sel); 267 268 return yyrc; 269 } 270 271 int OPEN32API _O32_ReleaseDC (HWND hwnd, HDC hdc); 272 273 inline int O32_ReleaseDC(HWND a, HDC b) 274 { 275 int yyrc; 276 USHORT sel = RestoreOS2FS(); 277 278 yyrc = _O32_ReleaseDC(a, b); 279 SetFS(sel); 280 281 return yyrc; 282 } 283 284 VOID OPEN32API _O32_SetLastError( DWORD ); 285 286 inline VOID O32_SetLastError(DWORD a) 287 { 288 USHORT sel = RestoreOS2FS(); 289 290 _O32_SetLastError(a); 291 SetFS(sel); 292 } 293 294 BOOL OPEN32API _O32_SetRectRgn (HRGN dest, int left, int top, int right, int bottom); 295 296 inline BOOL O32_SetRectRgn(HRGN a, int b, int c, int d, int e) 297 { 298 BOOL yyrc; 299 USHORT sel = RestoreOS2FS(); 300 301 yyrc = _O32_SetRectRgn(a, b, c, d, e); 302 SetFS(sel); 303 304 return yyrc; 305 } 306 307 int OPEN32API _O32_CombineRgn (HRGN dest, HRGN src1, HRGN src2, int mode); 308 309 inline int O32_CombineRgn(HRGN a, HRGN b, HRGN c, int d) 310 { 311 int yyrc; 312 USHORT sel = RestoreOS2FS(); 313 314 yyrc = _O32_CombineRgn(a, b, c, d); 315 SetFS(sel); 316 317 return yyrc; 318 } 319 320 HRGN OPEN32API _O32_CreateRectRgn (int left, int top, int right, int bottom); 321 322 inline HRGN O32_CreateRectRgn(int a, int b, int c, int d) 323 { 324 HRGN yyrc; 325 USHORT sel = RestoreOS2FS(); 326 327 yyrc = _O32_CreateRectRgn(a, b, c, d); 328 SetFS(sel); 329 330 return yyrc; 331 } 332 333 BOOL OPEN32API _O32_CreateCaret (HWND hwnd, HBITMAP hbm, int width, int height); 334 335 inline BOOL O32_CreateCaret(HWND a, HBITMAP b, int c, int d) 336 { 337 BOOL yyrc; 338 USHORT sel = RestoreOS2FS(); 339 340 yyrc = _O32_CreateCaret(a, b, c, d); 341 SetFS(sel); 342 343 return yyrc; 344 } 345 346 BOOL APIENTRY __DestroyCaret (void); 347 348 inline BOOL APIENTRY _DestroyCaret (void) 349 { 350 BOOL yyrc; 351 USHORT sel = RestoreOS2FS(); 352 353 yyrc = __DestroyCaret(); 354 SetFS(sel); 355 356 return yyrc; 357 } 358 359 UINT APIENTRY __GetCaretBlinkTime (void); 360 361 inline UINT APIENTRY _GetCaretBlinkTime (void) 362 { 363 UINT yyrc; 364 USHORT sel = RestoreOS2FS(); 365 366 yyrc = __GetCaretBlinkTime(); 367 SetFS(sel); 368 369 return yyrc; 370 } 371 372 BOOL APIENTRY __HideCaret (HWND hwnd); 373 374 inline BOOL APIENTRY _HideCaret (HWND hwnd) 375 { 376 BOOL yyrc; 377 USHORT sel = RestoreOS2FS(); 378 379 yyrc = __HideCaret(hwnd); 380 SetFS(sel); 381 382 return yyrc; 383 } 384 385 BOOL APIENTRY __SetCaretBlinkTime (UINT mSecs); 386 387 inline BOOL APIENTRY _SetCaretBlinkTime (UINT mSecs) 388 { 389 BOOL yyrc; 390 USHORT sel = RestoreOS2FS(); 391 392 yyrc = __SetCaretBlinkTime(mSecs); 393 SetFS(sel); 394 395 return yyrc; 396 } 397 398 BOOL APIENTRY __ShowCaret (HWND hwnd); 399 400 inline BOOL APIENTRY _ShowCaret (HWND hwnd) 401 { 402 BOOL yyrc; 403 USHORT sel = RestoreOS2FS(); 404 405 yyrc = __ShowCaret(hwnd); 406 SetFS(sel); 407 408 return yyrc; 409 } 410 411 #endif //INCLUDED_BY_DC 412 19 413 #endif //__DC_H__ 20 414 -
TabularUnified tags/trunk/src/user32/nativerc.cpp ¶
r11541 r11993 16 16 17 17 //****************************************************************************** 18 // CB: Loads and starts a native OS/2 dialog with Win32 DlgProc19 // (used in COMCTL32)20 // full name: NativeDialogBoxIndirectParam21 //******************************************************************************22 INT WINAPI NativeDlgBoxIP(HMODULE hmodule,23 HINSTANCE hinst, LPCSTR lpszName,24 HWND hwndParent, DLGPROC dlgproc,25 LPARAM lParamInit)26 {27 BOOL rc;28 DLGTEMPLATE *os2dlg;29 HRSRC hRes;30 /* //CB: synchronize with new dialog.cpp code31 dprintf(("NativeDlgBoxIP"));32 33 hRes = O32_FindResource(hmodule,lpszName,RT_DIALOGA);34 if (hRes == 0) return (INT)-1;35 36 dprintf((" hRes = %d",hRes));37 38 os2dlg = (DLGTEMPLATE*)O32_LoadResource(hmodule,hRes);39 if (os2dlg == NULL) return (INT)-1;40 41 dprintf((" os2dlg = %d",os2dlg));42 43 Win32WindowProc *dialog = new Win32WindowProc((WNDPROC)dlgproc,os2dlg);44 rc = O32_DialogBoxIndirectParam(hinst,os2dlg,hwndParent,(DLGPROC_O32)dialog->GetOS2Callback(),lParamInit);45 //dialog already destroyed when this returns46 dprintf(("NativeDlgBoxIP returned %X\n", rc));47 */48 return rc;49 }50 //******************************************************************************51 // CB: Loads and starts a native OS/2 dialog with Win32 DlgProc52 // (used in COMCTL32)53 // full name: NativeCreateDialogIndirectParam54 //******************************************************************************55 INT WINAPI NativeCreateDlgIP(HMODULE hmodule,56 HINSTANCE hinst, LPCSTR lpszName,57 HWND hwndParent, DLGPROC dlgproc,58 LPARAM lParamInit)59 {60 BOOL rc;61 DLGTEMPLATE *os2dlg;62 HRSRC hRes;63 /* //CB: synchronize with new dialog.cpp code64 dprintf(("NativeCreateDlgBoxIP"));65 66 hRes = O32_FindResource(hmodule,lpszName,RT_DIALOGA);67 if (hRes == 0) return (INT)-1;68 69 dprintf((" hRes = %d",hRes));70 71 os2dlg = (DLGTEMPLATE*)O32_LoadResource(hmodule,hRes);72 if (os2dlg == NULL) return (INT)-1;73 74 dprintf((" os2dlg = %d",os2dlg));75 76 Win32WindowProc *dialog = new Win32WindowProc((WNDPROC)dlgproc,os2dlg);77 rc = O32_CreateDialogIndirectParam(hinst,os2dlg,hwndParent,(DLGPROC_O32)dialog->GetOS2Callback(),lParamInit);78 //dialog already destroyed when this returns79 dprintf(("NativeDlgBoxIP returned %X\n", rc));80 */81 return rc;82 }83 //******************************************************************************84 18 // CB: loads OS/2 bitmaps 85 19 //****************************************************************************** -
TabularUnified tags/trunk/src/user32/open32wbase.h ¶
r11541 r11993 1 /* $Id: open32wbase.h,v 1. 1 1999-09-15 23:18:52sandervl Exp $ */1 /* $Id: open32wbase.h,v 1.2 1999-10-22 18:11:45 sandervl Exp $ */ 2 2 /* 3 3 * Open32 Window fake Base Class for OS/2 … … 14 14 15 15 extern "C" { 16 void _System WinSetDAXData (HWND, PVOID);17 16 ULONG _System PIEPS (ULONG, ULONG); 17 void _System _WinSetDAXData (HWND, PVOID); 18 18 } 19 20 inline void _System WinSetDAXData (HWND a, PVOID b) 21 { 22 USHORT sel = RestoreOS2FS(); 23 24 _WinSetDAXData(a, b); 25 SetFS(sel); 26 } 19 27 20 28 #define PIEPS(x,y) -
TabularUnified tags/trunk/src/user32/oslibwin.cpp ¶
r11979 r11993 1 /* $Id: oslibwin.cpp,v 1.3 3 1999-10-21 12:19:26sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.34 1999-10-22 18:11:45 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 554 554 pswpOld->cx = pswp->cx; 555 555 pswpOld->cy = pswp->cy; 556 557 dprintf(("window (%d,%d)(%d,%d) client (%d,%d)(%d,%d)", 558 x,y,cx,cy, pswpOld->x,pswpOld->y,pswpOld->cx,pswpOld->cy)); 559 560 pwpos->flags = (UINT)flags; 561 pwpos->cy = cy; 562 pwpos->cx = cx; 563 pwpos->x = x; 564 pwpos->y = y; 565 pwpos->hwndInsertAfter = hWinAfter; 566 pwpos->hwnd = hWindow; 567 } 568 //****************************************************************************** 569 //****************************************************************************** 570 void OSLibMapSWPtoWINDOWPOSFrame(PSWP pswp, struct tagWINDOWPOS *pwpos, PSWP pswpOld, HWND hParent, HWND hFrame) 571 { 572 HWND hWindow = pswp->hwnd; 573 HWND hWndInsertAfter = pswp->hwndInsertBehind; 574 long x = pswp->x; 575 long y = pswp->y; 576 long cx = pswp->cx; 577 long cy = pswp->cy; 578 UINT fuFlags = (UINT)pswp->fl; 579 ULONG parentHeight; 580 581 HWND hWinAfter; 582 ULONG flags = 0; 583 SWP swpClient; 584 POINTL point; 585 586 HWND hWnd = (hWindow == HWND_DESKTOP) ? HWND_DESKTOP_W: hWindow; 587 588 if (hWndInsertAfter == HWND_TOP) 589 hWinAfter = HWND_TOP_W; 590 else if (hWndInsertAfter == HWND_BOTTOM) 591 hWinAfter = HWND_BOTTOM_W; 592 else 593 hWinAfter = (HWND) hWndInsertAfter; 594 595 //*********************************** 596 // convert PM flags to Windows flags 597 //*********************************** 598 if (!(fuFlags & SWP_SIZE)) flags |= SWP_NOSIZE_W; 599 if (!(fuFlags & SWP_MOVE)) flags |= SWP_NOMOVE_W; 600 if (!(fuFlags & SWP_ZORDER)) flags |= SWP_NOZORDER_W; 601 if ( fuFlags & SWP_NOREDRAW) flags |= SWP_NOREDRAW_W; 602 if (!(fuFlags & SWP_ACTIVATE)) flags |= SWP_NOACTIVATE_W; 603 if ( fuFlags & SWP_SHOW) flags |= SWP_SHOWWINDOW_W; 604 if ( fuFlags & SWP_HIDE) flags |= SWP_HIDEWINDOW_W; 605 if ( fuFlags & SWP_NOADJUST) flags |= SWP_NOSENDCHANGING_W; 606 607 WinQueryWindowPos(WinWindowFromID(hFrame, FID_CLIENT), &swpClient); 608 609 if(fuFlags & (SWP_MOVE | SWP_SIZE)) 610 { 611 point.x = x; 612 point.y = y; 613 if(hParent) 614 { 615 WinMapWindowPoints(hParent, HWND_DESKTOP, &point, 1); 616 } 617 point.y = OSLibQueryScreenHeight() - point.y - cy; 618 619 x = point.x; 620 y = point.y; 621 622 if ((pswp->x == pswpOld->x) && (pswp->y == pswpOld->y)) 623 flags |= SWP_NOMOVE_W; 624 625 if ((pswp->cx == pswpOld->cx) && (pswp->cy == pswpOld->cy)) 626 flags |= SWP_NOSIZE_W; 627 628 if (fuFlags & SWP_SIZE) 629 { 630 if (pswp->cy != pswpOld->cy) 631 { 632 flags &= ~SWP_NOMOVE_W; 633 } 634 } 635 } 636 637 pswpOld->x = swpClient.x; 638 pswpOld->y = pswp->cy - swpClient.y - swpClient.cy; 639 pswpOld->cx = swpClient.cx; 640 pswpOld->cy = swpClient.cy; 556 641 557 642 dprintf(("window (%d,%d)(%d,%d) client (%d,%d)(%d,%d)", -
TabularUnified tags/trunk/src/user32/oslibwin.h ¶
r11925 r11993 1 /* $Id: oslibwin.h,v 1.1 8 1999-10-17 16:42:39sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.19 1999-10-22 18:11:46 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 248 248 BOOL OSLibWinQueryWindowPos (HWND hwnd, PSWP pswp); 249 249 void OSLibMapSWPtoWINDOWPOS(PSWP pswp, struct tagWINDOWPOS *pwpos, PSWP pswpOld, HWND hParent, HWND hFrame); 250 void OSLibMapSWPtoWINDOWPOSFrame(PSWP pswp, struct tagWINDOWPOS *pwpos, PSWP pswpOld, HWND hParent, HWND hFrame); 250 251 void OSLibMapWINDOWPOStoSWP(struct tagWINDOWPOS *pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame); 251 252 -
TabularUnified tags/trunk/src/user32/pmframe.cpp ¶
r11931 r11993 1 /* $Id: pmframe.cpp,v 1. 8 1999-10-17 19:32:04 cbratschiExp $ */1 /* $Id: pmframe.cpp,v 1.9 1999-10-22 18:11:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 22 22 #include "pmframe.h" 23 23 #include "oslibutil.h" 24 #include "oslibwin.h" 25 #include "caret.h" 24 26 25 27 #define PMFRAMELOG … … 160 162 MRESULT EXPENTRY Win32FrameProc(HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) 161 163 { 162 Win32BaseWindow *win32wnd; 163 PFNWP OldFrameProc; 164 Win32BaseWindow *win32wnd; 165 PFNWP OldFrameProc; 166 MRESULT rc; 164 167 165 168 SetWin32TIB(); … … 177 180 switch(msg) 178 181 { 182 #if 1 183 case WM_ADJUSTWINDOWPOS: 184 { 185 PSWP pswp = (PSWP)mp1; 186 SWP swpOld; 187 WINDOWPOS wp; 188 ULONG parentHeight = 0; 189 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE, hwndAfter; 190 191 dprintf(("PMFRAME: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 192 193 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 194 goto RunDefFrameProc; 195 if(!win32wnd->CanReceiveSizeMsgs()) { 196 break; 197 } 198 199 WinQueryWindowPos(hwnd, &swpOld); 200 201 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 202 if (win32wnd->isChild()) { 203 if(win32wnd->getParent()) { 204 hParent = win32wnd->getParent()->getOS2WindowHandle(); 205 } 206 else goto RunDefFrameProc; 207 } 208 } 209 hwndAfter = pswp->hwndInsertBehind; 210 hFrame = win32wnd->getOS2FrameWindowHandle(); 211 OSLibMapSWPtoWINDOWPOSFrame(pswp, &wp, &swpOld, hParent, hFrame); 212 213 wp.hwnd = win32wnd->getWindowHandle(); 214 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) 215 { 216 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind); 217 if(wndAfter) wp.hwndInsertAfter = wndAfter->getWindowHandle(); 218 } 219 if(win32wnd->MsgPosChanging((LPARAM)&wp) == 0) 220 {//app or default window handler changed wp 221 dprintf(("OS2: WM_ADJUSTWINDOWPOS, app changed windowpos struct")); 222 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 223 OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, hParent, hFrame); 224 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 225 pswp->fl |= SWP_NOADJUST; 226 pswp->hwndInsertBehind = hwndAfter; 227 pswp->hwnd = hFrame; 228 229 RestoreOS2TIB(); 230 return (MRESULT)0xf; 231 } 232 break; 233 } 234 235 case WM_WINDOWPOSCHANGED: 236 { 237 PSWP pswp = (PSWP)mp1; 238 SWP swpOld = *(pswp + 1); 239 WINDOWPOS wp; 240 ULONG parentHeight = 0; 241 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE; 242 LONG yDelta = pswp->cy - swpOld.cy; 243 LONG xDelta = pswp->cx - swpOld.cx; 244 245 dprintf(("PMFRAME: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 246 RestoreOS2TIB(); 247 rc = OldFrameProc(hwnd,msg,mp1,mp2); 248 SetWin32TIB(); 249 // dprintf(("After calling frameproc: (%x) %x %x (%d,%d) (%d,%d)", mp2, hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 250 251 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 252 break; 253 254 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 255 if (win32wnd->isChild()) { 256 if(win32wnd->getParent()) { 257 hParent = win32wnd->getParent()->getOS2WindowHandle(); 258 } 259 else break; //parent has just been destroyed 260 } 261 } 262 OSLibMapSWPtoWINDOWPOSFrame(pswp, &wp, &swpOld, hParent, hwnd); 263 264 //delta is difference between old and new client height 265 yDelta = swpOld.cy - win32wnd->getWindowHeight(); 266 267 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); 268 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 269 270 if(!win32wnd->CanReceiveSizeMsgs()) 271 break; 272 273 wp.hwnd = win32wnd->getWindowHandle(); 274 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) 275 { 276 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind); 277 if(wndAfter) wp.hwndInsertAfter = wndAfter->getWindowHandle(); 278 } 279 280 if (yDelta != 0 || xDelta != 0) 281 { 282 HENUM henum = WinBeginEnumWindows(WinWindowFromID(pswp->hwnd, FID_CLIENT)); 283 SWP swp[10]; 284 int i = 0; 285 HWND hwnd; 286 287 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE) 288 { 289 #if 0 290 if (mdiClient ) 291 { 292 continue; 293 } 294 #endif 295 WinQueryWindowPos(hwnd, &(swp[i])); 296 297 #ifdef DEBUG 298 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromOS2Handle(hwnd); 299 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) %x", (window) ? window->getWindowHandle() : hwnd, 300 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy, swp[i].fl)); 301 #endif 302 303 if(swp[i].y != 0) { 304 //child window at offset <> 0 from client area -> offset now changes 305 swp[i].y += yDelta; 306 swp[i].fl &= ~(SWP_NOREDRAW); 307 } 308 //else child window with the same start coorindates as the client area 309 //The app should resize it. 310 311 if (i == 9) 312 { 313 WinSetMultWindowPos(GetThreadHAB(), swp, 10); 314 i = 0; 315 } 316 else 317 { 318 i++; 319 } 320 } 321 322 WinEndEnumWindows(henum); 323 324 if (i) 325 WinSetMultWindowPos(GetThreadHAB(), swp, i); 326 } 327 if (yDelta != 0) 328 { 329 POINT pt; 330 if(GetCaretPos (&pt) == TRUE) 331 { 332 pt.y -= yDelta; 333 SetCaretPos (pt.x, pt.y); 334 } 335 } 336 win32wnd->MsgPosChanged((LPARAM)&wp); 337 break; 338 } 339 #else 179 340 case WM_ADJUSTWINDOWPOS: 180 341 { … … 185 346 if(wndchild && wndchild->isChild()) 186 347 { 187 #if 0188 SWP swp = *pswp;189 190 MRESULT rc = OldFrameProc(hwnd, msg, mp1, mp2);191 pswp->x = swp.x;192 pswp->y = swp.y;193 pswp->fl = swp.fl;194 #endif195 348 dprintf(("PMFRAME: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 196 349 RestoreOS2TIB(); … … 199 352 goto RunDefFrameProc; 200 353 } 201 #if 0 202 case WM_WINDOWPOSCHANGED: 203 { 204 PSWP pswp = (PSWP)mp1; 205 dprintf(("PMFRAME: WM_WINDOWPOSCHANGED %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 206 goto RunDefFrameProc; 207 } 208 209 case WM_FORMATFRAME: 210 { 211 PSWP pswp = (PSWP)mp1; 212 dprintf(("PMFRAME: WM_FORMATFRAME %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 213 goto RunDefFrameProc; 214 } 354 215 355 #endif 216 356 … … 224 364 225 365 case WM_MOUSEMOVE: 226 #ifdef PMFRAMELOG227 dprintf(("PMFRAME: WM_MOUSEMOVE"));228 #endif229 366 if (InSizeBox(win32wnd,(POINTS*)&mp1)) 230 367 { -
TabularUnified tags/trunk/src/user32/pmwindow.cpp ¶
r11979 r11993 1 /* $Id: pmwindow.cpp,v 1. 39 1999-10-21 12:19:27 sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.40 1999-10-22 18:11:47 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 247 247 break; 248 248 249 case WM_ADJUSTWINDOWPOS:250 {251 PSWP pswp = (PSWP)mp1;252 SWP swpOld;253 WINDOWPOS wp;254 ULONG parentHeight = 0;255 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE, hwndAfter;256 257 dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));258 259 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto RunDefWndProc;;260 261 //SvL: TODO: Workaround. Why is this happening?262 // When this flag is set the coordinates are 0, even though SWP_SIZE & SWP_MOVE are set.263 // if ((pswp->fl & SWP_NOADJUST)) goto RunDefWndProc;264 265 if(!win32wnd->CanReceiveSizeMsgs()) goto RunDefWndProc;;266 267 WinQueryWindowPos(hwnd, &swpOld);268 269 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {270 if (win32wnd->isChild()) {271 if(win32wnd->getParent()) {272 hParent = win32wnd->getParent()->getOS2WindowHandle();273 }274 else goto RunDefWndProc;;275 }276 }277 hwndAfter = pswp->hwndInsertBehind;278 hFrame = win32wnd->getOS2FrameWindowHandle();279 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame);280 281 wp.hwnd = win32wnd->getWindowHandle();282 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))283 {284 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);285 if(wndAfter) wp.hwndInsertAfter = wndAfter->getWindowHandle();286 }287 if(win32wnd->MsgPosChanging((LPARAM)&wp) == 0)288 {//app or default window handler changed wp289 dprintf(("OS2: WM_ADJUSTWINDOWPOS, app changed windowpos struct"));290 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));291 OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, hParent, hFrame);292 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));293 pswp->fl |= SWP_NOADJUST;294 pswp->hwndInsertBehind = hwndAfter;295 pswp->hwnd = hFrame;296 297 WinSetMultWindowPos(GetThreadHAB(), pswp, 1);298 return (MRESULT)0;299 }300 break;301 }302 303 case WM_WINDOWPOSCHANGED:304 {305 PSWP pswp = (PSWP)mp1;306 SWP swpOld = *(pswp + 1);307 WINDOWPOS wp;308 ULONG parentHeight = 0;309 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE;310 LONG yDelta = pswp->cy - swpOld.cy;311 LONG xDelta = pswp->cx - swpOld.cx;312 313 dprintf(("OS2: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));314 315 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;316 if(!win32wnd->CanReceiveSizeMsgs()) break;317 318 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {319 if (win32wnd->isChild()) {320 if(win32wnd->getParent()) {321 hParent = win32wnd->getParent()->getOS2WindowHandle();322 }323 else goto RunDefWndProc; //parent has just been destroyed324 }325 }326 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hwnd);327 328 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);329 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);330 331 wp.hwnd = win32wnd->getWindowHandle();332 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))333 {334 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);335 wp.hwndInsertAfter = wndAfter->getWindowHandle();336 }337 338 if (yDelta != 0 || xDelta != 0)339 {340 HENUM henum = WinBeginEnumWindows(pswp->hwnd);341 SWP swp[10];342 int i = 0;343 HWND hwnd;344 345 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE)346 {347 #if 0348 if (mdiClient )349 {350 continue;351 }352 #endif353 WinQueryWindowPos(hwnd, &(swp[i]));354 355 #ifdef DEBUG356 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromOS2Handle(hwnd);357 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) %x", (window) ? window->getWindowHandle() : hwnd,358 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy, swp[i].fl));359 #endif360 361 if(swp[i].y != 0) {362 //child window at offset <> 0 from client area -> offset now changes363 swp[i].y += yDelta;364 swp[i].fl &= ~(SWP_NOREDRAW);365 }366 //else child window with the same start coorindates as the client area367 //The app should resize it.368 369 if (i == 9)370 {371 WinSetMultWindowPos(GetThreadHAB(), swp, 10);372 i = 0;373 }374 else375 {376 i++;377 }378 }379 380 WinEndEnumWindows(henum);381 382 if (i)383 WinSetMultWindowPos(GetThreadHAB(), swp, i);384 }385 if (yDelta != 0)386 {387 POINT pt;388 if(GetCaretPos (&pt) == TRUE)389 {390 pt.y -= yDelta;391 SetCaretPos (pt.x, pt.y);392 }393 }394 win32wnd->MsgPosChanged((LPARAM)&wp);395 396 goto RunDefWndProc;397 }398 399 249 case WM_SIZE: 400 250 { -
TabularUnified tags/trunk/src/user32/timer.cpp ¶
r11683 r11993 1 /* $Id: timer.cpp,v 1. 4 1999-09-29 09:31:18 dengertExp $ */1 /* $Id: timer.cpp,v 1.5 1999-10-22 18:11:47 sandervl Exp $ */ 2 2 3 3 /* … … 177 177 { 178 178 UINT rc; 179 USHORT sel = RestoreOS2FS();180 179 181 180 dprintf(("USER32: SetTimer %04x %d %d %08lx", hwnd, id, timeout, (LONG)proc)); 182 181 183 182 rc = TIMER_SetTimer (hwnd, id, timeout, proc, FALSE); 184 SetFS(sel);185 183 return (rc); 186 184 } … … 192 190 { 193 191 UINT rc; 194 USHORT sel = RestoreOS2FS();195 192 196 193 dprintf(("USER32: SetSystemTimer %04x %d %d %08lx", hwnd, id, timeout, (LONG)proc)); 197 194 198 195 rc = TIMER_SetTimer (hwnd, id, timeout, proc, TRUE); 199 SetFS(sel);200 196 return (rc); 201 197 } … … 207 203 { 208 204 BOOL rc; 209 USHORT sel = RestoreOS2FS();210 205 211 206 dprintf(("USER32: KillTimer %04x %d", hwnd, id)); 212 207 213 208 rc = TIMER_KillTimer (hwnd, id, FALSE); 214 SetFS(sel);215 209 return (rc); 216 210 } … … 222 216 { 223 217 BOOL rc; 224 USHORT sel = RestoreOS2FS();225 218 226 219 dprintf(("USER32: KillSystemTimer %04x %d", hwnd, id)); 227 220 228 221 rc = TIMER_KillTimer (hwnd, id, TRUE); 229 SetFS(sel); 230 return (rc); 231 } 232 222 return (rc); 223 } 224 -
TabularUnified tags/trunk/src/user32/user32exp.def ¶
r11921 r11993 576 576 GetOS2Callback__15Win32WindowProcFv @2001 577 577 _GetSysColorPen@4 @2002 578 _NativeDlgBoxIP@24 @2003579 _NativeCreateDlgIP@24 @2004580 578 _NativeLoadBitmap@8 @2005 581 579 Win32ToOS2Handle__FUl @2006 -
TabularUnified tags/trunk/src/user32/win32wbase.cpp ¶
r11979 r11993 1 /* $Id: win32wbase.cpp,v 1.5 8 1999-10-21 12:19:28 sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.59 1999-10-22 18:11:48 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 137 137 fNoSizeMsg = FALSE; 138 138 fIsDestroyed = FALSE; 139 fCreated = FALSE; 139 140 140 141 windowNameA = NULL; … … 558 559 POINT maxPos; 559 560 CREATESTRUCTA *cs = tmpcs; //pointer to CREATESTRUCT used in CreateWindowExA method 561 RECT rectWndTmp, rectClientTmp; 560 562 561 563 OS2Hwnd = hwndClient; 562 564 OS2HwndFrame = hwndFrame; 563 // if(!isFrameWindow()) 564 // OS2HwndFrame = hwndClient; 565 566 //make backup copy of rectangles (some calls below result in WM_WINDOWPOSCHANGED with weird values since we haven't 567 //set our window size just yet) 568 rectWndTmp = rectWindow; 569 rectClientTmp = rectClient; 565 570 566 571 fNoSizeMsg = TRUE; … … 621 626 fakeWinBase.hwndThis = OS2Hwnd; 622 627 fakeWinBase.pWindowClass = windowClass; 623 // SetFakeOpen32();624 628 625 629 //Set icon from class … … 649 653 if (isChild()) FrameSetBorderSize(this,TRUE); 650 654 655 //restore rectangles (some calls below result in WM_WINDOWPOSCHANGED with weird values since we haven't 656 //set our window size just yet) 657 rectWindow = rectWndTmp; 658 rectClient = rectClientTmp; 659 651 660 /* Send the WM_CREATE message 652 661 * Perhaps we shouldn't allow width/height changes as well. … … 672 681 if(SendMessageA(WM_NCCREATE, 0, (LPARAM)cs) ) 673 682 { 683 fCreated = TRUE; 684 674 685 SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient ); 675 686 … … 1559 1570 return result; 1560 1571 } 1572 case WM_NOTIFY: 1573 return 0; //comctl32 controls expect this 1561 1574 1562 1575 default: 1576 if(Msg > WM_USER) { 1577 return 0; 1578 } 1563 1579 return 1; 1564 1580 } … … 1593 1609 LRESULT rc; 1594 1610 BOOL fInternalMsgBackup = fInternalMsg; 1611 1612 //SvL: Some Wine controls send WM_COMMAND messages when they receive the focus -> apps don't like to 1613 // receive those before they get their WM_CREATE message 1614 //NOTE: May need to refuse more messages 1615 if(fCreated == FALSE && Msg == WM_COMMAND) { 1616 dprintf(("SendMessageA BEFORE creation! %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 1617 return 0; 1618 } 1595 1619 1596 1620 if(Msg != WM_GETDLGCODE && Msg != WM_ENTERIDLE) {//sent *very* often … … 1646 1670 LRESULT rc; 1647 1671 BOOL fInternalMsgBackup = fInternalMsg; 1672 1673 //SvL: Some Wine controls send WM_COMMAND messages when they receive the focus -> apps don't like to 1674 // receive those before they get their WM_CREATE message 1675 //NOTE: May need to refuse more messages 1676 if(fCreated == FALSE && Msg == WM_COMMAND) { 1677 dprintf(("SendMessageA BEFORE creation! %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 1678 return 0; 1679 } 1648 1680 1649 1681 if(Msg != WM_GETDLGCODE && Msg != WM_ENTERIDLE) {//sent *very* often -
TabularUnified tags/trunk/src/user32/win32wbase.h ¶
r11964 r11993 1 /* $Id: win32wbase.h,v 1.3 1 1999-10-20 13:46:28 sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.32 1999-10-22 18:11:48 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 264 264 BOOL fNoSizeMsg; 265 265 BOOL fIsDestroyed; 266 BOOL fCreated; 266 267 267 268 PVOID pOldFrameProc; -
TabularUnified tags/trunk/src/user32/window.cpp ¶
r11975 r11993 1 /* $Id: window.cpp,v 1.2 2 1999-10-20 22:35:54sandervl Exp $ */1 /* $Id: window.cpp,v 1.23 1999-10-22 18:11:50 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 801 801 point.y = wndto->getWindowHeight() - point.y; 802 802 803 WORDxinc = point.x - lpPoints->x;804 WORDyinc = point.y - lpPoints->y;805 806 for(int i= 1;i<cPoints;i++)803 short int xinc = point.x - lpPoints->x; 804 short int yinc = point.y - lpPoints->y; 805 806 for(int i=0;i<cPoints;i++) 807 807 { 808 808 lpPoints[i].x += xinc; 809 809 lpPoints[i].y += yinc; 810 810 } 811 retval = (( DWORD)yinc << 16) | xinc;811 retval = ((LONG)yinc << 16) | xinc; 812 812 return retval; 813 813 } -
TabularUnified tags/trunk/src/user32/winmenu.cpp ¶
r11621 r11993 1 /* $Id: winmenu.cpp,v 1. 7 1999-09-24 12:47:51 sandervl Exp $ */1 /* $Id: winmenu.cpp,v 1.8 1999-10-22 18:11:51 sandervl Exp $ */ 2 2 3 3 /* … … 296 296 const RECT *, arg7) 297 297 { 298 dprintf(("USER32: TrackPopupMenu\n")); 299 if(hMenu == 0) 300 { 301 SetLastError(ERROR_INVALID_PARAMETER); 302 return 0; 303 } 304 return O32_TrackPopupMenu(hMenu, arg2, arg3, arg4, arg5, arg6, arg7); 298 Win32BaseWindow *window; 299 300 window = Win32BaseWindow::GetWindowFromHandle(arg6); 301 if(!window) 302 { 303 dprintf(("TrackPopupMenu, window %x not found", arg6)); 304 return 0; 305 } 306 dprintf(("USER32: TrackPopupMenu\n")); 307 if(hMenu == 0) 308 { 309 SetLastError(ERROR_INVALID_PARAMETER); 310 return 0; 311 } 312 return O32_TrackPopupMenu(hMenu, arg2, arg3, arg4, arg5, window->getOS2WindowHandle(), 313 arg7); 305 314 } 306 315 //****************************************************************************** … … 314 323 LPTPMPARAMS, lpPM) 315 324 { 316 RECT *rect = NULL; 317 318 dprintf(("USER32: TrackPopupMenuEx, not completely implemented\n")); 319 if(lpPM->cbSize != 0) 320 rect = &lpPM->rcExclude; 321 322 if(hMenu == 0) 323 { 324 SetLastError(ERROR_INVALID_PARAMETER); 325 return 0; 326 } 327 return O32_TrackPopupMenu(hMenu, flags, X, Y, 0, hwnd, rect); 325 RECT *rect = NULL; 326 Win32BaseWindow *window; 327 328 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 329 if(!window) 330 { 331 dprintf(("TrackPopupMenu, window %x not found", hwnd)); 332 return 0; 333 } 334 335 dprintf(("USER32: TrackPopupMenuEx, not completely implemented\n")); 336 if(lpPM->cbSize != 0) 337 rect = &lpPM->rcExclude; 338 339 if(hMenu == 0) 340 { 341 SetLastError(ERROR_INVALID_PARAMETER); 342 return 0; 343 } 344 return O32_TrackPopupMenu(hMenu, flags, X, Y, 0, window->getOS2WindowHandle(), rect); 328 345 } 329 346 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.