Thread overview
afxwin.h
Oct 13, 2002
James Kirkham
Oct 13, 2002
bw
Oct 13, 2002
Walter
Oct 13, 2002
James Kirkham
Oct 13, 2002
Jan Knepper
Oct 13, 2002
James Kirkham
Oct 13, 2002
Jan Knepper
October 13, 2002
The code below will not compile as the .h file afxwin is not included with the dm compiler.  Does the compiler come with an alternative or is there a workaround?  As you can see its a simple app I am trying to learb MFC. Thanks.


#include <afxwin.h>

#ifdef MINIMAL

// Stub out non-critical CRT initialization functions
extern "C" void _setenvp() { }
extern "C" void _setargv() { }

// Define a window class derived from CWnd
class CHelloWindow : public CWnd
{
public:
    CHelloWindow()
    {
        CreateEx(WS_EX_CLIENTEDGE,
            AfxRegisterWndClass(0, ::LoadCursor(NULL, IDC_ARROW),
(HBRUSH)(COLOR_WINDOW+1)),
            _T("Hello World!"), WS_OVERLAPPEDWINDOW,
            CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, 0);
    }
};

#else

// Define a window class derived from CFrameWnd
class CHelloWindow : public CFrameWnd
{
public:
    CHelloWindow()
        { Create(NULL, _T("Hello World!"), WS_OVERLAPPEDWINDOW,
rectDefault); }
};

#endif

// Define an application class derived from CWinApp
class CHelloApp : public CWinApp
{
public:
    virtual BOOL InitInstance()
    {
        m_pMainWnd = new CHelloWindow();
        m_pMainWnd->ShowWindow(m_nCmdShow);
        m_pMainWnd->UpdateWindow();
        return TRUE;
    }
};

CHelloApp HelloApp;  // HelloApp's constructor initializes and runs the app


October 13, 2002
In article <aoag24$2avt$1@digitaldaemon.com>, James Kirkham says...
>
>The code below will not compile as the .h file afxwin is not included with the dm compiler.

you're gonna have to download the mfc and atl files at the bottom of the page where you got the compiler.. the zip didn't work for me, but the separate atl and mfc files did, there's an mfc lib already built in there.  you need a tar and gzip tools to get in the archives.

check the mfc forum too for some more information, i just went thru the installation and it's kinda frustrating at times but good results!!

that code you posted compiled and ran fine over here.

L8r,
bw


October 13, 2002
"James Kirkham" <JamesKirkham1@hotmail.com> wrote in message news:aoag24$2avt$1@digitaldaemon.com...
> The code below will not compile as the .h file afxwin is not included with the dm compiler.  Does the compiler come with an alternative or is there a workaround?  As you can see its a simple app I am trying to learb MFC. Thanks.
>
>
> #include <afxwin.h>

afxwin.h comes on the Digital Mars CD at www.digitalmars.com/shop.html

-Walter


October 13, 2002
I have downloaded the 2 files but there appears to be no info on how to install them.  Do I just extract them to the dm include folder using the path names provided? Thanks

"Walter" <walter@digitalmars.com> wrote in message news:aob59r$2uok$1@digitaldaemon.com...
>
> "James Kirkham" <JamesKirkham1@hotmail.com> wrote in message news:aoag24$2avt$1@digitaldaemon.com...
> > The code below will not compile as the .h file afxwin is not included
with
> > the dm compiler.  Does the compiler come with an alternative or is there
a
> > workaround?  As you can see its a simple app I am trying to learb MFC. Thanks.
> >
> >
> > #include <afxwin.h>
>
> afxwin.h comes on the Digital Mars CD at www.digitalmars.com/shop.html
>
> -Walter
>
>


October 13, 2002
See attached!
Thanks!
Jan



James Kirkham wrote:

> I have downloaded the 2 files but there appears to be no info on how to install them.  Do I just extract them to the dm include folder using the path names provided? Thanks
>
> "Walter" <walter@digitalmars.com> wrote in message news:aob59r$2uok$1@digitaldaemon.com...
> >
> > "James Kirkham" <JamesKirkham1@hotmail.com> wrote in message news:aoag24$2avt$1@digitaldaemon.com...
> > > The code below will not compile as the .h file afxwin is not included
> with
> > > the dm compiler.  Does the compiler come with an alternative or is there
> a
> > > workaround?  As you can see its a simple app I am trying to learb MFC. Thanks.
> > >
> > >
> > > #include <afxwin.h>
> >
> > afxwin.h comes on the Digital Mars CD at www.digitalmars.com/shop.html
> >
> > -Walter
> >
> >


October 13, 2002
Was there meant to be something useful in the attachment? You seem to have just attached my original post.

"Jan Knepper" <jan@smartsoft.us> wrote in message news:3DA9AEBA.74C0A601@smartsoft.us...
> See attached!
> Thanks!
> Jan
>
>
>
> James Kirkham wrote:
>
> > I have downloaded the 2 files but there appears to be no info on how to install them.  Do I just extract them to the dm include folder using the path names provided? Thanks
> >
> > "Walter" <walter@digitalmars.com> wrote in message news:aob59r$2uok$1@digitaldaemon.com...
> > >
> > > "James Kirkham" <JamesKirkham1@hotmail.com> wrote in message news:aoag24$2avt$1@digitaldaemon.com...
> > > > The code below will not compile as the .h file afxwin is not
included
> > with
> > > > the dm compiler.  Does the compiler come with an alternative or is
there
> > a
> > > > workaround?  As you can see its a simple app I am trying to learb
MFC.
> > > > Thanks.
> > > >
> > > >
> > > > #include <afxwin.h>
> > >
> > > afxwin.h comes on the Digital Mars CD at www.digitalmars.com/shop.html
> > >
> > > -Walter
> > >
> > >
>


October 13, 2002
Well, basically news://news.digitalmars.com/c++.mfc is the place for this.
Check older messages and you might get the answers.
Jan



James Kirkham wrote:

> Was there meant to be something useful in the attachment? You seem to have just attached my original post.