Click here to Skip to main content
15,917,559 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMFC: Unicode and Code Pages Pin
Jim Herren18-Mar-05 12:57
Jim Herren18-Mar-05 12:57 
GeneralRe: MFC: Unicode and Code Pages Pin
Mike Dimmick19-Mar-05 13:19
Mike Dimmick19-Mar-05 13:19 
GeneralRe: MFC: Unicode and Code Pages Pin
Jim Herren19-Mar-05 16:38
Jim Herren19-Mar-05 16:38 
GeneralGet "Text" with Hook Pin
postler-t18-Mar-05 11:25
postler-t18-Mar-05 11:25 
GeneralRe: Get "Text" with Hook Pin
Alexander M.,19-Mar-05 4:53
Alexander M.,19-Mar-05 4:53 
GeneralRe: Get "Text" with Hook Pin
postler-t19-Mar-05 6:44
postler-t19-Mar-05 6:44 
Generalproblem with TBSTYLE_FLAT toolbar Pin
ljr2418-Mar-05 11:10
ljr2418-Mar-05 11:10 
GeneralOnSize execution, locks Pin
Vancouver18-Mar-05 11:02
Vancouver18-Mar-05 11:02 
The OnSize handler of a CListCtrl receives control once for each small dragging movement separatedly. If one drags the mouse quickly when resizing, the messages will be generated quickly too.

Because the resizing of a dozen columns or so is a bit computing intensive, a message generated from a longer mouse movement (dragging) with the the new size can arrive sooner than the processing of the previous message has been finished. Is this normal? Should not the processing of the previous message (the same type of message, the same handler, to the same object) be completed before the next such message gets scheduled?

The interruption of the message processing causes problem, because size calculations get confused.
I am trying to synchronize the executions with using locks.

I declared a CCriticalSection object and used Lock and Unlock in the OnSize handler. It has no effect. The lock count goes up, and it does not block the thread from execustion.

I declared a CRITICAL_SECTION object and used Init, Enter and Leave - the result is the same.
Why is the lock not blocking the thread?
GeneralRe: OnSize execution, locks Pin
Blake Miller18-Mar-05 11:42
Blake Miller18-Mar-05 11:42 
GeneralRe: OnSize execution, locks Pin
Vancouver18-Mar-05 11:56
Vancouver18-Mar-05 11:56 
GeneralRe: OnSize execution, locks Pin
Blake Miller18-Mar-05 12:18
Blake Miller18-Mar-05 12:18 
GeneralRe: OnSize execution, locks Pin
Vancouver18-Mar-05 15:33
Vancouver18-Mar-05 15:33 
GeneralFinal explanation Pin
Vancouver19-Mar-05 10:59
Vancouver19-Mar-05 10:59 
Generalsizeof() question Pin
BlackDice18-Mar-05 10:22
BlackDice18-Mar-05 10:22 
GeneralRe: sizeof() question Pin
Ravi Bhavnani18-Mar-05 10:27
professionalRavi Bhavnani18-Mar-05 10:27 
GeneralRe: sizeof() question Pin
BlackDice18-Mar-05 10:42
BlackDice18-Mar-05 10:42 
GeneralRe: sizeof() question Pin
Ravi Bhavnani18-Mar-05 11:21
professionalRavi Bhavnani18-Mar-05 11:21 
GeneralRe: sizeof() question Pin
Blake Miller18-Mar-05 11:44
Blake Miller18-Mar-05 11:44 
GeneralRe: sizeof() question Pin
Ravi Bhavnani18-Mar-05 11:53
professionalRavi Bhavnani18-Mar-05 11:53 
QuestionHow do I treat a key combination? Pin
Anonymous18-Mar-05 10:10
Anonymous18-Mar-05 10:10 
AnswerRe: How do I treat a key combination? Pin
includeh1018-Mar-05 10:33
includeh1018-Mar-05 10:33 
GeneralRe: How do I treat a key combination? Pin
Anonymous18-Mar-05 10:43
Anonymous18-Mar-05 10:43 
AnswerRe: How do I treat a key combination? Pin
Blake Miller18-Mar-05 11:47
Blake Miller18-Mar-05 11:47 
GeneralCOM question Pin
act_x18-Mar-05 9:14
act_x18-Mar-05 9:14 
GeneralDeveloper with MP3 Library Pin
fishwolf18-Mar-05 5:38
fishwolf18-Mar-05 5:38 

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.