- Timestamp:
- Oct 11, 1999, 10:54:26 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibwin.cpp
r1248 r1253 1 /* $Id: oslibwin.cpp,v 1.2 0 1999-10-11 16:04:50 cbratschiExp $ */1 /* $Id: oslibwin.cpp,v 1.21 1999-10-11 20:54:24 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 119 119 *OSWinStyle |= WS_TABSTOP; 120 120 121 if (dwStyle & WS_CHILD_W)121 if(dwStyle & WS_CHILD_W && !((dwStyle & WS_CAPTION_W) == WS_CAPTION_W)) 122 122 { 123 123 //SvL: Causes crash in VPBuddy if enabled -> find bug … … 140 140 141 141 } else if (*dwExStyle & WS_EX_WINDOWEDGE_W); //no border 142 //SvL: Causes crash in VPBuddy if enabled -> find bug143 #if 0144 else if (dwStyle & WS_BORDER_W)145 {146 *OSFrameStyle |= FCF_SIZEBORDER;147 *borderHeight = *borderWidth = 1;148 }149 #endif150 142 151 143 if(dwStyle & WS_VSCROLL_W) … … 153 145 if(dwStyle & WS_HSCROLL_W) 154 146 *OSFrameStyle |= FCF_HORZSCROLL; 155 } else 147 } 148 else 156 149 { 157 150 if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) -
trunk/src/user32/win32dlg.cpp
r1248 r1253 1 /* $Id: win32dlg.cpp,v 1.1 0 1999-10-11 16:04:51 cbratschiExp $ */1 /* $Id: win32dlg.cpp,v 1.11 1999-10-11 20:54:25 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 1065 1065 if (!fPrevious) break; 1066 1066 } 1067 1068 nextchild = (Win32BaseWindow *)nextchild->getNextChild(); 1067 1069 } 1068 1070 retvalue = lastchild->getWindowHandle(); -
trunk/src/user32/win32wbase.cpp
r1248 r1253 1 /* $Id: win32wbase.cpp,v 1.3 5 1999-10-11 16:04:51 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.36 1999-10-11 20:54:25 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 58 58 !(style & (WS_CHILD | WS_POPUP)) 59 59 60 void PrintWindowStyle(DWORD dwStyle, DWORD dwExStyle); 61 60 62 //****************************************************************************** 61 63 //****************************************************************************** … … 134 136 hwndHorzScroll = 0; 135 137 hwndVertScroll = 0; 138 139 ownDC = 0; 136 140 } 137 141 //****************************************************************************** … … 185 189 INT sw = SW_SHOW; 186 190 POINT maxSize, maxPos, minTrack, maxTrack; 191 192 #ifdef DEBUG 193 PrintWindowStyle(cs->style, cs->dwExStyle); 194 #endif 187 195 188 196 SetLastError(0); … … 1457 1465 if( ctlType == CTLCOLOR_SCROLLBAR) 1458 1466 { 1459 1467 HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR); 1460 1468 COLORREF bk = GetSysColor(COLOR_3DHILIGHT); 1461 1469 SetTextColor( hdc, GetSysColor(COLOR_3DFACE)); … … 1478 1486 SetTextColor( hdc, GetSysColor(COLOR_WINDOWTEXT)); 1479 1487 1480 1481 1482 1483 1484 1485 1486 1487 1488 1488 if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX)) 1489 { 1490 SetBkColor( hdc, GetSysColor(COLOR_WINDOW) ); 1491 } 1492 else 1493 { 1494 SetBkColor( hdc, GetSysColor(COLOR_3DFACE) ); 1495 return (LRESULT)GetSysColorBrush(COLOR_3DFACE); 1496 } 1489 1497 return (LRESULT)GetSysColorBrush(COLOR_WINDOW); 1490 1498 } … … 1532 1540 1533 1541 case WM_CTLCOLOR: 1534 1542 return DefWndControlColor(HIWORD(lParam), (HDC)wParam); 1535 1543 1536 1544 case WM_VKEYTOITEM: … … 2044 2052 wpos.hwnd = getWindowHandle(); 2045 2053 2046 if(~fuFlags & (SWP_NOMOVE | SWP_NOSIZE)) { 2054 if(~fuFlags & (SWP_NOMOVE | SWP_NOSIZE)) 2055 { 2047 2056 if (isChild()) 2048 2057 { … … 2088 2097 if (rc == FALSE) 2089 2098 { 2099 dprintf(("OSLibWinSetMultWindowPos failed!")); 2090 2100 } 2091 2101 else … … 2636 2646 //****************************************************************************** 2637 2647 //****************************************************************************** 2648 #ifdef DEBUG 2649 void PrintWindowStyle(DWORD dwStyle, DWORD dwExStyle) 2650 { 2651 char style[256] = ""; 2652 char exstyle[256] = ""; 2653 2654 /* Window styles */ 2655 if(dwStyle & WS_CHILD) 2656 strcat(style, "WS_CHILD "); 2657 if(dwStyle & WS_POPUP) 2658 strcat(style, "WS_POPUP "); 2659 if(dwStyle & WS_VISIBLE) 2660 strcat(style, "WS_VISIBLE "); 2661 if(dwStyle & WS_DISABLED) 2662 strcat(style, "WS_DISABLED "); 2663 if(dwStyle & WS_CLIPSIBLINGS) 2664 strcat(style, "WS_CLIPSIBLINGS "); 2665 if(dwStyle & WS_CLIPCHILDREN) 2666 strcat(style, "WS_CLIPCHILDREN "); 2667 if(dwStyle & WS_MAXIMIZE) 2668 strcat(style, "WS_MAXIMIZE "); 2669 if(dwStyle & WS_MINIMIZE) 2670 strcat(style, "WS_MINIMIZE "); 2671 if(dwStyle & WS_GROUP) 2672 strcat(style, "WS_GROUP "); 2673 if(dwStyle & WS_TABSTOP) 2674 strcat(style, "WS_TABSTOP "); 2675 2676 if((dwStyle & WS_CAPTION) == WS_CAPTION) 2677 strcat(style, "WS_CAPTION "); 2678 if(dwStyle & WS_DLGFRAME) 2679 strcat(style, "WS_DLGFRAME "); 2680 if(dwStyle & WS_BORDER) 2681 strcat(style, "WS_BORDER "); 2682 2683 if(dwStyle & WS_VSCROLL) 2684 strcat(style, "WS_VSCROLL "); 2685 if(dwStyle & WS_HSCROLL) 2686 strcat(style, "WS_HSCROLL "); 2687 if(dwStyle & WS_SYSMENU) 2688 strcat(style, "WS_SYSMENU "); 2689 if(dwStyle & WS_THICKFRAME) 2690 strcat(style, "WS_THICKFRAME "); 2691 if(dwStyle & WS_MINIMIZEBOX) 2692 strcat(style, "WS_MINIMIZEBOX "); 2693 if(dwStyle & WS_MAXIMIZEBOX) 2694 strcat(style, "WS_MAXIMIZEBOX "); 2695 2696 if(dwExStyle & WS_EX_DLGMODALFRAME) 2697 strcat(exstyle, "WS_EX_DLGMODALFRAME "); 2698 if(dwExStyle & WS_EX_ACCEPTFILES) 2699 strcat(exstyle, "WS_EX_ACCEPTFILES "); 2700 if(dwExStyle & WS_EX_NOPARENTNOTIFY) 2701 strcat(exstyle, "WS_EX_NOPARENTNOTIFY "); 2702 if(dwExStyle & WS_EX_TOPMOST) 2703 strcat(exstyle, "WS_EX_TOPMOST "); 2704 if(dwExStyle & WS_EX_TRANSPARENT) 2705 strcat(exstyle, "WS_EX_TRANSPARENT "); 2706 2707 if(dwExStyle & WS_EX_MDICHILD) 2708 strcat(exstyle, "WS_EX_MDICHILD "); 2709 if(dwExStyle & WS_EX_TOOLWINDOW) 2710 strcat(exstyle, "WS_EX_TOOLWINDOW "); 2711 if(dwExStyle & WS_EX_WINDOWEDGE) 2712 strcat(exstyle, "WS_EX_WINDOWEDGE "); 2713 if(dwExStyle & WS_EX_CLIENTEDGE) 2714 strcat(exstyle, "WS_EX_CLIENTEDGE "); 2715 if(dwExStyle & WS_EX_CONTEXTHELP) 2716 strcat(exstyle, "WS_EX_CONTEXTHELP "); 2717 if(dwExStyle & WS_EX_RIGHT) 2718 strcat(exstyle, "WS_EX_RIGHT "); 2719 if(dwExStyle & WS_EX_LEFT) 2720 strcat(exstyle, "WS_EX_LEFT "); 2721 if(dwExStyle & WS_EX_RTLREADING) 2722 strcat(exstyle, "WS_EX_RTLREADING "); 2723 if(dwExStyle & WS_EX_LTRREADING) 2724 strcat(exstyle, "WS_EX_LTRREADING "); 2725 if(dwExStyle & WS_EX_LEFTSCROLLBAR) 2726 strcat(exstyle, "WS_EX_LEFTSCROLLBAR "); 2727 if(dwExStyle & WS_EX_RIGHTSCROLLBAR) 2728 strcat(exstyle, "WS_EX_RIGHTSCROLLBAR "); 2729 if(dwExStyle & WS_EX_CONTROLPARENT) 2730 strcat(exstyle, "WS_EX_CONTROLPARENT "); 2731 if(dwExStyle & WS_EX_STATICEDGE) 2732 strcat(exstyle, "WS_EX_STATICEDGE "); 2733 if(dwExStyle & WS_EX_APPWINDOW) 2734 strcat(exstyle, "WS_EX_APPWINDOW "); 2735 2736 dprintf(("Window style: %x %s", dwStyle, style)); 2737 dprintf(("Window exStyle: %x %s", dwExStyle, exstyle)); 2738 } 2739 #endif 2740 //****************************************************************************** 2741 //****************************************************************************** 2638 2742 2639 2743 GenericObject *Win32BaseWindow::windows = NULL; -
trunk/src/user32/window.cpp
r1231 r1253 1 /* $Id: window.cpp,v 1.1 2 1999-10-09 18:16:57sandervl Exp $ */1 /* $Id: window.cpp,v 1.13 1999-10-11 20:54:26 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 19 19 #include <os2win.h> 20 20 #include <misc.h> 21 #include <string.h> 22 #include <stdio.h> 21 23 #include <win32wbase.h> 22 24 #include <win32wmdiclient.h> 23 25 #include <win32wdesktop.h> 26 #include "win32dlg.h" 24 27 #include <oslibwin.h> 25 28 #include <oslibgdi.h> … … 27 30 #include "winicon.h" 28 31 29 //******************************************************************************30 //******************************************************************************31 #ifdef DEBUG32 void PrintWindowStyle(DWORD dwStyle, DWORD dwExStyle)33 {34 char style[256] = "";35 char exstyle[256] = "";36 37 /* Window styles */38 if(dwStyle & WS_CHILD)39 strcat(style, "WS_CHILD ");40 if(dwStyle & WS_POPUP)41 strcat(style, "WS_POPUP ");42 if(dwStyle & WS_VISIBLE)43 strcat(style, "WS_VISIBLE ");44 if(dwStyle & WS_DISABLED)45 strcat(style, "WS_DISABLED ");46 if(dwStyle & WS_CLIPSIBLINGS)47 strcat(style, "WS_CLIPSIBLINGS ");48 if(dwStyle & WS_CLIPCHILDREN)49 strcat(style, "WS_CLIPCHILDREN ");50 if(dwStyle & WS_MAXIMIZE)51 strcat(style, "WS_MAXIMIZE ");52 if(dwStyle & WS_MINIMIZE)53 strcat(style, "WS_MINIMIZE ");54 if(dwStyle & WS_GROUP)55 strcat(style, "WS_GROUP ");56 if(dwStyle & WS_TABSTOP)57 strcat(style, "WS_TABSTOP ");58 59 if(dwStyle & WS_CAPTION)60 strcat(style, "WS_CAPTION ");61 if(dwStyle & WS_DLGFRAME)62 strcat(style, "WS_DLGFRAME ");63 if(dwStyle & WS_BORDER)64 strcat(style, "WS_BORDER ");65 66 if(dwStyle & WS_VSCROLL)67 strcat(style, "WS_VSCROLL ");68 if(dwStyle & WS_HSCROLL)69 strcat(style, "WS_HSCROLL ");70 if(dwStyle & WS_SYSMENU)71 strcat(style, "WS_SYSMENU ");72 if(dwStyle & WS_THICKFRAME)73 strcat(style, "WS_THICKFRAME ");74 if(dwStyle & WS_MINIMIZEBOX)75 strcat(style, "WS_MINIMIZEBOX ");76 if(dwStyle & WS_MAXIMIZEBOX)77 strcat(style, "WS_MAXIMIZEBOX ");78 79 if(dwExStyle & WS_EX_DLGMODALFRAME)80 strcat(exstyle, "WS_EX_DLGMODALFRAME ");81 if(dwExStyle & WS_EX_ACCEPTFILES)82 strcat(exstyle, "WS_EX_ACCEPTFILES ");83 if(dwExStyle & WS_EX_NOPARENTNOTIFY)84 strcat(exstyle, "WS_EX_NOPARENTNOTIFY ");85 if(dwExStyle & WS_EX_TOPMOST)86 strcat(exstyle, "WS_EX_TOPMOST ");87 if(dwExStyle & WS_EX_TRANSPARENT)88 strcat(exstyle, "WS_EX_TRANSPARENT ");89 90 if(dwExStyle & WS_EX_MDICHILD)91 strcat(exstyle, "WS_EX_MDICHILD ");92 if(dwExStyle & WS_EX_TOOLWINDOW)93 strcat(exstyle, "WS_EX_TOOLWINDOW ");94 if(dwExStyle & WS_EX_WINDOWEDGE)95 strcat(exstyle, "WS_EX_WINDOWEDGE ");96 if(dwExStyle & WS_EX_CLIENTEDGE)97 strcat(exstyle, "WS_EX_CLIENTEDGE ");98 if(dwExStyle & WS_EX_CONTEXTHELP)99 strcat(exstyle, "WS_EX_CONTEXTHELP ");100 if(dwExStyle & WS_EX_RIGHT)101 strcat(exstyle, "WS_EX_RIGHT ");102 if(dwExStyle & WS_EX_LEFT)103 strcat(exstyle, "WS_EX_LEFT ");104 if(dwExStyle & WS_EX_RTLREADING)105 strcat(exstyle, "WS_EX_RTLREADING ");106 if(dwExStyle & WS_EX_LTRREADING)107 strcat(exstyle, "WS_EX_LTRREADING ");108 if(dwExStyle & WS_EX_LEFTSCROLLBAR)109 strcat(exstyle, "WS_EX_LEFTSCROLLBAR ");110 if(dwExStyle & WS_EX_RIGHTSCROLLBAR)111 strcat(exstyle, "WS_EX_RIGHTSCROLLBAR ");112 if(dwExStyle & WS_EX_CONTROLPARENT)113 strcat(exstyle, "WS_EX_CONTROLPARENT ");114 if(dwExStyle & WS_EX_STATICEDGE)115 strcat(exstyle, "WS_EX_STATICEDGE ");116 if(dwExStyle & WS_EX_APPWINDOW)117 strcat(exstyle, "WS_EX_APPWINDOW ");118 119 dprintf(("Window style: %x %s", dwStyle, style));120 dprintf(("Window exStyle: %x %s", dwExStyle, exstyle));121 }122 #endif123 32 //****************************************************************************** 124 33 //****************************************************************************** … … 132 41 ATOM classAtom; 133 42 CREATESTRUCTA cs; 134 135 #ifdef DEBUG 136 PrintWindowStyle(style, exStyle); 137 #endif 43 char tmpClass[20]; 138 44 139 45 if(exStyle & WS_EX_MDICHILD) 140 46 return CreateMDIWindowA(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data); 141 47 142 //TODO: According to the docs className can be a 16 bits atom143 // Wine seems to assume it's a string though...144 48 /* Find the class atom */ 145 49 if (!(classAtom = GlobalFindAtomA(className))) 146 50 { 147 dprintf(("CreateWindowEx32A: bad class name ")); 148 if (!HIWORD(className)) { 149 dprintf(("CreateWindowEx32A: bad class name %04x\n", LOWORD(className))); 51 if (!HIWORD(className)) 52 { 53 sprintf(tmpClass,"#%d", (int) className); 54 classAtom = GlobalFindAtomA(tmpClass); 55 className = tmpClass; 150 56 } 151 else dprintf(("CreateWindowEx32A: bad class name '%s'\n", className )); 152 SetLastError(ERROR_INVALID_PARAMETER); 153 return 0; 57 if (!classAtom) 58 { 59 if (!HIWORD(className)) { 60 dprintf(("CreateWindowEx32W: bad class name %04x\n", LOWORD(className))); 61 } 62 else dprintf(("CreateWindowEx32W: bad class name '%s'\n", className )); 63 64 SetLastError(ERROR_INVALID_PARAMETER); 65 return 0; 66 } 154 67 } 155 68 … … 172 85 else dprintf(("CreateWindowExA: class %d parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle)); 173 86 174 //TODO: According to the docs className can be a 16 bits atom175 // Wine seems to assume it's a string though...176 87 if(!strcmpi(className, MDICLIENTCLASSNAMEA)) { 177 88 window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, FALSE); 89 } 90 else 91 if(!strcmpi((char *) className, DIALOG_CLASS_NAMEA)) 92 { 93 DLG_TEMPLATE dlgTemplate = {0}; 94 dlgTemplate.style = cs.style; 95 dlgTemplate.exStyle = cs.dwExStyle; 96 dlgTemplate.x = cs.x; 97 dlgTemplate.y = cs.y; 98 dlgTemplate.cx = cs.cx; 99 dlgTemplate.cy = cs.cy; 100 dlgTemplate.className = cs.lpszClass; 101 dlgTemplate.caption = cs.lpszName; 102 window = (Win32BaseWindow *) new Win32Dialog(cs.hInstance, 103 (LPCSTR) &dlgTemplate, 104 cs.hwndParent, 105 NULL, 106 (LPARAM) data, 107 FALSE); 178 108 } 179 109 else { … … 204 134 ATOM classAtom; 205 135 CREATESTRUCTA cs; 136 char tmpClassA[20]; 137 WCHAR tmpClassW[20]; 206 138 207 139 if(exStyle & WS_EX_MDICHILD) 208 140 return CreateMDIWindowW(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data); 209 141 210 //TODO: According to the docs className can be a 16 bits atom211 // Wine seems to assume it's a string though...212 142 /* Find the class atom */ 213 143 if (!(classAtom = GlobalFindAtomW(className))) 214 144 { 215 dprintf(("CreateWindowEx32A: bad class name ")); 216 if (!HIWORD(className)) { 217 dprintf(("CreateWindowEx32A: bad class name %04x\n", LOWORD(className))); 145 if (!HIWORD(className)) 146 { 147 sprintf(tmpClassA,"#%d", (int) className); 148 AsciiToUnicode(tmpClassA, tmpClassW); 149 classAtom = GlobalFindAtomW(tmpClassW); 150 className = (LPCWSTR)tmpClassW; 218 151 } 219 // else dprintf(("CreateWindowEx32A: bad class name '%s'\n", className )); 220 SetLastError(ERROR_INVALID_PARAMETER); 221 return 0; 152 if (!classAtom) 153 { 154 if (!HIWORD(className)) { 155 dprintf(("CreateWindowEx32W: bad class name %04x\n", LOWORD(className))); 156 } 157 else dprintf(("CreateWindowEx32W: bad class name ")); 158 159 SetLastError(ERROR_INVALID_PARAMETER); 160 return 0; 161 } 222 162 } 223 163 … … 236 176 cs.dwExStyle = exStyle; 237 177 238 //TODO: According to the docs className can be a 16 bits atom239 // Wine seems to assume it's a string though...240 178 if(!lstrcmpiW(className, (LPWSTR)MDICLIENTCLASSNAMEW)) { 241 179 window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, TRUE); 180 } 181 if(!lstrcmpiW(className, (LPWSTR)DIALOG_CLASS_NAMEW)) 182 { 183 DLG_TEMPLATE dlgTemplate = {0}; 184 dlgTemplate.style = cs.style; 185 dlgTemplate.exStyle = cs.dwExStyle; 186 dlgTemplate.x = cs.x; 187 dlgTemplate.y = cs.y; 188 dlgTemplate.cx = cs.cx; 189 dlgTemplate.cy = cs.cy; 190 dlgTemplate.className = cs.lpszClass; 191 dlgTemplate.caption = cs.lpszName; 192 window = (Win32BaseWindow *) new Win32Dialog(cs.hInstance, 193 (LPCSTR) &dlgTemplate, 194 cs.hwndParent, 195 NULL, 196 (LPARAM) data, 197 TRUE); 242 198 } 243 199 else {
Note:
See TracChangeset
for help on using the changeset viewer.