[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.

svn path=/trunk/; revision=60592
This commit is contained in:
James Tabor 2013-10-09 23:04:07 +00:00
parent 649f13b3f2
commit b243445cb2
3 changed files with 27 additions and 13 deletions

View file

@ -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;

View file

@ -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) )

View file

@ -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))