Original Post
I have been programming with the Win32 api for about a year now. I''d like to move on to MFC, and first learn to hand code it so I learn how it really works, and I can''t seem to find a tutorial that covers hand coding of MFC. I have a hand coded example that looks like this:
But what if I want to add buttons, or edit boxes or whatever to my windows? I''ve tried a few different things with the CButton class, but have yet to get it to work. Anyone know of a good place to look, because I can''t find anything.
#include <afxwin.h>
class CMyApp: public CWinApp
{
public:
virtual BOOL InitInstance(void);
};
class CMyWnd: public CFrameWnd
{
public:
CMyWnd()
{
Create(0, "Hello World, MFC");
}
};
BOOL CMyApp::InitInstance(void)
{
m_pMainWnd = new CMyWnd;
m_pMainWnd->ShowWindow(m_nCmdShow);
return TRUE;
}
CMyApp MyApp;