Re: Didn't use directX the output is flashing.
"Boki" <bokiteam@ms21.hinet.net> wrote in message
news:1150709330.228620.141060@u72g2000cwu.googlegroups.com...
Hi All,
I am drawing some continus jpeg picture to screen, but the screen is
flashing, not like a video ....
I mean sometimes I can see some white area in the screen not all the
jpeg picture..., it seems the speed is very fast, become flash...
Best regards,
Boki.
PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE);
while (msg.message!=WM_QUIT) {
if (PeekMessage( &msg, NULL, 0, 0, PM_REMOVE)) {
// dispatch the message
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
if (idle_load_jpg==1)
{
idle_load_jpg=0;
LoadPictureFileI(UART_Read_Stream(4097,ImageBfr));
////////////////// should I add it here ?
InvalidateRect(ghWnd, NULL, TRUE);
idle_load_jpg=1;
}
}
}
You have to wait for screen refresh. I was doing the same thing once and
had the same problem. Unfortunately, I lost the code so can't give you any
examples.