Changeset 2033 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Dec 9, 1999, 1:54:05 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r2016 r2033 1 /* $Id: win32wbase.cpp,v 1.10 7 1999-12-07 20:43:39sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.108 1999-12-09 00:53:37 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 268 268 //****************************************************************************** 269 269 //****************************************************************************** 270 BOOL Win32BaseWindow::IsWindowUnicode() 271 { 272 return (WINPROC_GetProcType(getWindowProc()) == WIN_PROC_32W); 273 } 274 //****************************************************************************** 275 //****************************************************************************** 270 276 BOOL Win32BaseWindow::CreateWindowExA(CREATESTRUCTA *cs, ATOM classAtom) 271 277 { … … 434 440 } 435 441 436 setWindowProc(windowClass->getWindowProc());442 WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, windowClass->getWindowProc(), (isUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_WINDOW); 437 443 hInstance = cs->hInstance; 438 444 dwStyle = cs->style & ~WS_VISIBLE; … … 627 633 /* Get class or window DC if needed */ 628 634 if(windowClass->getStyle() & CS_OWNDC) { 629 630 // 631 } 632 else 635 dprintf(("Class with CS_OWNDC style")); 636 // ownDC = GetWindowDC(getWindowHandle()); 637 } 638 else 633 639 if (windowClass->getStyle() & CS_PARENTDC) { 634 635 640 dprintf(("ERROR: Class with CS_PARENTDC style -> NOT IMPLEMENTED!")); 641 ownDC = 0; 636 642 } 637 643 else 638 644 if (windowClass->getStyle() & CS_CLASSDC) { 639 640 645 dprintf(("ERROR: Class with CS_CLASSDC style -> NOT IMPLEMENTED!")); 646 ownDC = 0; 641 647 } 642 648 /* Set the window menu */ … … 1519 1525 //****************************************************************************** 1520 1526 //****************************************************************************** 1521 LRESULT Win32BaseWindow::DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fReentered) 1522 { 1523 //Lotus Notes v5.0.1 calls SetWindowTextA for unicode static window -> calls DefWindowProcA 1524 if(IsUnicode() && !fReentered) { 1525 return DefWindowProcW(Msg, wParam, lParam); 1526 } 1527 LRESULT Win32BaseWindow::DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam) 1528 { 1527 1529 switch(Msg) 1528 1530 { … … 1777 1779 1778 1780 case WM_NOTIFYFORMAT: 1779 if (Is Unicode()) return NFR_UNICODE;1781 if (IsWindowUnicode()) return NFR_UNICODE; 1780 1782 else return NFR_ANSI; 1781 1783 … … 1851 1853 1852 1854 default: 1853 return DefWindowProcA(Msg, wParam, lParam , TRUE);1855 return DefWindowProcA(Msg, wParam, lParam); 1854 1856 } 1855 1857 } … … 2950 2952 BOOL Win32BaseWindow::SetWindowTextA(LPSTR lpsz) 2951 2953 { 2952 //hmm. Notes v5.0.1 creates static window with CreateWindowExW and calls this...2953 if(IsUnicode() && lpsz) {2954 LPWSTR lpWindowNameW = (LPWSTR)alloca((strlen(lpsz)+1)*sizeof(WCHAR));2955 lstrcpyAtoW(lpWindowNameW, lpsz);2956 2957 return SendInternalMessageW(WM_SETTEXT,0,(LPARAM)lpWindowNameW);2958 }2959 2954 return SendInternalMessageA(WM_SETTEXT,0,(LPARAM)lpsz); 2960 2955 } … … 2975 2970 //****************************************************************************** 2976 2971 //****************************************************************************** 2977 LONG Win32BaseWindow::SetWindowLongA(int index, ULONG value )2972 LONG Win32BaseWindow::SetWindowLongA(int index, ULONG value, BOOL fUnicode) 2978 2973 { 2979 2974 LONG oldval; … … 3018 3013 } 3019 3014 case GWL_WNDPROC: 3020 oldval = (LONG) getWindowProc();3021 setWindowProc((WNDPROC)value);3015 oldval = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A); 3016 WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, (WNDPROC)value, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_WINDOW); 3022 3017 return oldval; 3023 3018 case GWL_HINSTANCE: … … 3048 3043 //****************************************************************************** 3049 3044 //****************************************************************************** 3050 ULONG Win32BaseWindow::GetWindowLongA(int index )3045 ULONG Win32BaseWindow::GetWindowLongA(int index, BOOL fUnicode) 3051 3046 { 3052 3047 ULONG value; … … 3060 3055 break; 3061 3056 case GWL_WNDPROC: 3062 value = ( ULONG)getWindowProc();3057 value = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A); 3063 3058 break; 3064 3059 case GWL_HINSTANCE:
Note:
See TracChangeset
for help on using the changeset viewer.