Click here to Skip to main content
16,011,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OS Threads Scheduling Pin
reza matinnejad27-Feb-08 2:08
reza matinnejad27-Feb-08 2:08 
GeneralRe: OS Threads Scheduling Pin
pbraun27-Feb-08 9:32
pbraun27-Feb-08 9:32 
QuestionHow to integrate *.htm in MFC program? Pin
TooShy2Talk27-Feb-08 0:02
TooShy2Talk27-Feb-08 0:02 
QuestionRe: How to integrate *.htm in MFC program? Pin
Maxwell Chen27-Feb-08 0:09
Maxwell Chen27-Feb-08 0:09 
AnswerRe: How to integrate *.htm in MFC program? Pin
Rajesh R Subramanian27-Feb-08 0:16
professionalRajesh R Subramanian27-Feb-08 0:16 
GeneralRe: How to integrate *.htm in MFC program? Pin
Demian Panello27-Feb-08 1:42
Demian Panello27-Feb-08 1:42 
GeneralRe: How to integrate *.htm in MFC program? Pin
Hamid_RT27-Feb-08 5:05
Hamid_RT27-Feb-08 5:05 
GeneralPaint problems during scrolling Pin
misha_grewal26-Feb-08 23:26
misha_grewal26-Feb-08 23:26 
I have a CTreeCtrl derived class which does heavy custom drawing for various styles.
One of the style is "Right justified" item, that is a tree item should be drawn at the right most corner of the window. Its an hyperlink as well.

I have handled NM_CUSTOMDRAW, and I do painting in PrePaint and say a Skip Default to prevent the custom drawn items to be painted again.

The code looks like this (Excerpt only)

GetItemRect(hItem, textRect, TRUE); //this gets the rect for text only <br />
 GetItemRect(hItem, itemRect, FALSE); //get the text for full item area<br />
<br />
 if ( itemStyle is Right Justified ) {<br />
<br />
               // subtract offset for right justified<br />
               itemRect.right -= _offsetRTJustifed;<br />
<br />
               itemRect.left = itemRect.right - textRect.Width();<br />
<br />
               pDC->DrawText(sItemText, &itemRect, DT_LEFT);<br />
}


This right justified item is added under a root item and appears when user expands that root item. When the user plays around with the tree items, expanding and collapsing often, the vertical scroll bar appears and disappears as per the number of tree items. Due to this scroll bar appearing/disappearing, the painting of this right justified item gets garbled.

(It seems as if the paint messages are lost in between very frequent scroll bar displays/removals)..

Its difficult to suggest, but would appreciate if somebody has a clue about it..


Thanks

Evil triumphs when good people sit quiet...

Questionwhy no ambiguity error in code? Pin
George_George26-Feb-08 23:17
George_George26-Feb-08 23:17 
AnswerRe: why no ambiguity error in code? Pin
Rajkumar R26-Feb-08 23:45
Rajkumar R26-Feb-08 23:45 
GeneralRe: why no ambiguity error in code? Pin
George_George27-Feb-08 0:13
George_George27-Feb-08 0:13 
AnswerRe: why no ambiguity error in code? Pin
Rajkumar R27-Feb-08 0:30
Rajkumar R27-Feb-08 0:30 
GeneralRe: why no ambiguity error in code? Pin
George_George27-Feb-08 0:59
George_George27-Feb-08 0:59 
GeneralRe: why no ambiguity error in code? Pin
Rajkumar R27-Feb-08 1:34
Rajkumar R27-Feb-08 1:34 
GeneralRe: why no ambiguity error in code? Pin
George_George27-Feb-08 1:43
George_George27-Feb-08 1:43 
GeneralRe: why no ambiguity error in code? Pin
Arman S.27-Feb-08 0:37
Arman S.27-Feb-08 0:37 
GeneralRe: why no ambiguity error in code? Pin
George_George27-Feb-08 0:50
George_George27-Feb-08 0:50 
GeneralTooltip Pin
sv1426-Feb-08 23:13
sv1426-Feb-08 23:13 
AnswerRe: Tooltip Pin
Rajkumar R26-Feb-08 23:48
Rajkumar R26-Feb-08 23:48 
GeneralRe: Tooltip Pin
Iain Clarke, Warrior Programmer27-Feb-08 0:05
Iain Clarke, Warrior Programmer27-Feb-08 0:05 
Generalstruct inside a class Pin
George_George26-Feb-08 21:51
George_George26-Feb-08 21:51 
GeneralRe: struct inside a class Pin
Maxwell Chen26-Feb-08 23:57
Maxwell Chen26-Feb-08 23:57 
GeneralRe: struct inside a class Pin
George_George27-Feb-08 0:26
George_George27-Feb-08 0:26 
GeneralRe: struct inside a class Pin
Maxwell Chen27-Feb-08 1:48
Maxwell Chen27-Feb-08 1:48 
GeneralRe: struct inside a class Pin
George_George27-Feb-08 1:53
George_George27-Feb-08 1:53 

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.