Commit 0da35c26 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

user32: Implement InternalGetWindowIcon().

parent 5df5972f
......@@ -445,6 +445,7 @@
@ stdcall InsertMenuItemA(long long long ptr)
@ stdcall InsertMenuItemW(long long long ptr)
@ stdcall InsertMenuW(long long long long ptr)
@ stdcall InternalGetWindowIcon(ptr long)
@ stdcall InternalGetWindowText(long ptr long)
@ stdcall IntersectRect(ptr ptr ptr)
@ stdcall InvalidateRect(long ptr long)
......
......@@ -4369,3 +4369,50 @@ BOOL WINAPI SetWindowCompositionAttribute(HWND hwnd, void *data)
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* InternalGetWindowIcon (USER32.@)
*/
HICON WINAPI InternalGetWindowIcon( HWND hwnd, UINT type )
{
WND *win = WIN_GetPtr( hwnd );
HICON ret;
TRACE( "hwnd %p, type %#x\n", hwnd, type );
if (!win)
{
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
}
if (win == WND_OTHER_PROCESS || win == WND_DESKTOP)
{
if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd );
return 0;
}
switch (type)
{
case ICON_BIG:
ret = win->hIcon;
if (!ret) ret = (HICON)GetClassLongPtrW( hwnd, GCLP_HICON );
break;
case ICON_SMALL:
case ICON_SMALL2:
ret = win->hIconSmall ? win->hIconSmall : win->hIconSmall2;
if (!ret) ret = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM );
if (!ret) ret = (HICON)GetClassLongPtrW( hwnd, GCLP_HICON );
break;
default:
SetLastError( ERROR_INVALID_PARAMETER );
WIN_ReleasePtr( win );
return 0;
}
if (!ret) ret = LoadIconW( 0, (const WCHAR *)IDI_APPLICATION );
WIN_ReleasePtr( win );
return CopyIcon( ret );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment