diff options
| author | Mike Wey | 2017-03-26 18:58:39 +0200 |
|---|---|---|
| committer | Mike Wey | 2017-03-26 18:58:39 +0200 |
| commit | 1f55c1eaf58bd2bcdb8d11656e816db2e9f05682 (patch) | |
| tree | e62ddebad417d3be3e57e8980aafc4dfc53fcccc /dmagick | |
| parent | 7f40eff3c8334c954d9429959ec40a127cb79b7c (diff) | |
Don't use the ANSI versions of the winapi directly. Fixes #18
Diffstat (limited to 'dmagick')
| -rw-r--r-- | dmagick/internal/Windows.d | 10 |
1 files 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); |
