mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 05:54:05 +00:00
* Addendum to r66800.
svn path=/trunk/; revision=66802
This commit is contained in:
parent
2923acd08c
commit
38305d6d20
59
reactos/dll/win32/comctl32/icon.c
Normal file
59
reactos/dll/win32/comctl32/icon.c
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Comctl32 Icon functions
|
||||
*
|
||||
* Copyright 2014 Michael Müller
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||
|
||||
HRESULT WINAPI
|
||||
LoadIconMetric (HINSTANCE hinst, PCWSTR name, INT size, HICON *icon)
|
||||
{
|
||||
INT width, height;
|
||||
|
||||
TRACE("(%p %s %d %p)\n", hinst, debugstr_w(name), size, icon);
|
||||
|
||||
if (!icon)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* windows sets it to zero in a case of failure */
|
||||
*icon = NULL;
|
||||
|
||||
if (!name)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (size == LIM_SMALL)
|
||||
{
|
||||
width = GetSystemMetrics( SM_CXSMICON );
|
||||
height = GetSystemMetrics( SM_CYSMICON );
|
||||
}
|
||||
else if (size == LIM_LARGE)
|
||||
{
|
||||
width = GetSystemMetrics( SM_CXICON );
|
||||
height = GetSystemMetrics( SM_CYICON );
|
||||
}
|
||||
else
|
||||
return E_INVALIDARG;
|
||||
|
||||
*icon = LoadImageW( hinst, name, IMAGE_ICON, width, height, LR_SHARED );
|
||||
if (*icon)
|
||||
return S_OK;
|
||||
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
33
reactos/dll/win32/comctl32/theme_scrollbar.c
Normal file
33
reactos/dll/win32/comctl32/theme_scrollbar.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Theming - Scrollbar control
|
||||
*
|
||||
* Copyright (c) 2015 Mark Harmstone
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(theme_scroll);
|
||||
|
||||
LRESULT CALLBACK THEMING_ScrollbarSubclassProc (HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam,
|
||||
ULONG_PTR dwRefData)
|
||||
{
|
||||
TRACE("(%p, 0x%x, %lu, %lu, %lu)\n", hwnd, msg, wParam, lParam, dwRefData);
|
||||
|
||||
return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam);
|
||||
}
|
Loading…
Reference in a new issue