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

C / C++ / MFC

 
AnswerRe: Clear the debug output window Pin
Jim Crafton7-Aug-07 9:34
Jim Crafton7-Aug-07 9:34 
AnswerRe: Clear the debug output window Pin
Mark Salsbery7-Aug-07 9:44
Mark Salsbery7-Aug-07 9:44 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 10:12
bob169727-Aug-07 10:12 
GeneralRe: Clear the debug output window Pin
David Crow7-Aug-07 10:22
David Crow7-Aug-07 10:22 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:21
bob169727-Aug-07 19:21 
GeneralRe: Clear the debug output window Pin
Mark Salsbery7-Aug-07 10:28
Mark Salsbery7-Aug-07 10:28 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:44
bob169727-Aug-07 19:44 
AnswerRe: Clear the debug output window Pin
Hans Dietrich7-Aug-07 15:46
mentorHans Dietrich7-Aug-07 15:46 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:31
bob169727-Aug-07 19:31 
GeneralRe: Clear the debug output window Pin
Hans Dietrich8-Aug-07 2:50
mentorHans Dietrich8-Aug-07 2:50 
GeneralRe: Clear the debug output window Pin
bob169728-Aug-07 3:18
bob169728-Aug-07 3:18 
GeneralRe: Clear the debug output window Pin
Mark Salsbery8-Aug-07 4:57
Mark Salsbery8-Aug-07 4:57 
Questionerror C2051: case expression not constant Pin
Cuziyq7-Aug-07 8:25
Cuziyq7-Aug-07 8:25 
AnswerRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 8:40
Mark Salsbery7-Aug-07 8:40 
GeneralRe: error C2051: case expression not constant Pin
Cuziyq7-Aug-07 8:44
Cuziyq7-Aug-07 8:44 
GeneralRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 8:53
Mark Salsbery7-Aug-07 8:53 
GeneralRe: error C2051: case expression not constant Pin
Cuziyq7-Aug-07 9:01
Cuziyq7-Aug-07 9:01 
GeneralRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 9:17
Mark Salsbery7-Aug-07 9:17 
GeneralRe: error C2051: case expression not constant Pin
led mike7-Aug-07 9:33
led mike7-Aug-07 9:33 
GeneralRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 9:37
Mark Salsbery7-Aug-07 9:37 
GeneralRe: error C2051: case expression not constant Pin
led mike7-Aug-07 10:16
led mike7-Aug-07 10:16 
AnswerRe: error C2051: case expression not constant Pin
David Crow7-Aug-07 8:48
David Crow7-Aug-07 8:48 
QuestionAfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4737-Aug-07 7:28
p_4737-Aug-07 7:28 
AnswerRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery7-Aug-07 7:55
Mark Salsbery7-Aug-07 7:55 
p_473 wrote:
using a CFrameWnd into my existing application, which, however, is an ATL
one

I only had to read that far. 

If you're going to use MFC classes then, except for a (very) few classes, you need to use an MFC application.

It is possible to get around this, but whether it's portable to future versions or not, I don't know.

Here's some of the issues:

1) Initialization.  The MFC library needs to be initialized.  The one-and-only CWinApp object is part of this.
You'll need that object even if you don't use its message pump.  You'll also need to call AfxInitialize() and/or
AfxWinInit().  From the AfxWinInit() docs:

"If you call AfxWinInit yourself, you should declare an instance of a CWinApp class. For a console application,
you might choose not to derive your own class from CWinApp and instead use an instance of CWinApp directly.
This technique is appropriate if you decide to leave all functionality for your application in your implementation of main.
"

2) Window messages.  If you're using a message loop outside of the MFC framework, then you need to pass all unhandled
messages to the MFC framework from your message loop.  You can do this by passing them to your CWinApp object's
PreTranslateMessage() method.

Hope this helps a bit.

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4738-Aug-07 6:37
p_4738-Aug-07 6:37 

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.