Click here to Skip to main content
16,006,442 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OT Pin
Nibu babu thomas4-Apr-07 0:55
Nibu babu thomas4-Apr-07 0:55 
GeneralRe: OT Pin
ThatsAlok18-Apr-07 21:30
ThatsAlok18-Apr-07 21:30 
QuestionSendMessage Pin
Anilkumar K V3-Apr-07 20:11
Anilkumar K V3-Apr-07 20:11 
AnswerRe: SendMessage Pin
Naveen3-Apr-07 20:44
Naveen3-Apr-07 20:44 
AnswerRe: SendMessage Pin
prasad_som3-Apr-07 21:10
prasad_som3-Apr-07 21:10 
GeneralRe: SendMessage Pin
Naveen3-Apr-07 21:39
Naveen3-Apr-07 21:39 
AnswerRe: SendMessage Pin
prasad_som4-Apr-07 2:47
prasad_som4-Apr-07 2:47 
AnswerRe: SendMessage Pin
Roger Stoltz3-Apr-07 21:47
Roger Stoltz3-Apr-07 21:47 
anilFirst wrote:
Does this means that for messages received by SendMessage, the message loop( GetMessage & DispatchMessage) is not needed to process the message and call the windowproc.


It depends on from what thread the message is "sent".
If the message is sent from the thread that created the window, the message handler will get called directly without taking the detour of the message loop.
If the message is sent from another thread, the receiving thread must be running a message loop since a context switch will be made to the receiving thread while the sending thread is blocked. This is also the reason why a deadlock situation can occur when sending messages from different threads and the receiving thread doesn't process messages.

Have a closer look at MSDN documentation for SendMessage() here[^] below the "Remarks" section.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown

GeneralRe: SendMessage Pin
Anilkumar K V3-Apr-07 23:00
Anilkumar K V3-Apr-07 23:00 
GeneralRe: SendMessage Pin
Roger Stoltz4-Apr-07 1:08
Roger Stoltz4-Apr-07 1:08 
GeneralRe: SendMessage Pin
Anilkumar K V9-Apr-07 23:14
Anilkumar K V9-Apr-07 23:14 
GeneralRe: SendMessage Pin
Roger Stoltz10-Apr-07 1:29
Roger Stoltz10-Apr-07 1:29 
GeneralRe: SendMessage Pin
Anilkumar K V11-Apr-07 19:53
Anilkumar K V11-Apr-07 19:53 
QuestionTab controls Pin
deeps_cute3-Apr-07 20:04
deeps_cute3-Apr-07 20:04 
AnswerRe: Tab controls Pin
vimarsh puneet3-Apr-07 20:31
vimarsh puneet3-Apr-07 20:31 
AnswerRe: Tab controls Pin
Cedric Moonen3-Apr-07 20:56
Cedric Moonen3-Apr-07 20:56 
QuestionMake virtual method in my project Pin
nhatvhm3-Apr-07 18:34
nhatvhm3-Apr-07 18:34 
GeneralRe: Make virtual method in my project Pin
prasad_som3-Apr-07 18:48
prasad_som3-Apr-07 18:48 
AnswerRe: Make virtual method in my project Pin
ThatsAlok18-Apr-07 21:08
ThatsAlok18-Apr-07 21:08 
QuestionHow to use form view in tab control Pin
sireesha_sree3-Apr-07 18:29
sireesha_sree3-Apr-07 18:29 
AnswerRe: How to use form view in tab control Pin
Naveen3-Apr-07 19:14
Naveen3-Apr-07 19:14 
GeneralRe: How to use form view in tab control Pin
sireesha_sree3-Apr-07 19:22
sireesha_sree3-Apr-07 19:22 
QuestionRe: How to use form view in tab control Pin
vimarsh puneet3-Apr-07 19:26
vimarsh puneet3-Apr-07 19:26 
AnswerRe: How to use form view in tab control Pin
sireesha_sree3-Apr-07 19:49
sireesha_sree3-Apr-07 19:49 
GeneralRe: How to use form view in tab control Pin
vimarsh puneet3-Apr-07 20:02
vimarsh puneet3-Apr-07 20:02 

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.