AfxMessageBox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paid The Umpire

    #1

    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\sketch er\sketcher\ske tcher.cpp(62) : error
    C3861: 'AfxMessageBox' : identifier not found

    ----CODE----
    CWinApp::InitIn stance();

    // Initialize OLE libraries
    if (!AfxOleInit())
    {
    AfxMessageBox(I DP_OLE_INIT_FAI LED);
    return FALSE;
    }
    AfxEnableContro lContainer();

  • Stuart Redmann

    #2
    [OT]Re: AfxMessageBox

    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.publi c.vc.language or
    microsoft.publi c.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\sketch er\sketcher\ske tcher.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

    Comment

    Working...