Commit abc3769a authored by Andrey Turkin's avatar Andrey Turkin Committed by Alexandre Julliard

atl: Implement AtlPixelToHiMetric and AtlHiMetricToPixel.

parent 64fe2774
......@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = atl.dll
IMPORTLIB = libatl.$(IMPLIBEXT)
IMPORTS = ole32 shlwapi user32 advapi32 kernel32
IMPORTS = ole32 shlwapi user32 gdi32 advapi32 kernel32
EXTRALIBS = -luuid
C_SRCS = \
......
......@@ -19,8 +19,8 @@
24 stub AtlWaitWithMessageLoop
25 stub AtlSetErrorInfo
26 stub AtlCreateTargetDC
27 stub AtlHiMetricToPixel
28 stub AtlPixelToHiMetric
27 stdcall AtlHiMetricToPixel(ptr ptr)
28 stdcall AtlPixelToHiMetric(ptr ptr)
29 stub AtlDevModeW2A
30 stdcall AtlComPtrAssign(ptr ptr)
31 stub AtlComQIPtrAssign
......
......@@ -26,6 +26,7 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "objbase.h"
......@@ -421,3 +422,19 @@ ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW
TRACE("returning 0x%04x\n", atom);
return atom;
}
void WINAPI AtlHiMetricToPixel(const SIZEL* lpHiMetric, SIZEL* lpPix)
{
HDC dc = GetDC(NULL);
lpPix->cx = lpHiMetric->cx * GetDeviceCaps( dc, LOGPIXELSX ) / 100;
lpPix->cy = lpHiMetric->cy * GetDeviceCaps( dc, LOGPIXELSY ) / 100;
ReleaseDC( NULL, dc );
}
void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric)
{
HDC dc = GetDC(NULL);
lpHiMetric->cx = 100 * lpPix->cx / GetDeviceCaps( dc, LOGPIXELSX );
lpHiMetric->cy = 100 * lpPix->cy / GetDeviceCaps( dc, LOGPIXELSY );
ReleaseDC( NULL, dc );
}
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