Click here to Skip to main content
15,901,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem while adding record in MFC database application Pin
David Crow17-Aug-04 4:11
David Crow17-Aug-04 4:11 
QuestionHow to call and execute parameter query with ADO? Pin
george ivanov13-Aug-04 4:23
george ivanov13-Aug-04 4:23 
GeneralStatic text disappears after losing focus Pin
shultas13-Aug-04 4:12
shultas13-Aug-04 4:12 
GeneralRe: Static text disappears after losing focus Pin
Ravi Bhavnani13-Aug-04 4:48
professionalRavi Bhavnani13-Aug-04 4:48 
GeneralRe: Static text disappears after losing focus Pin
shultas13-Aug-04 5:04
shultas13-Aug-04 5:04 
GeneralRe: Static text disappears after losing focus Pin
David Crow13-Aug-04 5:37
David Crow13-Aug-04 5:37 
GeneralRe: Static text disappears after losing focus Pin
Ravi Bhavnani13-Aug-04 10:48
professionalRavi Bhavnani13-Aug-04 10:48 
GeneralWindows message handling with different threads. Pin
Moak13-Aug-04 4:12
Moak13-Aug-04 4:12 
Hi,

this week I digged a bit deeper into understanding Windows message handling and some things are unclear for me. Let's assume a simple program where you have thread A running the message pump (GetMessage, Translate, Dispatch), and another threads B sending/posting events to this window's message queue. My questions are....

- SendMessage() will not put the message into the queue but directly processes the window's WndProc and block until message was processed. A context switch is triggered immediate to thread A?

- Postmessage() will put the message into the queue and return. When is the context switch happening, before or after PostMessage returns? If after, I wonder how windows wakes up the message queue to process the waiting messages and how big the (average/worst) delay is until the corresponding WndProc will be called.

- Is there a possible dead lock with Sendmessage() and two threads (A and B) both having an own message queue? Example, when you send a message to thread A's message queue and A's Wndproc sends back a message to B's message queue. Since B is waiting blocking for the first message to complete, thread A will then have to wait forever?

- When you use SetTimer() to create repeated timer events, are those WM_TIMER messages generated from the message queue and synchronous for all threads in the same process?

Thanks for information. I am very interested in background information how Windows makes message handling fast and comfortable.

Cheers, Moak
GeneralRe: Windows message handling with different threads. Pin
David Crow13-Aug-04 7:11
David Crow13-Aug-04 7:11 
GeneralRe: Windows message handling with different threads. Pin
MoakInternetcafe15-Aug-04 4:46
sussMoakInternetcafe15-Aug-04 4:46 
GeneralIt seems nobody here knows how to do this!!! Pin
CreepingFeature13-Aug-04 3:57
CreepingFeature13-Aug-04 3:57 
GeneralRe: It seems nobody here knows how to do this!!! Pin
David Crow13-Aug-04 4:04
David Crow13-Aug-04 4:04 
GeneralRe: It seems nobody here knows how to do this!!! Pin
Tom Dziedzic13-Aug-04 8:09
Tom Dziedzic13-Aug-04 8:09 
GeneralRe: It seems nobody here knows how to do this!!! Pin
David Crow13-Aug-04 10:10
David Crow13-Aug-04 10:10 
GeneralRe: It seems nobody here knows how to do this!!! Pin
Rick York13-Aug-04 12:34
mveRick York13-Aug-04 12:34 
GeneralRe: It seems nobody here knows how to do this!!! Pin
David Crow16-Aug-04 2:17
David Crow16-Aug-04 2:17 
GeneralRe: It seems nobody here knows how to do this!!! Pin
Archer28214-Aug-04 7:12
Archer28214-Aug-04 7:12 
GeneralVC6 Workspace settings Pin
jerry0davis13-Aug-04 3:50
jerry0davis13-Aug-04 3:50 
GeneralRe: VC6 Workspace settings Pin
David Crow13-Aug-04 4:00
David Crow13-Aug-04 4:00 
GeneralRe: VC6 Workspace settings Pin
jerry0davis13-Aug-04 4:28
jerry0davis13-Aug-04 4:28 
Generalreturning IDOK from dialog Pin
BlackDice13-Aug-04 3:49
BlackDice13-Aug-04 3:49 
GeneralRe: returning IDOK from dialog Pin
David Crow13-Aug-04 3:53
David Crow13-Aug-04 3:53 
GeneralRe: returning IDOK from dialog Pin
BlackDice13-Aug-04 3:58
BlackDice13-Aug-04 3:58 
GeneralRe: returning IDOK from dialog Pin
Ravi Bhavnani13-Aug-04 3:55
professionalRavi Bhavnani13-Aug-04 3:55 
GeneralRe: returning IDOK from dialog Pin
BlackDice13-Aug-04 4:05
BlackDice13-Aug-04 4:05 

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.