- Timestamp:
- Aug 28, 1999, 4:09:58 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/gen_object.cpp
r655 r724 1 /* $Id: gen_object.cpp,v 1. 3 1999-08-24 09:20:30sandervl Exp $ */1 /* $Id: gen_object.cpp,v 1.4 1999-08-28 14:09:29 sandervl Exp $ */ 2 2 /* 3 3 * Generic Object Class for OS/2 4 * 5 * Allocated in shared memory, so other processes can access the objects 6 * 7 * NOTE: Requires safety precautions to use objects in multiple threads or processes 4 8 * 5 9 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl) -
trunk/src/user32/new/gen_object.h
r655 r724 1 /* $Id: gen_object.h,v 1. 2 1999-08-24 09:20:30sandervl Exp $ */1 /* $Id: gen_object.h,v 1.3 1999-08-28 14:09:29 sandervl Exp $ */ 2 2 /* 3 3 * Generic Object Class for OS/2 … … 8 8 #ifndef __GEN_OBJECT_H__ 9 9 #define __GEN_OBJECT_H__ 10 11 #include "heapshared.h" 10 12 11 13 #define OBJTYPE_WINDOW 0 … … 38 40 static void leaveMutex(DWORD objType); 39 41 42 #ifdef __DEBUG_ALLOC__ 43 void *operator new(size_t size, const char *filename, size_t lineno) 44 { 45 return _umalloc(sharedHeap, size); 46 } 47 void operator delete(void *location, const char *filename, size_t lineno) 48 { 49 free(location); 50 } 51 #else 52 void *operator new(size_t size) 53 { 54 return _umalloc(sharedHeap, size); 55 } 56 void operator delete(void *location) 57 { 58 free(location); 59 } 60 #endif 61 40 62 private: 41 63 -
trunk/src/user32/new/initterm.cpp
r511 r724 1 /* $Id: initterm.cpp,v 1. 5 1999-08-16 16:55:33sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.6 1999-08-28 14:09:29 sandervl Exp $ */ 2 2 3 3 /* … … 36 36 #include <spy.h> 37 37 #include "pmwindow.h" 38 #include "heapshared.h" 38 39 39 40 /*-------------------------------------------------------------------*/ … … 93 94 InitSpyQueue(); 94 95 96 if(InitializeSharedHeap() == FALSE) 97 return 0UL; 98 95 99 //SvL: Init win32 PM classes 96 100 if(InitPM() == FALSE) { … … 125 129 dprintf(("user32 exit\n")); 126 130 UnregisterSystemClasses(); 131 DestroySharedHeap(); 127 132 _ctordtorTerm(); 128 133 dprintf(("user32 exit done\n")); -
trunk/src/user32/new/makefile
r693 r724 1 # $Id: makefile,v 1.3 3 1999-08-25 15:08:50 dengertExp $1 # $Id: makefile,v 1.34 1999-08-28 14:09:29 sandervl Exp $ 2 2 3 3 # … … 22 22 23 23 OBJS = user32.obj dialog.obj loadres.obj \ 24 dde.obj \24 dde.obj heapshared.obj\ 25 25 icon.obj hook.obj hooks.obj winmenu.obj \ 26 26 usrcall.obj defwndproc.obj syscolor.obj char.obj initterm.obj \ … … 69 69 defwndproc.obj: defwndproc.cpp syscolor.h 70 70 hooks.obj: hooks.cpp hooks.h 71 initterm.obj: initterm.cpp $(PDWIN32_INCLUDE)\spy.h pmwindow.h 71 initterm.obj: initterm.cpp $(PDWIN32_INCLUDE)\spy.h pmwindow.h heapshared.h 72 72 uitools.obj: uitools.cpp 73 73 unknown.obj: unknown.cpp … … 100 100 101 101 pmwindow.obj: pmwindow.cpp win32class.h win32wnd.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h 102 win32class.obj: win32class.cpp win32class.h win32wnd.h win32dlg.h gen_object.h oslibwin.h win32wndchild.h103 win32wnd.obj: win32wnd.cpp win32class.h win32wnd.h win32dlg.h gen_object.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h104 win32dlg.obj: win32dlg.cpp win32class.h win32wnd.h win32dlg.h gen_object.h oslibwin.h win32wndchild.h102 win32class.obj: win32class.cpp win32class.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h 103 win32wnd.obj: win32wnd.cpp win32class.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h 104 win32dlg.obj: win32dlg.cpp win32class.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h 105 105 win32wndchild.obj: win32wndchild.cpp win32wndchild.h 106 gen_object.obj: gen_object.cpp gen_object.h 106 gen_object.obj: gen_object.cpp gen_object.h heapshared.h 107 107 oslibwin.obj: oslibwin.cpp oslibwin.h oslibutil.h oslibgdi.h $(PDWIN32_INCLUDE)\winconst.h 108 108 oslibutil.obj: oslibutil.cpp oslibutil.h $(PDWIN32_INCLUDE)\wprocess.h oslibmsg.h … … 114 114 dib.obj: dib.cpp dib.h 115 115 116 heapshared.obj: heapshared.cpp heapshared.h 117 116 118 clean: 117 119 $(RM) *.obj *.lib *.dll *~ *.map *.pch -
trunk/src/user32/new/oslibwin.cpp
r715 r724 1 /* $Id: oslibwin.cpp,v 1.2 5 1999-08-27 17:50:56 dengertExp $ */1 /* $Id: oslibwin.cpp,v 1.26 1999-08-28 14:09:29 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 675 675 //****************************************************************************** 676 676 //****************************************************************************** 677 677 HWND OSLibWinBeginEnumWindows(HWND hwnd) 678 { 679 if(hwnd == OSLIB_HWND_DESKTOP) hwnd = HWND_DESKTOP; 680 681 return WinBeginEnumWindows(hwnd); 682 } 683 //****************************************************************************** 684 //****************************************************************************** 685 HWND OSLibWinGetNextWindow(HWND hwndEnum) 686 { 687 return WinGetNextWindow(hwndEnum); 688 } 689 //****************************************************************************** 690 //****************************************************************************** 691 HWND OSLibWinQueryClientWindow(HWND hwndFrame) 692 { 693 HWND hwndClient = 0; 694 695 if(((ULONG)WinSendMsg(hwndFrame, WM_QUERYFRAMEINFO, NULL, NULL)) & FI_FRAME) 696 hwndClient = WinWindowFromID(hwndFrame, FID_CLIENT); 697 698 return hwndClient; 699 } 700 //****************************************************************************** 701 //****************************************************************************** 702 BOOL OSLibWinEndEnumWindows(HWND hwndEnum) 703 { 704 return WinEndEnumWindows(hwndEnum); 705 } 706 //****************************************************************************** 707 //****************************************************************************** -
trunk/src/user32/new/oslibwin.h
r715 r724 1 /* $Id: oslibwin.h,v 1.2 2 1999-08-27 17:50:56 dengertExp $ */1 /* $Id: oslibwin.h,v 1.23 1999-08-28 14:09:29 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 237 237 void OSLibMapWINDOWPOStoSWP(struct tagWINDOWPOS *pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame); 238 238 239 HWND OSLibWinBeginEnumWindows(HWND hwnd); 240 HWND OSLibWinGetNextWindow(HWND hwndEnum); 241 HWND OSLibWinQueryClientWindow(HWND hwndFrame); 242 BOOL OSLibWinEndEnumWindows(HWND hwndEnum); 243 239 244 #endif //__OSLIBWIN_H__ -
trunk/src/user32/new/win32class.cpp
r655 r724 1 /* $Id: win32class.cpp,v 1. 7 1999-08-24 09:20:30 sandervl Exp $ */1 /* $Id: win32class.cpp,v 1.8 1999-08-28 14:09:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Managment Code for OS/2 … … 28 28 INT len = lstrlenW((LPWSTR)wndclass->lpszClassName)+1; 29 29 30 classNameA = (PCHAR) malloc(len);31 classNameW = (WCHAR *) malloc(len*sizeof(WCHAR));30 classNameA = (PCHAR)_smalloc(len); 31 classNameW = (WCHAR *)_smalloc(len*sizeof(WCHAR)); 32 32 } 33 33 else { 34 34 INT len = strlen(wndclass->lpszClassName)+1; 35 35 36 classNameA = (PCHAR) malloc(len);37 classNameW = (WCHAR *) malloc(len*sizeof(WCHAR));36 classNameA = (PCHAR)_smalloc(len); 37 classNameW = (WCHAR *)_smalloc(len*sizeof(WCHAR)); 38 38 } 39 39 if(classNameA == NULL || classNameW == NULL) { … … 90 90 //User data class words/longs 91 91 if(nrExtraClassWords) { 92 userClassLong = (ULONG *) malloc(nrExtraClassWords);92 userClassLong = (ULONG *)_smalloc(nrExtraClassWords); 93 93 if(userClassLong == NULL) { 94 94 dprintf(("Win32Class ctr: userClassLong == NULL!")); … … 115 115 free(menuNameW); 116 116 } 117 } 118 //****************************************************************************** 119 //****************************************************************************** 120 BOOL Win32WndClass::hasClassName(LPSTR classname, BOOL fUnicode) 121 { 122 if(HIWORD(classname) == 0) { 123 return classAtom == (DWORD)classname; 124 } 125 if(fUnicode) { 126 return (lstrcmpW(classNameW, (LPWSTR)classname) == 0); 127 } 128 else return (strcmp(classNameA, classname) == 0); 117 129 } 118 130 //****************************************************************************** … … 238 250 if(HIWORD(newMenuName)) { 239 251 if(isUnicode) { 240 menuNameA = (PCHAR) malloc(lstrlenW((LPWSTR)newMenuName)+1);241 menuNameW = (WCHAR *) malloc((lstrlenW((LPWSTR)newMenuName)+1)*sizeof(WCHAR));242 } 243 else { 244 menuNameA = (PCHAR) malloc(strlen(newMenuName)+1);245 menuNameW = (WCHAR *) malloc((strlen(newMenuName)+1)*sizeof(WCHAR));252 menuNameA = (PCHAR)_smalloc(lstrlenW((LPWSTR)newMenuName)+1); 253 menuNameW = (WCHAR *)_smalloc((lstrlenW((LPWSTR)newMenuName)+1)*sizeof(WCHAR)); 254 } 255 else { 256 menuNameA = (PCHAR)_smalloc(strlen(newMenuName)+1); 257 menuNameW = (WCHAR *)_smalloc((strlen(newMenuName)+1)*sizeof(WCHAR)); 246 258 } 247 259 if(menuNameA == NULL || menuNameW == NULL) { -
trunk/src/user32/new/win32class.h
r614 r724 1 /* $Id: win32class.h,v 1. 4 1999-08-22 08:30:52sandervl Exp $ */1 /* $Id: win32class.h,v 1.5 1999-08-28 14:09:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Managment Code for OS/2 … … 52 52 void DecreaseWindowCount() { cWindows--; }; 53 53 DWORD GetWindowCount() { return cWindows; }; 54 55 BOOL hasClassName(LPSTR classname, BOOL fUnicode = 0); 54 56 55 57 static void UnregisterClassA(HINSTANCE hinst, LPSTR id); -
trunk/src/user32/new/win32wnd.cpp
r715 r724 1 /* $Id: win32wnd.cpp,v 1.3 1 1999-08-27 17:50:56 dengertExp $ */1 /* $Id: win32wnd.cpp,v 1.32 1999-08-28 14:09:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 11 11 * Copyright 1993, 1994 Alexandre Julliard 12 12 * 13 * TODO: Not thread/process safe 13 14 * 14 15 * Project Odin Software License can be found in LICENSE.TXT … … 23 24 #include <misc.h> 24 25 #include <handlemanager.h> 26 #include <heapstring.h> 25 27 #include <win32wnd.h> 26 28 #include <spy.h> … … 71 73 fFirstShow = TRUE; 72 74 73 memset(windowNameA, 0, MAX_WINDOW_NAMELENGTH);74 memset(windowNameW, 0, MAX_WINDOW_NAMELENGTH*sizeof(WCHAR));75 windowNameA = NULL; 76 windowNameW = NULL; 75 77 wndNameLength = 0; 76 78 … … 125 127 if(userWindowLong) 126 128 free(userWindowLong); 129 if(windowNameA) { 130 free(windowNameA); 131 windowNameA = NULL; 132 } 133 if(windowNameW) { 134 free(windowNameW); 135 windowNameW = NULL; 136 } 127 137 } 128 138 //****************************************************************************** … … 249 259 nrUserWindowLong = windowClass->getExtraWndWords(); 250 260 if(nrUserWindowLong) { 251 userWindowLong = (ULONG *) malloc(nrUserWindowLong);261 userWindowLong = (ULONG *)_smalloc(nrUserWindowLong); 252 262 memset(userWindowLong, 0, nrUserWindowLong); 253 263 } … … 371 381 #endif 372 382 383 if(cs->lpszName) 384 SetWindowText((LPSTR)cs->lpszName); 385 373 386 OS2Hwnd = OSLibWinCreateWindow((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP, 374 dwOSWinStyle, dwOSFrameStyle, (char *) cs->lpszName,387 dwOSWinStyle, dwOSFrameStyle, (char *)windowNameA, 375 388 (owner) ? owner->getOS2WindowHandle() : OSLIB_HWND_DESKTOP, 376 389 (hwndLinkAfter == HWND_BOTTOM) ? TRUE : FALSE, … … 985 998 { 986 999 if(isUnicode) { 987 SendInternalMessageW(WM_GETTEXT, MAX_WINDOW_NAMELENGTH, (LPARAM)windowNameW);1000 SendInternalMessageW(WM_GETTEXT, wndNameLength, (LPARAM)windowNameW); 988 1001 } 989 1002 else { 990 SendInternalMessageA(WM_GETTEXT, MAX_WINDOW_NAMELENGTH, (LPARAM)windowNameA);1003 SendInternalMessageA(WM_GETTEXT, wndNameLength, (LPARAM)windowNameA); 991 1004 } 992 1005 return windowNameA; … … 1656 1669 } 1657 1670 //****************************************************************************** 1658 //TODO: not complete nor correct (distinction between top-level, top-most & child windows) 1671 //TODO: 1672 //We assume (for now) that if hwndParent or hwndChildAfter are real window handles, that 1673 //the current process owns them. 1674 //****************************************************************************** 1675 HWND Win32Window::FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow, 1676 BOOL fUnicode) 1677 { 1678 Win32Window *parent = GetWindowFromHandle(hwndParent); 1679 Win32Window *child = GetWindowFromHandle(hwndChildAfter); 1680 1681 if((hwndParent != OSLIB_HWND_DESKTOP && !parent) || 1682 (hwndChildAfter != 0 && !child) || 1683 (hwndParent == OSLIB_HWND_DESKTOP && hwndChildAfter != 0)) 1684 { 1685 dprintf(("Win32Window::FindWindowEx: parent or child not found %x %x", hwndParent, hwndChildAfter)); 1686 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1687 return 0; 1688 } 1689 if(hwndParent != OSLIB_HWND_DESKTOP) 1690 {//if the current process owns the window, just do a quick search 1691 child = (Win32Window *)parent->GetFirstChild(); 1692 if(hwndChildAfter != 0) 1693 { 1694 while(child) 1695 { 1696 if(child->getWindowHandle() == hwndChildAfter) 1697 { 1698 child = (Win32Window *)child->GetNextChild(); 1699 break; 1700 } 1701 child = (Win32Window *)child->GetNextChild(); 1702 } 1703 } 1704 while(child) 1705 { 1706 if(child->getWindowClass()->hasClassName(lpszClass, fUnicode) && 1707 (!lpszWindow || child->hasWindowName(lpszWindow, fUnicode))) 1708 { 1709 dprintf(("FindWindowEx: Found window %x", child->getWindowHandle())); 1710 return child->getWindowHandle(); 1711 } 1712 child = (Win32Window *)child->GetNextChild(); 1713 } 1714 } 1715 else { 1716 Win32Window *wnd; 1717 HWND henum, hwnd; 1718 1719 henum = OSLibWinBeginEnumWindows(OSLIB_HWND_DESKTOP); 1720 hwnd = OSLibWinGetNextWindow(henum); 1721 1722 while(hwnd) 1723 { 1724 HWND hwndClient; 1725 1726 wnd = GetWindowFromOS2Handle(hwnd); 1727 if(wnd == NULL) { 1728 hwndClient = OSLibWinQueryClientWindow(hwnd); 1729 if(hwndClient) wnd = GetWindowFromOS2Handle(hwndClient); 1730 } 1731 1732 if(wnd && wnd->getWindowClass()->hasClassName(lpszClass, fUnicode) && 1733 (!lpszWindow || wnd->hasWindowName(lpszWindow, fUnicode))) 1734 { 1735 OSLibWinEndEnumWindows(henum); 1736 dprintf(("FindWindowEx: Found window %x", wnd->getWindowHandle())); 1737 return wnd->getWindowHandle(); 1738 } 1739 hwnd = OSLibWinGetNextWindow(henum); 1740 } 1741 OSLibWinEndEnumWindows(henum); 1742 } 1743 SetLastError(ERROR_CANNOT_FIND_WND_CLASS); //TODO: not always correct 1744 return 0; 1745 } 1746 //****************************************************************************** 1747 //TODO: not complete nor correct (distinction be tween top-level, top-most & child windows) 1659 1748 //****************************************************************************** 1660 1749 HWND Win32Window::GetWindow(UINT uCmd) … … 1770 1859 //****************************************************************************** 1771 1860 //****************************************************************************** 1861 BOOL Win32Window::hasWindowName(LPSTR wndname, BOOL fUnicode) 1862 { 1863 if(fUnicode) { 1864 return (lstrcmpW(windowNameW, (LPWSTR)wndname) == 0); 1865 } 1866 else return (strcmp(windowNameA, wndname) == 0); 1867 } 1868 //****************************************************************************** 1869 //****************************************************************************** 1772 1870 int Win32Window::GetWindowTextLengthA() 1773 1871 { … … 1782 1880 //****************************************************************************** 1783 1881 //****************************************************************************** 1784 BOOL Win32Window::SetWindowTextA(LPCSTR lpsz) 1785 { 1786 return OSLibWinSetWindowText(OS2Hwnd, (LPSTR)lpsz); 1882 BOOL Win32Window::SetWindowText(LPSTR lpsz) 1883 { 1884 if(lpsz == NULL) 1885 return FALSE; 1886 1887 if(isUnicode == FALSE) { 1888 windowNameA = (LPSTR)_smalloc(strlen(lpsz)+1); 1889 strcpy(windowNameA, lpsz); 1890 windowNameW = (LPWSTR)_smalloc((strlen(lpsz)+1)*sizeof(WCHAR)); 1891 lstrcpyAtoW(windowNameW, windowNameA); 1892 } 1893 else { 1894 windowNameW = (LPWSTR)_smalloc((lstrlenW((LPWSTR)lpsz)+1)*sizeof(WCHAR)); 1895 lstrcpyW(windowNameW, (LPWSTR)lpsz); 1896 windowNameA = (LPSTR)_smalloc(lstrlenW((LPWSTR)lpsz)+1); 1897 lstrcpyWtoA(windowNameA, windowNameW); 1898 } 1899 wndNameLength = strlen(windowNameA)+1; //including 0 terminator 1900 1901 if(OS2Hwnd) 1902 return OSLibWinSetWindowText(OS2Hwnd, (LPSTR)windowNameA); 1903 1904 return TRUE; 1787 1905 } 1788 1906 //****************************************************************************** … … 1810 1928 return oldval; 1811 1929 case GWL_HWNDPARENT: 1812 return SetParent((HWND)value);1930 return SetParent((HWND)value); 1813 1931 1814 1932 case GWL_ID: … … 1895 2013 1896 2014 if(HIWORD(hwnd) != 0x6800) { 1897 return NULL;2015 return NULL; 1898 2016 } 1899 2017 1900 2018 if(HMHandleTranslateToOS2(LOWORD(hwnd), (PULONG)&window) == NO_ERROR) { 1901 return window;2019 return window; 1902 2020 } 1903 2021 else return NULL; … … 1914 2032 1915 2033 if(win32wnd && CheckMagicDword(magic)) { 1916 return win32wnd;2034 return win32wnd; 1917 2035 } 1918 2036 return 0; -
trunk/src/user32/new/win32wnd.h
r715 r724 1 /* $Id: win32wnd.h,v 1.2 6 1999-08-27 17:50:57 dengertExp $ */1 /* $Id: win32wnd.h,v 1.27 1999-08-28 14:09:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 45 45 #define WM_WIN32_POSTMESSAGEW 0x4001 46 46 47 #define MAX_WINDOW_NAMELENGTH 256 48 49 class Win32Window : private GenericObject, private ChildWindow 47 class Win32Window : public GenericObject, private ChildWindow 50 48 { 51 49 public: … … 91 89 HWND getOS2WindowHandle() { return OS2Hwnd; }; 92 90 HWND getOS2FrameWindowHandle() { return OS2HwndFrame; }; 91 Win32WndClass *getWindowClass() { return windowClass; }; 92 93 93 BOOL isFrameWindow() { return OS2Hwnd != OS2HwndFrame; }; 94 94 Win32Window *getParent() { return (Win32Window *)ChildWindow::GetParent(); }; … … 146 146 int GetWindowTextLengthA(); 147 147 int GetWindowTextA(LPSTR lpsz, int cch); 148 BOOL SetWindowTextA(LPCSTR lpsz); 148 BOOL SetWindowText(LPSTR lpsz); 149 BOOL hasWindowName(LPSTR wndname, BOOL fUnicode = 0); 149 150 150 151 LRESULT SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam); … … 158 159 159 160 Win32WndClass *getClass() { return windowClass; }; 161 162 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow, 163 BOOL fUnicode = 0); 160 164 161 165 static HWND Win32ToOS2Handle(HWND hwnd) … … 219 223 Win32Resource *iconResource; 220 224 221 char windowNameA[MAX_WINDOW_NAMELENGTH];222 WCHAR windowNameW[MAX_WINDOW_NAMELENGTH];223 ULONG wndNameLength; 225 char *windowNameA; 226 WCHAR *windowNameW; 227 ULONG wndNameLength; //including 0 terminator 224 228 225 229 ULONG *userWindowLong; -
trunk/src/user32/new/win32wndchild.cpp
r314 r724 1 /* $Id: win32wndchild.cpp,v 1. 1 1999-07-16 11:32:09sandervl Exp $ */1 /* $Id: win32wndchild.cpp,v 1.2 1999-08-28 14:09:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Child/Parent window class for OS/2 … … 35 35 } 36 36 //****************************************************************************** 37 // LIFO insertion37 //FIFO insertion 38 38 //****************************************************************************** 39 39 BOOL ChildWindow::AddChild(ChildWindow *child) 40 40 { 41 ChildWindow *curchild; 42 41 43 mutex.enter(); 42 44 43 child->SetNextChild(children); 44 children = child; 45 curchild = children; 46 if(curchild == NULL) { 47 children = child; 48 } 49 else { 50 while(curchild->GetNextChild()) { 51 curchild = curchild->GetNextChild(); 52 } 53 curchild->SetNextChild(this); 54 } 55 child->SetNextChild(NULL); 45 56 46 57 mutex.leave(); -
trunk/src/user32/new/win32wndchild.h
r314 r724 1 /* $Id: win32wndchild.h,v 1. 1 1999-07-16 11:32:09sandervl Exp $ */1 /* $Id: win32wndchild.h,v 1.2 1999-08-28 14:09:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Child/Parent window class for OS/2 … … 36 36 BOOL AddChild(ChildWindow *child); 37 37 BOOL RemoveChild(ChildWindow *child); 38 39 ChildWindow *GetFirstChild() { return children; }; 38 40 ChildWindow *GetNextChild() { return nextchild; }; 39 41 void SetNextChild(ChildWindow *child) { nextchild = child; }; -
trunk/src/user32/new/window.cpp
r713 r724 1 /* $Id: window.cpp,v 1.1 6 1999-08-27 16:52:09sandervl Exp $ */1 /* $Id: window.cpp,v 1.17 1999-08-28 14:09:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 568 568 } 569 569 dprintf(("SetWindowTextA %x %s", hwnd, lpsz)); 570 return window->SetWindowText A(lpsz);570 return window->SetWindowText((LPSTR)lpsz); 571 571 } 572 572 //****************************************************************************** … … 645 645 HWND WIN32API FindWindowA(LPCSTR lpszClass, LPCSTR lpszWindow) 646 646 { 647 if(!lpszClass) { 648 SetLastError(ERROR_INVALID_PARAMETER); 649 return 0; 650 } 647 651 if(HIWORD(lpszClass)) { 648 652 dprintf(("USER32: FindWindow %s %s\n", lpszClass, lpszWindow)); 649 653 } 650 654 else dprintf(("USER32: FindWindow %x %s\n", lpszClass, lpszWindow)); 651 return O32_FindWindow(lpszClass, lpszWindow); 652 } 653 //****************************************************************************** 654 //****************************************************************************** 655 HWND WIN32API FindWindowExA(HWND hwnd1, HWND hwnd2, LPCSTR lpszClass, LPCSTR lpszWindow) 656 { 657 #ifdef DEBUG 658 WriteLog("USER32: FindWindowExA, not completely implemented\n"); 659 #endif 660 return FindWindowA(lpszClass, lpszWindow); 655 656 return Win32Window::FindWindowEx(OSLIB_HWND_DESKTOP, 0, (LPSTR)lpszClass, (LPSTR)lpszWindow); 657 } 658 //****************************************************************************** 659 //****************************************************************************** 660 HWND WIN32API FindWindowExA(HWND hwndParent, HWND hwndChildAfter, LPCSTR lpszClass, LPCSTR lpszWindow) 661 { 662 if(!lpszClass) { 663 SetLastError(ERROR_INVALID_PARAMETER); 664 return 0; 665 } 666 if(HIWORD(lpszClass)) { 667 dprintf(("USER32: FindWindowExA (%x,%x) %s %s\n", hwndParent, hwndChildAfter, lpszClass, lpszWindow)); 668 } 669 else dprintf(("USER32: FindWindowExA (%x,%x)%x %s\n", hwndParent, hwndChildAfter, lpszClass, lpszWindow)); 670 671 return Win32Window::FindWindowEx(hwndParent, hwndChildAfter, (LPSTR)lpszClass, (LPSTR)lpszWindow); 661 672 } 662 673 /***************************************************************************** … … 686 697 LPCWSTR lpszWindow) 687 698 { 688 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",689 hwndParent, 690 hwndChildAfter, 691 lpszClass,692 693 694 return (NULL);699 if(!lpszClass) { 700 SetLastError(ERROR_INVALID_PARAMETER); 701 return 0; 702 } 703 dprintf(("USER32: FindWindowExW (%x,%x) %x %s\n", hwndParent, hwndChildAfter, lpszClass, lpszWindow)); 704 705 return Win32Window::FindWindowEx(hwndParent, hwndChildAfter, (LPSTR)lpszClass, (LPSTR)lpszWindow); 695 706 } 696 707 //****************************************************************************** -
trunk/src/user32/new/wingdi.cpp
r650 r724 1 /* $Id: wingdi.cpp,v 1. 9 1999-08-23 15:34:47 dengertExp $ */1 /* $Id: wingdi.cpp,v 1.10 1999-08-28 14:09:31 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window graphics apis for OS/2 … … 32 32 return 0; 33 33 } 34 window->MsgEraseBackGround(hdc); 34 35 #ifdef OPEN32_GDI 35 36 hdc = O32_BeginPaint(window->getOS2WindowHandle(),lps);
Note:
See TracChangeset
for help on using the changeset viewer.