Click here to Skip to main content
15,168,105 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Sending message to WindowProc() Pin
Randor 22-Jul-07 21:18
professional Randor 22-Jul-07 21:18 
GeneralRe: Sending message to WindowProc() Pin
rp_suman22-Jul-07 21:36
Memberrp_suman22-Jul-07 21:36 
GeneralRe: Sending message to WindowProc() Pin
Randor 22-Jul-07 22:13
professional Randor 22-Jul-07 22:13 
GeneralRe: Sending message to WindowProc() Pin
rp_suman22-Jul-07 22:47
Memberrp_suman22-Jul-07 22:47 
GeneralRe: Sending message to WindowProc() Pin
Stephen Hewitt22-Jul-07 23:02
MemberStephen Hewitt22-Jul-07 23:02 
GeneralRe: Sending message to WindowProc() [modified] Pin
rp_suman22-Jul-07 23:32
Memberrp_suman22-Jul-07 23:32 
GeneralRe: Sending message to WindowProc() Pin
sw@thi23-Jul-07 0:02
Membersw@thi23-Jul-07 0:02 
GeneralRe: Sending message to WindowProc() Pin
Randor 23-Jul-07 3:16
professional Randor 23-Jul-07 3:16 
Hello again,

I am happy that your issue has been resolved. But, so you can learn from this experience with others... let me explain my theory about what was happening.

You stated that you were calling AfxGetMainWnd() from within a callback function. Callbacks are often not excuting within the same thread as the main window. They may be called from an external thread.

From the MSDN: http://msdn2.microsoft.com/en-us/library/waas15s1(VS.80).aspx[^]

"If AfxGetMainWnd is called from the application's primary thread, it returns the application's main window according to the above rules. If the function is called from a secondary thread in the application, the function returns the main window associated with the thread that made the call."

Best Wishes,
-Randor (David Delaune)
GeneralRe: Sending message to WindowProc() Pin
rp_suman23-Jul-07 4:06
Memberrp_suman23-Jul-07 4:06 
AnswerRe: Sending message to WindowProc() Pin
Stephen Hewitt22-Jul-07 22:13
MemberStephen Hewitt22-Jul-07 22:13 
GeneralRe: Sending message to WindowProc() Pin
rp_suman22-Jul-07 22:57
Memberrp_suman22-Jul-07 22:57 
QuestionADO Fails to Add New Record In Database, Code compiles and runs fine Pin
shivditya22-Jul-07 18:44
Membershivditya22-Jul-07 18:44 
QuestionTwo localization questions Pin
mid=574122-Jul-07 17:34
Membermid=574122-Jul-07 17:34 
AnswerRe: Two localization questions Pin
Sameerkumar Namdeo22-Jul-07 22:06
MemberSameerkumar Namdeo22-Jul-07 22:06 
GeneralRe: Two localization questions Pin
mid=574123-Jul-07 5:58
Membermid=574123-Jul-07 5:58 
QuestionHide dialog in ObjectArx Pin
Legolas6522-Jul-07 14:39
MemberLegolas6522-Jul-07 14:39 
QuestionHow to add a resource to an external exe file? Pin
Manthis22-Jul-07 14:20
MemberManthis22-Jul-07 14:20 
AnswerRe: How to add a resource to an external exe file? Pin
Michael Dunn22-Jul-07 15:13
sitebuilderMichael Dunn22-Jul-07 15:13 
AnswerRe: How to add a resource to an external exe file? Pin
ThatsAlok22-Jul-07 18:49
MemberThatsAlok22-Jul-07 18:49 
AnswerRe: How to add a resource to an external exe file? Pin
Sameerkumar Namdeo22-Jul-07 22:15
MemberSameerkumar Namdeo22-Jul-07 22:15 
AnswerRe: How to add a resource to an external exe file? Pin
Manthis23-Jul-07 12:20
MemberManthis23-Jul-07 12:20 
QuestionBinary tree question. NEED INFO FAST..thanks Pin
diablaaz22-Jul-07 12:27
Memberdiablaaz22-Jul-07 12:27 
AnswerRe: Binary tree question. NEED INFO FAST..thanks Pin
DevMentor.org22-Jul-07 20:12
MemberDevMentor.org22-Jul-07 20:12 
QuestionC++ programming question [modified] Pin
diablaaz22-Jul-07 12:25
Memberdiablaaz22-Jul-07 12:25 
AnswerRe: C++ programming question Pin
Malcolm Smart22-Jul-07 12:32
MemberMalcolm Smart22-Jul-07 12:32 

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.