Click here to Skip to main content
15,902,763 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4739-Aug-07 21:30
p_4739-Aug-07 21:30 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery10-Aug-07 4:49
Mark Salsbery10-Aug-07 4:49 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_47310-Aug-07 7:53
p_47310-Aug-07 7:53 
QuestionRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_47311-Aug-07 1:24
p_47311-Aug-07 1:24 
QuestionRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_47315-Aug-07 4:57
p_47315-Aug-07 4:57 
AnswerRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery15-Aug-07 5:23
Mark Salsbery15-Aug-07 5:23 
QuestionRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_47324-Aug-07 7:50
p_47324-Aug-07 7:50 
QuestionRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_47327-Aug-07 6:17
p_47327-Aug-07 6:17 
Hi Mark,

I searched the web during the weekend and now understand the MFC
startup mechanism better (how the messaging in ATL works, however,
is still not clear to me). But when I include the MFC windowing stuff
via afxwin.h, the WinMain() function gets also included (after some
ways around: afxwin.h -> afx.h -> afxver_.h -> afxv_w32.h -> windows.h
->winbase.h). So this collides with the _tWinmain definition (_tWinMain
is equal to WinMain, as defined in tchar.h which is included via
afxv_32.h after windows.h). That is, when following the MFC architec-
ture I really should kick off the own _tWinMain definition?
The approach you mentioned sounds promising as it seems to correspond
to the approach in the Microsoft support link you re-mentioned.
So the place to multiplex the messages between the MFC and the ATL
objects in my application seems to be the PreTranslateMessage()
function. So I don't have to override PreTranslateMessage()? Wouldn't
it be sufficient to override PreTranslateMessage instead of the
procedure you proposed? Why do I have to first override CWinApp::Run()
which calls the ATL message loop (how should I do that?) which in
turn calls PreTranslateMessage()? Why this zig-zag-course? What should
I do in the ATL message loop? - Only the call to PreTranslateMessage?
Or is there more to be done? So the way becomes clearer now, although
not all details are clear to me already.

Would be great if you could answer and maybe drop a little example
code so I get the picture.

Best regards,

Peter.
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
pbor17-Aug-08 21:40
pbor17-Aug-08 21:40 
Questioni need to use a ddk Pin
javad_20057-Aug-07 6:13
javad_20057-Aug-07 6:13 
AnswerRe: i need to use a ddk Pin
Sam_c7-Aug-07 6:42
Sam_c7-Aug-07 6:42 
QuestionSimilar Images Pin
Maynka7-Aug-07 4:03
Maynka7-Aug-07 4:03 
AnswerRe: Similar Images Pin
led mike7-Aug-07 4:42
led mike7-Aug-07 4:42 
GeneralRe: Similar Images Pin
Jim Crafton7-Aug-07 9:36
Jim Crafton7-Aug-07 9:36 
GeneralRe: Similar Images Pin
led mike7-Aug-07 10:14
led mike7-Aug-07 10:14 
GeneralRe: Similar Images Pin
David Crow7-Aug-07 10:24
David Crow7-Aug-07 10:24 
GeneralRe: Similar Images Pin
led mike7-Aug-07 10:51
led mike7-Aug-07 10:51 
AnswerRe: Similar Images Pin
Hamid_RT7-Aug-07 19:12
Hamid_RT7-Aug-07 19:12 
QuestionVS 2008 Beta 2 with VS 2003/2005 Pin
redWingBB7-Aug-07 3:30
redWingBB7-Aug-07 3:30 
AnswerRe: VS 2008 Beta 2 with VS 2003/2005 Pin
toxcct7-Aug-07 3:57
toxcct7-Aug-07 3:57 
AnswerRe: VS 2008 Beta 2 with VS 2003/2005 Pin
Mark Salsbery7-Aug-07 5:09
Mark Salsbery7-Aug-07 5:09 
AnswerRe: VS 2008 Beta 2 with VS 2003/2005 Pin
#realJSOP8-Aug-07 0:10
professional#realJSOP8-Aug-07 0:10 
Questionabout RutTime Classes Pin
mt_samiei7-Aug-07 2:47
mt_samiei7-Aug-07 2:47 
Questionabout Runtime Class Pin
mt_samiei7-Aug-07 2:38
mt_samiei7-Aug-07 2:38 
AnswerRe: about Runtime Class Pin
Mark Salsbery7-Aug-07 5:10
Mark Salsbery7-Aug-07 5:10 

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.