Fix ClippingForm class and the example

This commit is contained in:
haru-s 2023-03-18 17:51:57 +09:00
parent 60a43bc864
commit 56e228aa4a
2 changed files with 4 additions and 5 deletions

View file

@ -10,8 +10,6 @@ else
class MainForm : ClippingForm
{
private Image _image;
public this()
{
this.text = "Clipping Form example";

View file

@ -139,7 +139,7 @@ public:
clear();
_width = g.width;
_height = g.height;
return createClippingRegionFromHDC(cast(HBITMAP)g.hbitmap);
return createClippingRegionFromHDC(g.hbitmap);
}
@ -151,7 +151,7 @@ public:
_height = img.height;
if (auto bmp = cast(Bitmap)img)
{
return createClippingRegionFromHDC(cast(HBITMAP)bmp.handle);
return createClippingRegionFromHDC(bmp.handle);
}
auto g = new MemoryGraphics(img.width, img.height);
img.draw(g, Point(0,0));
@ -171,7 +171,8 @@ protected:
override void createParams(ref CreateParams cp)
{
super.createParams(cp);
cp.style = WS_EX_TOPMOST | WS_EX_TOOLWINDOW;
cp.style = WS_POPUP;
cp.exStyle |= WS_EX_TOPMOST;
}
public: