Hello
i try to create a simple toolbar with a mfc but the compiler can't find the class CToolbar:
What's wrong?Code:#include <afxwin.h>
#include "resource.h"
class CResApp : public CWinApp
{
public:
BOOL InitInstance();
};
class TB: public CMFCToolBar;
class CResFrame : public CFrameWnd
{
public:
CResFrame()
{
Create(NULL, TEXT("Resources Fundamentals"));
}
};
BOOL CResApp::InitInstance()
{
m_pMainWnd = new CResFrame;
TB a;
a.Create(&m_pMainWnd);
m_pMainWnd->SetMenu(&hMenu);
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
class TB: public CMFCToolBar{
public:
TB(CResFrame *CRF){
Create(CRF,CBRS_TOP,IDR_TOOLBAR1);
}
}
CResApp theApp;