I have two functions- draw1() and draw2() that draws a bitmap to DC. I need to call them one after the other. So I do it in ,
void CDlg::OnPaint()
{
for(int i=0;i<10;i++)
{
draw1();
draw2();
}
}
I also want to add a clickmouse event , i.e, when i click left button of the mouse, the cursor should disappear. So I do it in,
void CDlg::OnLButtonUp(UINT nFlags, CPoint point) {
ShowCursor(FALSE);
}
But the click mouse event does not occur , unless the 'for loop' in OnPaint() doesn't finish.
I want the for loop to continue , at the same time the click mouse should occur without interrupting the for loop.
How can I make changes or add to get the result?
EDIT: Why the for loop? In draw1() & draw2() , I'm reading first frame of two YUV files respectively, converting to bitmap and then drawing it to DC. I'm toggling between 2 bitmaps after 1 sec. For eg-like a screensaver. Hence the for loop.