mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[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:
parent
649f13b3f2
commit
b243445cb2
3 changed files with 27 additions and 13 deletions
|
@ -997,19 +997,11 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
Class->cbclsExtra = lpwcx->cbClsExtra;
|
Class->cbclsExtra = lpwcx->cbClsExtra;
|
||||||
Class->cbwndExtra = lpwcx->cbWndExtra;
|
Class->cbwndExtra = lpwcx->cbWndExtra;
|
||||||
Class->hModule = lpwcx->hInstance;
|
Class->hModule = lpwcx->hInstance;
|
||||||
|
//// FIXME handles to pointers
|
||||||
Class->hIcon = lpwcx->hIcon;
|
Class->hIcon = lpwcx->hIcon;
|
||||||
Class->hIconSm = lpwcx->hIconSm;
|
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;
|
Class->hbrBackground = lpwcx->hbrBackground;
|
||||||
|
|
||||||
/* Make a copy of the string */
|
/* Make a copy of the string */
|
||||||
|
@ -1838,6 +1830,11 @@ UserSetClassLongPtr(IN PCLS Class,
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case GCLP_HICON:
|
||||||
/* FIXME: Get handle from pointer to ICON object */
|
/* FIXME: Get handle from pointer to ICON object */
|
||||||
Ret = (ULONG_PTR)Class->hIcon;
|
Ret = (ULONG_PTR)Class->hIcon;
|
||||||
|
|
|
@ -1762,6 +1762,15 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
||||||
pWnd->HideAccel = pWnd->spwndParent->HideAccel;
|
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)
|
if (pWnd->pcls->CSF_flags & CSF_SERVERSIDEPROC)
|
||||||
pWnd->state |= WNDS_SERVERSIDEWINDOWPROC;
|
pWnd->state |= WNDS_SERVERSIDEWINDOWPROC;
|
||||||
|
|
||||||
|
@ -2223,6 +2232,13 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
IntLinkHwnd(Window, hwndInsertAfter);
|
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 ((Window->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||||
{
|
{
|
||||||
if ( !IntIsTopLevelWindow(Window) )
|
if ( !IntIsTopLevelWindow(Window) )
|
||||||
|
|
|
@ -1104,6 +1104,7 @@ RealGetWindowClassA(
|
||||||
/*
|
/*
|
||||||
* Create a small icon based on a standard icon
|
* Create a small icon based on a standard icon
|
||||||
*/
|
*/
|
||||||
|
#if 0 // Keep vintage code from revision 18764 by GvG!
|
||||||
static HICON
|
static HICON
|
||||||
CreateSmallIcon(HICON StdIcon)
|
CreateSmallIcon(HICON StdIcon)
|
||||||
{
|
{
|
||||||
|
@ -1249,7 +1250,7 @@ cleanup:
|
||||||
|
|
||||||
return SmallIcon;
|
return SmallIcon;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ATOM WINAPI
|
ATOM WINAPI
|
||||||
RegisterClassExWOWW(WNDCLASSEXW *lpwcx,
|
RegisterClassExWOWW(WNDCLASSEXW *lpwcx,
|
||||||
|
@ -1299,12 +1300,12 @@ RegisterClassExWOWW(WNDCLASSEXW *lpwcx,
|
||||||
((WNDCLASSEXW*)lpwcx)->hInstance = GetModuleHandleW(NULL);
|
((WNDCLASSEXW*)lpwcx)->hInstance = GetModuleHandleW(NULL);
|
||||||
|
|
||||||
RtlCopyMemory(&WndClass, lpwcx, sizeof(WNDCLASSEXW));
|
RtlCopyMemory(&WndClass, lpwcx, sizeof(WNDCLASSEXW));
|
||||||
|
/*
|
||||||
if (NULL == WndClass.hIconSm)
|
if (NULL == WndClass.hIconSm)
|
||||||
{
|
{
|
||||||
WndClass.hIconSm = CreateSmallIcon(WndClass.hIcon);
|
WndClass.hIconSm = CreateSmallIcon(WndClass.hIcon);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (WndClass.lpszMenuName != NULL)
|
if (WndClass.lpszMenuName != NULL)
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE(WndClass.lpszMenuName))
|
if (!IS_INTRESOURCE(WndClass.lpszMenuName))
|
||||||
|
|
Loading…
Reference in a new issue