Author: jimtabor
Date: Wed Oct 9 23:04:07 2013
New Revision: 60592
URL:
http://svn.reactos.org/svn/reactos?rev=60592&view=rev
Log:
[Win32ss]
- Setup small icon support from create window not in register class.
- Remove flags if not inside the current version control. Version control is still FIXME.
Modified:
trunk/reactos/win32ss/user/ntuser/class.c
trunk/reactos/win32ss/user/ntuser/window.c
trunk/reactos/win32ss/user/user32/windows/class.c
Modified: trunk/reactos/win32ss/user/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Wed Oct 9 23:04:07 2013
@@ -997,19 +997,11 @@
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->hCursor = lpwcx->hCursor;
Class->hbrBackground = lpwcx->hbrBackground;
/* Make a copy of the string */
@@ -1838,6 +1830,11 @@
}
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;
Modified: trunk/reactos/win32ss/user/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Wed Oct 9 23:04:07 2013
@@ -1762,6 +1762,15 @@
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;
@@ -2221,6 +2230,13 @@
IntLinkHwnd(Window, HWND_BOTTOM);
else
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)
Modified: trunk/reactos/win32ss/user/user32/windows/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] Wed Oct 9 23:04:07
2013
@@ -1104,6 +1104,7 @@
/*
* 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 @@
return SmallIcon;
}
-
+#endif
ATOM WINAPI
RegisterClassExWOWW(WNDCLASSEXW *lpwcx,
@@ -1299,12 +1300,12 @@
((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))