Click here to Skip to main content
15,896,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: tree view using form view. Pin
Maximilien29-Jan-10 8:39
Maximilien29-Jan-10 8:39 
AnswerRe: tree view using form view. Pin
KingsGambit29-Jan-10 8:44
KingsGambit29-Jan-10 8:44 
QuestionSend Mail Pin
Member 686483929-Jan-10 6:27
Member 686483929-Jan-10 6:27 
AnswerRe: Send Mail Pin
CPallini29-Jan-10 6:48
mveCPallini29-Jan-10 6:48 
QuestionRe: Send Mail Pin
David Crow30-Jan-10 5:24
David Crow30-Jan-10 5:24 
AnswerRe: Send Mail Pin
Member 686483930-Jan-10 10:00
Member 686483930-Jan-10 10:00 
GeneralRe: Send Mail Pin
David Crow30-Jan-10 12:15
David Crow30-Jan-10 12:15 
QuestionListBox redrawing Pin
Rock Bottom29-Jan-10 6:13
Rock Bottom29-Jan-10 6:13 
I'm new here, please bear with me.

I'm not sure if this is the appropriate place to put it, as my question is regarding C++, but for OWL rather than MFC. Anyways, down to the problem:

I'm maintaining some legacy code which involves a multi-line listbox. The contents of this listbox are loaded in through the EvDrawItem function. The EvDrawItem gets called repeatedly. While selecting an object, the cells in the listbox are selected one at a time too, and we are manually painting it in (not sure if this is the right way to do it). This becomes noticeable only when the items are long.

Now, here's the biggest part of the problem: when double-clicking on an item, we are supposed to pop up an edit box. While this does happen, the double-clicking is seen to cause the item to do cycles of "select, select, de-select, select"...about 50 (each cycle is made up of 4 EvDrawItems) times (is this normal???).

With some research, I do feel that I should probably make use of the setredraw and invalidate functions, but I'm not sure where's the best place to put these codes in so that they propagate through the rest of the program where similar listboxes are used.

Also, since the draw and the insertions are handled together, would suppressing redraw affect how the list loads up?

modified on Friday, January 29, 2010 2:45 PM

AnswerRe: ListBox redrawing Pin
LunaticFringe29-Jan-10 8:54
LunaticFringe29-Jan-10 8:54 
GeneralRe: ListBox redrawing Pin
Rock Bottom29-Jan-10 8:57
Rock Bottom29-Jan-10 8:57 
GeneralRe: ListBox redrawing Pin
LunaticFringe29-Jan-10 9:32
LunaticFringe29-Jan-10 9:32 
GeneralRe: ListBox redrawing Pin
Rock Bottom29-Jan-10 9:59
Rock Bottom29-Jan-10 9:59 
AnswerRe: ListBox redrawing Pin
David Crow30-Jan-10 5:26
David Crow30-Jan-10 5:26 
GeneralRe: ListBox redrawing Pin
Rock Bottom1-Feb-10 5:55
Rock Bottom1-Feb-10 5:55 
QuestioncapPreview() slow problem... Pin
Aric Wang29-Jan-10 5:24
Aric Wang29-Jan-10 5:24 
AnswerRe: capPreview() slow problem... Pin
Richard MacCutchan29-Jan-10 6:22
mveRichard MacCutchan29-Jan-10 6:22 
GeneralRe: capPreview() slow problem... Pin
Aric Wang29-Jan-10 6:48
Aric Wang29-Jan-10 6:48 
GeneralRe: capPreview() slow problem... Pin
Richard MacCutchan29-Jan-10 9:17
mveRichard MacCutchan29-Jan-10 9:17 
GeneralRe: capPreview() slow problem... [modified] Pin
Aric Wang29-Jan-10 16:10
Aric Wang29-Jan-10 16:10 
AnswerRe: capPreview() slow problem... Pin
Chris Meech29-Jan-10 6:33
Chris Meech29-Jan-10 6:33 
GeneralRe: capPreview() slow problem... Pin
Aric Wang29-Jan-10 6:45
Aric Wang29-Jan-10 6:45 
AnswerRe: capPreview() slow problem... Pin
Saurabh.Garg30-Jan-10 19:03
Saurabh.Garg30-Jan-10 19:03 
GeneralRe: capPreview() slow problem... Pin
Aric Wang31-Jan-10 1:57
Aric Wang31-Jan-10 1:57 
QuestionCombo box - Dropdown height? Pin
dipuks29-Jan-10 2:00
dipuks29-Jan-10 2:00 
AnswerRe: Combo box - Dropdown height? Pin
Rajesh R Subramanian29-Jan-10 2:03
professionalRajesh R Subramanian29-Jan-10 2:03 

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.