- Timestamp:
- Dec 14, 1999, 8:13:20 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r2016 r2076 1 /* $Id: dc.cpp,v 1.2 7 1999-12-07 20:43:39sandervl Exp $ */1 /* $Id: dc.cpp,v 1.28 1999-12-14 19:13:18 sandervl Exp $ */ 2 2 3 3 /* … … 610 610 if (hwnd) 611 611 { 612 wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 613 if (flags & DCX_WINDOW_W) 614 hWindow = wnd->getOS2FrameWindowHandle(); 615 else 616 hWindow = wnd->getOS2WindowHandle(); 612 wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 613 if(wnd == NULL) { 614 dprintf (("ERROR: User32: GetDCEx bad window handle %X!!!!!", hwnd)); 615 O32_SetLastError(ERROR_INVALID_WINDOW_HANDLE_W); 616 return 0; 617 } 618 //SvL: Experimental change (doesn't work right) 619 #if 0 620 if(wnd->fHasParentDC() && wnd->getParent()) { 621 wnd = wnd->getParent(); 622 } 623 #endif 624 if (flags & DCX_WINDOW_W) 625 hWindow = wnd->getOS2FrameWindowHandle(); 626 else 627 hWindow = wnd->getOS2WindowHandle(); 617 628 } 618 629 else -
trunk/src/user32/pmwindow.cpp
r1981 r2076 1 /* $Id: pmwindow.cpp,v 1.6 3 1999-12-05 14:31:41sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.64 1999-12-14 19:13:19 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 781 781 782 782 case WM_INITMENU: 783 win32wnd->MsgInitMenu((HWND)mp2); 784 break; 785 783 786 case WM_MENUSELECT: 784 787 case WM_MENUEND: -
trunk/src/user32/win32class.cpp
r2041 r2076 1 /* $Id: win32class.cpp,v 1. 9 1999-12-09 11:00:02sandervl Exp $ */1 /* $Id: win32class.cpp,v 1.10 1999-12-14 19:13:19 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Managment Code for OS/2 … … 107 107 windowStyle = wndclass->style; 108 108 WINPROC_SetProc((HWINDOWPROC *)&windowProc, wndclass->lpfnWndProc, (isUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_CLASS); 109 dprintf2(("Window class ptr %x", windowProc)); 109 110 110 111 //User data class words/longs … … 392 393 ULONG rc; 393 394 395 if(classNameA) { 396 dprintf2(("Win32WndClass::setClassLongA %s: %d %x", classNameA, index, lNewVal)); 397 } 398 else dprintf2(("Win32WndClass::setClassLongA %d: %d %x", classAtom, index, lNewVal)); 394 399 switch(index) { 395 400 case GCL_CBCLSEXTRA: //TODO (doesn't affect allocated classes, so what does it do?) -
trunk/src/user32/win32wbase.cpp
r2040 r2076 1 /* $Id: win32wbase.cpp,v 1.1 09 1999-12-09 10:59:04sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.110 1999-12-14 19:13:19 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 147 147 fCreated = FALSE; 148 148 fTaskList = FALSE; 149 fParentDC = FALSE; 149 150 150 151 windowNameA = NULL; … … 270 271 BOOL Win32BaseWindow::IsWindowUnicode() 271 272 { 273 // dprintf2(("IsWindowUnicode %x %d", getWindowHandle(), WINPROC_GetProcType(getWindowProc()) == WIN_PROC_32W)); 272 274 return (WINPROC_GetProcType(getWindowProc()) == WIN_PROC_32W); 273 275 } … … 440 442 } 441 443 442 WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, windowClass->getWindowProc(), (isUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_WINDOW);444 WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, windowClass->getWindowProc(), WINPROC_GetProcType(windowClass->getWindowProc()), WIN_PROC_WINDOW); 443 445 hInstance = cs->hInstance; 444 446 dwStyle = cs->style & ~WS_VISIBLE; … … 634 636 if(windowClass->getStyle() & CS_OWNDC) { 635 637 dprintf(("Class with CS_OWNDC style")); 636 // ownDC = GetWindowDC(getWindowHandle());638 // ownDC = GetWindowDC(getWindowHandle()); 637 639 } 638 640 else 639 641 if (windowClass->getStyle() & CS_PARENTDC) { 640 642 dprintf(("ERROR: Class with CS_PARENTDC style -> NOT IMPLEMENTED!")); 643 fParentDC = TRUE; 641 644 ownDC = 0; 642 645 } … … 1221 1224 } 1222 1225 //****************************************************************************** 1226 //TODO: Depending on menu type, we should send WM_INITMENU or WM_INITPOPUPMENU 1227 //TODO: PM sends it for each submenu that gets activated; Windows only for the first 1228 // submenu; once the menu bar is active, moving the cursor doesn't generate other 1229 // WM_INITMENU msgs. Not really a problem, but might need to fix this later on. 1230 //****************************************************************************** 1231 void Win32BaseWindow::MsgInitMenu(HWND hMenu) 1232 { 1233 SendInternalMessageA(WM_INITMENU, (WPARAM)hMenu, 0); 1234 } 1235 //****************************************************************************** 1223 1236 //****************************************************************************** 1224 1237 ULONG Win32BaseWindow::MsgPaint(ULONG tmp1, BOOL select) … … 2223 2236 if(parentwindow) { 2224 2237 if(Msg == WM_CREATE || Msg == WM_DESTROY) { 2225 parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle());2238 parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, getWindowId()), (LPARAM)getWindowHandle()); 2226 2239 } 2227 else parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam );2240 else parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, getWindowId()), lParam ); 2228 2241 } 2229 2242 } … … 2974 2987 LONG oldval; 2975 2988 2976 dprintf2(("SetWindowLong A %x %d %x", getWindowHandle(), index, value));2989 dprintf2(("SetWindowLong%c %x %d %x", (fUnicode) ? 'W' : 'A', getWindowHandle(), index, value)); 2977 2990 switch(index) { 2978 2991 case GWL_EXSTYLE: -
trunk/src/user32/win32wbase.h
r2033 r2076 1 /* $Id: win32wbase.h,v 1.5 2 1999-12-09 00:53:38sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.53 1999-12-14 19:13:20 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 98 98 char *MsgGetText(); 99 99 ULONG MsgContextMenu(ULONG x,ULONG y); 100 100 void MsgInitMenu(HWND hMenu); 101 101 VOID updateWindowStyle(DWORD oldExStyle,DWORD oldStyle); 102 102 … … 121 121 virtual BOOL isMDIClient(); 122 122 virtual BOOL isMDIChild(); 123 124 BOOL fHasParentDC() { return fParentDC; }; 123 125 124 126 Win32BaseWindow *getParent(); … … 186 188 BOOL IsWindowVisible(); 187 189 //Created with CreateWindowExA or ExW 188 BOOL IsUnicode() { return isUnicode; };190 // BOOL IsUnicode() { return isUnicode; }; 189 191 //Window procedure type 190 192 BOOL IsWindowUnicode(); … … 306 308 BOOL fCreated; 307 309 BOOL fTaskList; //should be listed in PM tasklist or not 310 BOOL fParentDC; 308 311 309 312 PVOID pOldFrameProc; -
trunk/src/user32/win32wmdichild.cpp
r2033 r2076 1 /* $Id: win32wmdichild.cpp,v 1.1 0 1999-12-09 00:53:38sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.11 1999-12-14 19:13:20 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 347 347 className = (LPSTR)cs->szClass; 348 348 /* Find the class atom */ 349 if (!(classAtom = (client->IsUnicode() ? GlobalFindAtomW((LPWSTR)cs->szClass) : 350 GlobalFindAtomA(cs->szClass)))) 351 349 classAtom = GlobalFindAtomA(cs->szClass); 350 if(classAtom == 0) 352 351 { 353 352 if (!HIWORD(cs->szClass)) 354 353 { 355 if(!client->IsUnicode()) 356 { 357 sprintf(tmpClassA,"#%d", (int) className); 358 classAtom = GlobalFindAtomA(tmpClassA); 359 className = tmpClassA; 360 } 361 else 362 { 363 sprintf(tmpClassA,"#%d", (int) className); 364 AsciiToUnicode(tmpClassA, tmpClassW); 365 classAtom = GlobalFindAtomW(tmpClassW); 366 className = (LPSTR)tmpClassW; 367 } 354 sprintf(tmpClassA,"#%d", (int) className); 355 classAtom = GlobalFindAtomA(tmpClassA); 356 className = tmpClassA; 368 357 } 369 358 if (!classAtom) … … 380 369 createstruct.lpszClass = className; 381 370 382 newchild = new Win32MDIChildWindow(&createstruct, classAtom, client->IsUnicode());371 newchild = new Win32MDIChildWindow(&createstruct, classAtom, FALSE); 383 372 384 373 if(newchild && GetLastError() == 0)
Note:
See TracChangeset
for help on using the changeset viewer.