Click here to Skip to main content
15,899,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Deployment of VC++ Applicaations Pin
ThatsAlok8-Feb-06 18:53
ThatsAlok8-Feb-06 18:53 
QuestionHow to get the letter to a drivename? Pin
ahmet07038-Feb-06 2:02
ahmet07038-Feb-06 2:02 
AnswerRe: How to get the letter to a drivename? Pin
David Crow8-Feb-06 3:49
David Crow8-Feb-06 3:49 
GeneralRe: How to get the letter to a drivename? Pin
Rage8-Feb-06 6:26
professionalRage8-Feb-06 6:26 
GeneralRe: How to get the letter to a drivename? Pin
David Crow8-Feb-06 6:43
David Crow8-Feb-06 6:43 
GeneralRe: How to get the letter to a drivename? Pin
Rage8-Feb-06 6:27
professionalRage8-Feb-06 6:27 
GeneralRe: How to get the letter to a drivename? Pin
ahmet07038-Feb-06 20:33
ahmet07038-Feb-06 20:33 
QuestionScrollView doesn't paint correctly Pin
#realJSOP8-Feb-06 1:57
professional#realJSOP8-Feb-06 1:57 
Compiler and libraries
VC6, MFC

Intro

I have a SDI app that swaps out two views depending on user input. One of these is a CSrollView. The view displays an unknown number of lines and it's very likely that I'll have enough content to have vertical scroll bars. For testing, I purposely drew enough lines to make the content long enough to show a vertical scrollbar.

Observations
When the view is initially displayed, the expected content is drawn (all of the content is text) correctly, and the vertical scrollbar shows up as expected.

When I try to scroll the view, the display becomes corrupted, text partially drawn, text overlapping, etc.

It doesn't matter if I click the thumb controller, a scrollbar arrow, or the scrollbar itself. The display always becomes corrupted as decsribed above.


What I've Done

I've made sure SetScrollSizes is called in OnInitialUpdate.

I also call SetScrollSizes at the end of the drawing function to account for the actual number of lines I'm displaying. The scrollbars update accordingly.

Result
I'm at a complete loss as to what I'm doing wrong (and I just know this is going to be a forehead slapper). Does anyone have any ideas?

[EDIT] It was a forehead slapper. problem solved.

------- sig starts

"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt

"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001



-- modified at 10:17 Wednesday 8th February, 2006
QuestionAssertion error in OnDraw Pin
Anu_Bala8-Feb-06 0:55
Anu_Bala8-Feb-06 0:55 
AnswerRe: Assertion error in OnDraw Pin
Abebe8-Feb-06 1:20
Abebe8-Feb-06 1:20 
GeneralRe: Assertion error in OnDraw Pin
Anu_Bala8-Feb-06 16:44
Anu_Bala8-Feb-06 16:44 
GeneralRe: Assertion error in OnDraw Pin
_anil_8-Feb-06 19:03
_anil_8-Feb-06 19:03 
AnswerRe: Assertion error in OnDraw Pin
_anil_8-Feb-06 1:22
_anil_8-Feb-06 1:22 
Questionhow to get a value from registery in MFC application Pin
Issa Salama8-Feb-06 0:00
Issa Salama8-Feb-06 0:00 
AnswerRe: how to get a value from registery in MFC application Pin
Owner drawn8-Feb-06 0:09
Owner drawn8-Feb-06 0:09 
AnswerRe: how to get a value from registery in MFC application Pin
ThatsAlok8-Feb-06 18:55
ThatsAlok8-Feb-06 18:55 
QuestionNetwork Connection status monotoring Pin
Tony Kurishunkal7-Feb-06 23:56
Tony Kurishunkal7-Feb-06 23:56 
AnswerRe: Network Connection status monotoring Pin
bantisk8-Feb-06 1:12
bantisk8-Feb-06 1:12 
QuestionRe: Network Connection status monotoring Pin
David Crow8-Feb-06 3:52
David Crow8-Feb-06 3:52 
AnswerRe: Network Connection status monotoring Pin
Tony Kurishunkal13-Feb-06 22:15
Tony Kurishunkal13-Feb-06 22:15 
QuestionRe: Network Connection status monotoring Pin
David Crow14-Feb-06 2:50
David Crow14-Feb-06 2:50 
AnswerRe: Network Connection status monotoring Pin
Tony Kurishunkal14-Feb-06 16:02
Tony Kurishunkal14-Feb-06 16:02 
QuestionGroup box in XP Pin
BabuZaleela7-Feb-06 23:54
BabuZaleela7-Feb-06 23:54 
AnswerRe: Group box in XP Pin
-Dy8-Feb-06 1:29
-Dy8-Feb-06 1:29 
Questionmove button Pin
mariantonietta7-Feb-06 23:41
mariantonietta7-Feb-06 23:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.