=?UTF-8?Q?Michael=20M=C3=BCller=20?=: comctl32: Add implementation for LoadIconMetric.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 5 10:30:26 CDT 2015
Module: wine
Branch: master
Commit: 088eb87e3b6e3b41acde6f544b1f9d41b83674bf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=088eb87e3b6e3b41acde6f544b1f9d41b83674bf
Author: Michael Müller <michael at fds-team.de>
Date: Fri Oct 2 15:13:05 2015 +0200
comctl32: Add implementation for LoadIconMetric.
Signed-off-by: Michael Müller <michael at fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
dlls/comctl32/comctl32.spec | 1 +
dlls/comctl32/commctrl.c | 28 ++++++++++++++++++++++++++++
include/commctrl.h | 7 +++++++
3 files changed, 36 insertions(+)
diff --git a/dlls/comctl32/comctl32.spec b/dlls/comctl32/comctl32.spec
index 1e92e5f..1a5ab57 100644
--- a/dlls/comctl32/comctl32.spec
+++ b/dlls/comctl32/comctl32.spec
@@ -88,6 +88,7 @@
375 stdcall -noname -private StrCSpnIW(wstr wstr)
376 stdcall -noname -private IntlStrEqWorkerA(long str str long)
377 stdcall -noname -private IntlStrEqWorkerW(long wstr wstr long)
+380 stdcall -ordinal LoadIconMetric(ptr wstr long ptr)
381 stdcall -ordinal LoadIconWithScaleDown(ptr wstr long long ptr)
382 stdcall -noname SmoothScrollWindow(ptr)
383 stub -noname DoReaderMode
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index 97656a5..6d6b5e4 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -1658,3 +1658,31 @@ HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE hinst, const WCHAR *name, int cx,
return S_OK;
}
+
+/***********************************************************************
+ * LoadIconMetric [COMCTL32.@]
+ */
+HRESULT WINAPI LoadIconMetric(HINSTANCE hinst, const WCHAR *name, int size, HICON *icon)
+{
+ int cx, cy;
+
+ TRACE("(%p, %s, %d, %p)\n", hinst, debugstr_w(name), size, icon);
+
+ if (size == LIM_SMALL)
+ {
+ cx = GetSystemMetrics(SM_CXSMICON);
+ cy = GetSystemMetrics(SM_CYSMICON);
+ }
+ else if (size == LIM_LARGE)
+ {
+ cx = GetSystemMetrics(SM_CXICON);
+ cy = GetSystemMetrics(SM_CYICON);
+ }
+ else
+ {
+ *icon = NULL;
+ return E_INVALIDARG;
+ }
+
+ return LoadIconWithScaleDown(hinst, name, cx, cy, icon);
+}
diff --git a/include/commctrl.h b/include/commctrl.h
index 0ed0997..5029e77 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -42,7 +42,14 @@ BOOL WINAPI InitCommonControlsEx (const INITCOMMONCONTROLSEX*);
LANGID WINAPI GetMUILanguage (VOID);
VOID WINAPI InitMUILanguage (LANGID uiLang);
+enum _LI_METRIC
+{
+ LIM_SMALL,
+ LIM_LARGE
+};
+
HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
+HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
#define COMCTL32_VERSION 5 /* dll version */
More information about the wine-cvs
mailing list