Link to home
Start Free TrialLog in
Avatar of viswanathat
viswanathat

asked on

Scroll bars - Painting in a window

IDE : VC5

I am creating a window  control inside a dialog and drawing horizontal and vertical lines inside that to make it as a grid control.

The window has horizontal and vertical scrool bars and I am handling these scroll events and repainting the uncovered area to show rest of the grid.

In windows NT, when horizontal scroll bar is used the grid is not repainted in the area newly made visible.

But It is working perfectly in windows 2000.
Is the difference in MSVCrt,MSVCirt,MFC42,GDI32 dlls in these OS   can cause these problems?

The code is

GetClientRect(&rc);
ScrollWindow(iScrollPos,0,&rc,&rc);

Where iScrollPos is the value I am calculating to fix the number of columns to be moved.


While debugging The OnHScroll-scrollwindow calls onpaint and draws all the lines
but it is not displayed in the moved portion.


What could be the problem?

Either calling update window or passing rc = NULL is not solving it.

Regards.
Viswanath
ASKER CERTIFIED SOLUTION
Avatar of MTPudelko
MTPudelko
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: MTPudelko

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer