Hi,
I've got a graphical problem using a window region. The application I'm making is a sort of screenmate. It's a ball (the elliptic rgn) with a "3d-picture" that bounches on the window's taskbar. You can pick it up en throw it around.
This all works fine, the only problem is that it flickers.
It makes the image blurry and sometimes you can see the window's original rectangle.
The code is really simple (in order of execution):
- winmain, register wnd class, create wnd etc.
- create & apply region (80x80 px), show window
- main loop:
- update position (based on velocity, gravity etc.)
- move window to new position
and in windowproc
- WM_PAINT: bitblt bmp (dc created using createcompatible dc & select bmp into new dc, no rocket science here..)
I first wrote it in vb, but I ended up using so many winapi calls and subclassingmy own window, I decided to switch to c++. The vb-code didn't work much better anyway.
I hope someone can give some advice or tips..
(and please tell me if you need more information about the code).
Remedy
I've got a graphical problem using a window region. The application I'm making is a sort of screenmate. It's a ball (the elliptic rgn) with a "3d-picture" that bounches on the window's taskbar. You can pick it up en throw it around.
This all works fine, the only problem is that it flickers.
It makes the image blurry and sometimes you can see the window's original rectangle.
The code is really simple (in order of execution):
- winmain, register wnd class, create wnd etc.
- create & apply region (80x80 px), show window
- main loop:
- update position (based on velocity, gravity etc.)
- move window to new position
and in windowproc
- WM_PAINT: bitblt bmp (dc created using createcompatible dc & select bmp into new dc, no rocket science here..)
I first wrote it in vb, but I ended up using so many winapi calls and subclassingmy own window, I decided to switch to c++. The vb-code didn't work much better anyway.
I hope someone can give some advice or tips..
(and please tell me if you need more information about the code).
Remedy