Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4739-Aug-07 6:31
p_4739-Aug-07 6:31 
AnswerRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery9-Aug-07 6:46
Mark Salsbery9-Aug-07 6:46 
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 
Hi Peter,

Sorry about that, I let email notification of your post slip down my inbox.

Definitely post the problem anywhere you can Smile | :)   It's always good to have a variety
of possible solutions to draw from.

Anyway, the issue was the message loop.  I looked in the ATL code and
using a modal dialog main window won't work. ATL just passes it to a Windows modal
dialog API so there's no way to get the messages over to the MFC side.

I saw an interesting post (on another site) yesterday that seemed like an easy solution.
It's probably similar to the one in the Microsoft link you found.

Starting with an MFC app, override the Run() method in the CWinApp class.
In the override, don't call the base class Run() - Instead, override the ATL message loop
method and call that.  In that override pass messages to the CWinApp PreTranslateMessage().

It's not much different than what we've been discussing, and it would still require your ATL
main window to be modeless.

MArk



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

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 
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 

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.