Win32 GDI and paint event

E

ehabzaky

Hi,

I'm using some low level Win 32 API for some drawing functions on a
picture box. I'm putting the drawing code in a method and call this
method from the picture box paint event.

The problem is that when the application starts the drawings is
appeared instantly on the picture box then it is cleared using the
background color of the picture box. I have to force the paint event to
fire by dragging the window outside the screen edges and return back.
or using a button or some other event.

Even when the window is minimized and maximized again the same issue
happens and graphics disappear.

I want the graphics to be shown on the picture box directly upon the
application start without forcing the user to press on a button or menu
item. How to do so?

Thank you all.

Yours,
Ehab Zaky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top