From 1f55c1eaf58bd2bcdb8d11656e816db2e9f05682 Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Sun, 26 Mar 2017 18:58:39 +0200 Subject: Don't use the ANSI versions of the winapi directly. Fixes #18 --- dmagick/internal/Windows.d | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dmagick/internal/Windows.d b/dmagick/internal/Windows.d index 53d46cd..e35fdd6 100644 --- a/dmagick/internal/Windows.d +++ b/dmagick/internal/Windows.d @@ -45,19 +45,19 @@ class Window wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; - wndclass.hIcon = LoadIconA(null, IDI_APPLICATION); - wndclass.hCursor = LoadCursorA(null, IDC_ARROW); + wndclass.hIcon = LoadIcon(null, IDI_APPLICATION); + wndclass.hCursor = LoadCursor(null, IDC_ARROW); wndclass.hbrBackground = null; wndclass.lpszMenuName = null; wndclass.lpszClassName = "DMagick"; - if (!RegisterClassA(&wndclass)) + if (!RegisterClass(&wndclass)) throw new DMagickException("Displaying images requires Windows NT!"); RECT rect = RECT(0,0, width,height); AdjustWindowRect(&rect, WS_CAPTION | WS_SYSMENU, false); - hwnd = CreateWindowA("DMagick", "DMagick", WS_CAPTION | WS_SYSMENU, + hwnd = CreateWindow("DMagick", "DMagick", WS_CAPTION | WS_SYSMENU, CW_USEDEFAULT, CW_USEDEFAULT, rect.right-rect.left, rect.bottom-rect.top, null, null, hInstance, null); @@ -217,4 +217,4 @@ enum UINT DIB_RGB_COLORS = 0; extern(Windows) BOOL BitBlt(HDC, int, int, int, int, HDC, int, int, DWORD); extern(Windows) HBITMAP CreateCompatibleBitmap(HDC, int, int); extern(Windows) HBITMAP CreateDIBSection(HDC, const(BITMAPINFO)*, UINT, void**, HANDLE, DWORD); -extern(Windows) UINT_PTR SetTimer(HWND, UINT_PTR, UINT, TIMERPROC); \ No newline at end of file +extern(Windows) UINT_PTR SetTimer(HWND, UINT_PTR, UINT, TIMERPROC); -- cgit v1.2.3