diff --git a/reactos/win32ss/user/ntuser/class.c b/reactos/win32ss/user/ntuser/class.c index 204625872ae..c9504946993 100644 --- a/reactos/win32ss/user/ntuser/class.c +++ b/reactos/win32ss/user/ntuser/class.c @@ -997,19 +997,11 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx, Class->cbclsExtra = lpwcx->cbClsExtra; Class->cbwndExtra = lpwcx->cbWndExtra; Class->hModule = lpwcx->hInstance; + //// FIXME handles to pointers Class->hIcon = lpwcx->hIcon; Class->hIconSm = lpwcx->hIconSm; - //// Sure W2k3 does not do this..... wine test inconclusive. - if (lpwcx->hIcon && !lpwcx->hIconSm) - { - Class->hIconSmIntern = co_IntCopyImage( lpwcx->hIcon, IMAGE_ICON, - UserGetSystemMetrics( SM_CXSMICON ), - UserGetSystemMetrics( SM_CYSMICON ), 0 ); - ERR("IntCreateClass hIconSmIntern %p\n",Class->hIconSmIntern); - Class->CSF_flags |= CSF_CACHEDSMICON; - } - //// Class->hCursor = lpwcx->hCursor; + //// Class->hbrBackground = lpwcx->hbrBackground; /* Make a copy of the string */ @@ -1838,6 +1830,11 @@ UserSetClassLongPtr(IN PCLS Class, } break; + // MSDN: + // hIconSm, A handle to a small icon that is associated with the window class. + // If this member is NULL, the system searches the icon resource specified by + // the hIcon member for an icon of the appropriate size to use as the small icon. + // case GCLP_HICON: /* FIXME: Get handle from pointer to ICON object */ Ret = (ULONG_PTR)Class->hIcon; diff --git a/reactos/win32ss/user/ntuser/window.c b/reactos/win32ss/user/ntuser/window.c index 2e694e0562f..6f7e3ea8bcd 100644 --- a/reactos/win32ss/user/ntuser/window.c +++ b/reactos/win32ss/user/ntuser/window.c @@ -1762,6 +1762,15 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs, pWnd->HideAccel = pWnd->spwndParent->HideAccel; } + if (Class->hIcon && !Class->hIconSm) + { + Class->hIconSmIntern = co_IntCopyImage( Class->hIcon, IMAGE_ICON, + UserGetSystemMetrics( SM_CXSMICON ), + UserGetSystemMetrics( SM_CYSMICON ), 0 ); + ERR("IntCreateWindow hIconSmIntern %p\n",Class->hIconSmIntern); + Class->CSF_flags |= CSF_CACHEDSMICON; + } + if (pWnd->pcls->CSF_flags & CSF_SERVERSIDEPROC) pWnd->state |= WNDS_SERVERSIDEWINDOWPROC; @@ -2223,6 +2232,13 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs, IntLinkHwnd(Window, hwndInsertAfter); } + // Remove flags that are retro. + if (!(Window->state2 & WNDS2_WIN31COMPAT)) // FIXME: support version flags. + { + if (Class->style & CS_PARENTDC && !(ParentWindow->style & WS_CLIPCHILDREN)) + Window->style &= ~(WS_CLIPSIBLINGS | WS_CLIPCHILDREN); + } + if ((Window->style & (WS_CHILD | WS_POPUP)) == WS_CHILD) { if ( !IntIsTopLevelWindow(Window) ) diff --git a/reactos/win32ss/user/user32/windows/class.c b/reactos/win32ss/user/user32/windows/class.c index 72071d2c7f0..9540b4c84d0 100644 --- a/reactos/win32ss/user/user32/windows/class.c +++ b/reactos/win32ss/user/user32/windows/class.c @@ -1104,6 +1104,7 @@ RealGetWindowClassA( /* * Create a small icon based on a standard icon */ +#if 0 // Keep vintage code from revision 18764 by GvG! static HICON CreateSmallIcon(HICON StdIcon) { @@ -1249,7 +1250,7 @@ cleanup: return SmallIcon; } - +#endif ATOM WINAPI RegisterClassExWOWW(WNDCLASSEXW *lpwcx, @@ -1299,12 +1300,12 @@ RegisterClassExWOWW(WNDCLASSEXW *lpwcx, ((WNDCLASSEXW*)lpwcx)->hInstance = GetModuleHandleW(NULL); RtlCopyMemory(&WndClass, lpwcx, sizeof(WNDCLASSEXW)); - +/* if (NULL == WndClass.hIconSm) { WndClass.hIconSm = CreateSmallIcon(WndClass.hIcon); } - +*/ if (WndClass.lpszMenuName != NULL) { if (!IS_INTRESOURCE(WndClass.lpszMenuName))