Sean
May 12th, 1999, 02:55 AM
I'm working on a MFC MDI project that displays complex images - complex in the sense that they are encoded and thus have to be decoded when printing to the screen. So when I open a file it takes quite a while to draw it in my child window.
My question is, how should I implement scrolling in this situation? When drawing to the screen, I decode and draw one row at a time. If I scroll to the left or right, only a very small portion of a row my have to be redrawn, yet as it is my program redraws the whole row, which takes some time.
I think I should use InvalidateRect or some similar function, but even after reading the MS help files I still don't understand how to use these functions. Could somebody help, or maybe even recommend a CodeGuru sample file that answers my question? I've searched through some of the CodeGuru samples, but I found the names a bit obscure........
Thank you,
Sean.
My question is, how should I implement scrolling in this situation? When drawing to the screen, I decode and draw one row at a time. If I scroll to the left or right, only a very small portion of a row my have to be redrawn, yet as it is my program redraws the whole row, which takes some time.
I think I should use InvalidateRect or some similar function, but even after reading the MS help files I still don't understand how to use these functions. Could somebody help, or maybe even recommend a CodeGuru sample file that answers my question? I've searched through some of the CodeGuru samples, but I found the names a bit obscure........
Thank you,
Sean.