Is the image being drawn at least once before you start the timer?
Perhaps you need to catch the WM_CREATE message from the main window to draw the first image at a time when you are sure the window handle (and it's DCs) are valid.
I didn't look too closely at how you are drawing/updating the image, so you need to check your process closely.