Click here to Skip to main content
15,917,632 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4738-Aug-07 6:37
p_4738-Aug-07 6:37 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery8-Aug-07 7:17
Mark Salsbery8-Aug-07 7:17 
I would try this before doing all that:

Note the current project's entry point setting (linker settings)

Set the project settings to use MFC DLL or static link

Make sure changing that setting didn't change the entry point setting - if so, set it back to the noted setting from step 1

Add a single global CWinApp object in the main module:
   CMyWinApp theMFCApp;

Add these lines to your _tWinMain:

        AfxInitialize();
        AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0);


The last part I'm not sure of since I haven't used ATL windows.  Wherever you have access to
the app's main message loop, add a call to your CWinApp object's PreTranslateMessage method, something like:

   if (!theMFCApp.PreTranslateMessage(&msg))
   {
      ... MFC didn't process the message - let ATL handle it...
      ... pass it on to the ATL message handler...
   }

You should be able to create MFC windows.

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

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

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.