|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - afxwin.h
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
Oct 12 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. Oct 12 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> Oct 12 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 Oct 13 2002
Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Oct 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 Oct 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. Oct 13 2002
|