GDI+ and dilaogs

This is a discussion on GDI+ and dilaogs within the Windows Programming forums, part of the Platform Specific Boards category; Hello all,
I was trying to use GDI+ in the WM_INITDIALOG in a win32 dll project. I wanted to display ...

GDI+ and dilaogs

Hello all,

I was trying to use GDI+ in the WM_INITDIALOG in a win32 dll project. I wanted to display an image on the dialog using GDI+ before it was diplayed. Nothing appeared...
this is a small portion of code which i added to the WM_INITDIALOG.

and nothing appears , can anyone help me thnx. By the way the png file is found and i think the drawing functions are correct because they draw the png but not in WM_INITDIALOG nor in WM_PAINT . But maybe i have to put the code in another place for it to work.

This is what im doing in paint, but i think i found out why it was not entering into the WM_PAINT message. I had an AnimateWindow() call in the WM_INITDIALOG message, i think this was preventing it from entering paint the first time. When i removed it it worked.