Sean
April 15th, 1999, 12:23 AM
In my MFC MDI I have come encountered the following problem:
Firstly, my program opens image files, process the data and display it, one row at a time - i.e it processes one row of data and then displays it on screen before processing the next row. The data processing is complex so displaying the whole image takes quiet a bit of time. So as to process only the rows of the image that will be displayed on screen I use RectVisible before processing each row. This saves some time when scrolling up and down, but when I scroll horizontally, all of the image rows visible on the screen need to be redrawn, even though it is only necessary to draw a little bit of the row. So the solution that I'm trying to implement now, is.... (btw, when processing the data, I have to process a whole row at a time, but I can print as much or as little as I like) ..... in OnDraw, I do a RectVisible on the whole row. If I find that the row needs to be redrawn I process the row data, and then I do RectVisible on smaller sections of this row and redraw only the necessary parts.
Could somebody tell me if this is an efficient method? Or could you tell me of another better way?
Thank you,
Sean.
Firstly, my program opens image files, process the data and display it, one row at a time - i.e it processes one row of data and then displays it on screen before processing the next row. The data processing is complex so displaying the whole image takes quiet a bit of time. So as to process only the rows of the image that will be displayed on screen I use RectVisible before processing each row. This saves some time when scrolling up and down, but when I scroll horizontally, all of the image rows visible on the screen need to be redrawn, even though it is only necessary to draw a little bit of the row. So the solution that I'm trying to implement now, is.... (btw, when processing the data, I have to process a whole row at a time, but I can print as much or as little as I like) ..... in OnDraw, I do a RectVisible on the whole row. If I find that the row needs to be redrawn I process the row data, and then I do RectVisible on smaller sections of this row and redraw only the necessary parts.
Could somebody tell me if this is an efficient method? Or could you tell me of another better way?
Thank you,
Sean.