diff --git a/src/dlangui/platforms/windows/win32drawbuf.d b/src/dlangui/platforms/windows/win32drawbuf.d index e9d6d42f..d97eac64 100644 --- a/src/dlangui/platforms/windows/win32drawbuf.d +++ b/src/dlangui/platforms/windows/win32drawbuf.d @@ -42,6 +42,7 @@ class Win32ColorDrawBuf : ColorDrawBufBase { /// create resized copy of ColorDrawBuf this(ColorDrawBuf v, int dx, int dy) { this(dx, dy); + resetClipping(); fill(0xFFFFFFFF); if (_dx == dx && _dy == dy) drawImage(0, 0, v); @@ -87,7 +88,7 @@ class Win32ColorDrawBuf : ColorDrawBufBase { //return CreateBitmap(_dx, _dy, 1, 1, buf.ptr); } /// destroy object, but leave bitmap as is - HBITMAP destoryLeavingBitmap() { + HBITMAP destroyLeavingBitmap() { HBITMAP res = _drawbmp; _drawbmp = null; destroy(this); diff --git a/src/dlangui/platforms/windows/winapp.d b/src/dlangui/platforms/windows/winapp.d index 60c65ad3..123fae09 100644 --- a/src/dlangui/platforms/windows/winapp.d +++ b/src/dlangui/platforms/windows/winapp.d @@ -449,7 +449,7 @@ class Win32Window : Window { resizedicon.invertAlpha(); ICONINFO ii; HBITMAP mask = resizedicon.createTransparencyBitmap(); - HBITMAP color = resizedicon.destoryLeavingBitmap(); + HBITMAP color = resizedicon.destroyLeavingBitmap(); ii.fIcon = TRUE; ii.xHotspot = 0; ii.yHotspot = 0; @@ -457,8 +457,8 @@ class Win32Window : Window { ii.hbmColor = color; _icon = CreateIconIndirect(&ii); if (_icon) { - SendMessage(_hwnd, WM_SETICON, ICON_SMALL, cast(int)_icon); - SendMessage(_hwnd, WM_SETICON, ICON_BIG, cast(int)_icon); + SendMessageW(_hwnd, WM_SETICON, ICON_SMALL, cast(LPARAM)_icon); + SendMessageW(_hwnd, WM_SETICON, ICON_BIG, cast(LPARAM)_icon); } else { Log.e("failed to create icon"); }