Click here to Skip to main content
15,904,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CImageList when .draw -> no more transparent Pin
karhong8-Jan-09 18:42
karhong8-Jan-09 18:42 
GeneralRe: CImageList when .draw -> no more transparent Pin
Iain Clarke, Warrior Programmer9-Jan-09 0:28
Iain Clarke, Warrior Programmer9-Jan-09 0:28 
QuestionPreventing / Checking null 'this' pointer adjustment w/ Multiple Inheritance Pin
D. Miller8-Jan-09 13:18
D. Miller8-Jan-09 13:18 
AnswerRe: Preventing / Checking null 'this' pointer adjustment w/ Multiple Inheritance Pin
Stuart Dootson8-Jan-09 13:39
professionalStuart Dootson8-Jan-09 13:39 
GeneralRe: Preventing / Checking null 'this' pointer adjustment w/ Multiple Inheritance Pin
D. Miller9-Jan-09 1:47
D. Miller9-Jan-09 1:47 
GeneralRe: Preventing / Checking null 'this' pointer adjustment w/ Multiple Inheritance Pin
Stuart Dootson9-Jan-09 2:20
professionalStuart Dootson9-Jan-09 2:20 
QuestionOverflowing the Windows’s message Queue Pin
BobInNJ8-Jan-09 7:21
BobInNJ8-Jan-09 7:21 
GeneralRe: Overflowing the Windows’s message Queue Pin
Luc Pattyn8-Jan-09 7:51
sitebuilderLuc Pattyn8-Jan-09 7:51 
Hi,

IIRC some messages get special treatment; e.g. WM_PAINT messages may get merged if all they do is request a repaint of (parts of) the same Control. Maybe it is also true for setting a text to a label,
etc.

Your app is also likely to get some messages from the outside world (device inserted, task manager checking for "not responding", etc).

if you suspect your queue is "filling up", the design is not OK; what will happen if your system gets another load at the same time? what if your app needs to run on a slower PC?

When you have a progress bar showing a progress say in percent, then it does not really make sense to send it 10,000 progress updates, it probably can only show 100 or so different states anyway; so you should consider a cheaper way of reporting, probably by aggregating a number of progress steps.

Do you really need that much GUI activity; after all it is consuming its share of CPU cycles, and hence slowing down the simulation of which you are eager to know the progress!?!?

One way I often handle these kinds of requirements is by having the background doing its job without reporting anything, and having one more thread which periodically (a few Hz) reports the progress by
looking at the backgrounder state variables (if they are simple enough, that does not require any
synchronization, locking, whatever...)

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Love, happiness and fewer bugs for 2009!


GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ8-Jan-09 10:06
BobInNJ8-Jan-09 10:06 
AnswerRe: Overflowing the Windows’s message Queue Pin
Code-o-mat8-Jan-09 8:56
Code-o-mat8-Jan-09 8:56 
GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ8-Jan-09 10:10
BobInNJ8-Jan-09 10:10 
GeneralRe: Overflowing the Windows’s message Queue Pin
David Crow8-Jan-09 10:15
David Crow8-Jan-09 10:15 
GeneralRe: Overflowing the Windows’s message Queue Pin
Code-o-mat8-Jan-09 10:31
Code-o-mat8-Jan-09 10:31 
GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ8-Jan-09 11:18
BobInNJ8-Jan-09 11:18 
GeneralRe: Overflowing the Windows’s message Queue Pin
Code-o-mat8-Jan-09 21:45
Code-o-mat8-Jan-09 21:45 
GeneralRe: Overflowing the Windows’s message Queue Pin
David Crow9-Jan-09 3:32
David Crow9-Jan-09 3:32 
GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ9-Jan-09 6:20
BobInNJ9-Jan-09 6:20 
GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ8-Jan-09 12:02
BobInNJ8-Jan-09 12:02 
AnswerRe: Overflowing the Windows’s message Queue Pin
Roger Stoltz8-Jan-09 12:05
Roger Stoltz8-Jan-09 12:05 
GeneralRe: Overflowing the Windows’s message Queue Pin
Code-o-mat8-Jan-09 21:38
Code-o-mat8-Jan-09 21:38 
GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ9-Jan-09 8:02
BobInNJ9-Jan-09 8:02 
AnswerRe: Overflowing the Windows’s message Queue Pin
David Crow8-Jan-09 9:08
David Crow8-Jan-09 9:08 
GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ8-Jan-09 10:03
BobInNJ8-Jan-09 10:03 
GeneralRe: Overflowing the Windows’s message Queue Pin
David Crow8-Jan-09 10:13
David Crow8-Jan-09 10:13 
GeneralRe: Overflowing the Windows’s message Queue Pin
BobInNJ8-Jan-09 11:12
BobInNJ8-Jan-09 11:12 

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.