468,512 Members | 1,046 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

AfxMessageBox

Hi,

I'm trying to get a basic MDI program working.
I create the template through Microsoft Visual Studio 2005, and then
before changing any code i run the program. But it doesn't actually run
it has a AfxMessageBox error.

I've tried the MSDN and other forums but no one has been able to help
me any ideas?

Here is the code that is bugging up:
----ERROR----
1>c:\documents and settings\sketcher\sketcher\sketcher.cpp(62) : error
C3861: 'AfxMessageBox': identifier not found

----CODE----
CWinApp::InitInstance();

// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
AfxEnableControlContainer();

Sep 11 '06 #1
1 11727
Paid The Umpire wrote:
Hi,

I'm trying to get a basic MDI program working.
I create the template through Microsoft Visual Studio 2005, and then
before changing any code i run the program. But it doesn't actually run
it has a AfxMessageBox error.
What is an AfxMessageBox error? We know of compiler errors or linker
errors, but I've never seen an AfxMessageBox error.
I've tried the MSDN and other forums but no one has been able to help
me any ideas?
What about microsoft.public.vc.language or
microsoft.public.vc.mfc? I found your posting in neither of these (where
they belong).
Here is the code that is bugging up:
----ERROR----
1>c:\documents and settings\sketcher\sketcher\sketcher.cpp(62) : error
C3861: 'AfxMessageBox': identifier not found
[I know I'm being off-topic, but I think I rebuked the poster proper and
good enough above] Well, you have to include the header that defines
AfxMessageBox. For me this is afxwin.h, but I'm using VC6.0, so this
header may be different under VC7.1.

I feel sympathise with you in respect of the fact that code generated
from some wizard seems to be not in a condition as to compile properly.
That's Microsoft for you.

Regards,
Stuart
Sep 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Brendan Grant | last post: by
reply views Thread by Patrice de Boisgrollier | last post: by
1 post views Thread by Wayne... | last post: by
2 posts views Thread by jlea | last post: by
7 posts views Thread by John | last post: by
1 post views Thread by raj.rr7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.