//PMBApp.h
#ifndef _PMBAPP_H
#define _PMBAPP_H
#include <afxwin.h>
class PMBApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
#endif //_PMBAPP_H
/*******************************************/
//PMBApp.cpp
#include \"PMBApp.h\"
#include \"PMBMainFrame.h\"
#include \"resource.h\"
PMBApp app;
BOOL PMBApp::InitInstance()
{
CMDIFrameWnd* pWnd = new PMBMainFrame;
pWnd->Create(NULL, \"PERSONAL MULTI BOARD\", WS_OVERLAPPEDWINDOW, CRect(0,0,800,640), NULL, MAKEINTRESOURCE(IDR_MENU));
pWnd->ShowWindow(m_nCmdShow);
pWnd->UpdateWindow();
this->m_pMainWnd = pWnd;
return TRUE;
}
/*******************************************/
//PMBMainFrame.h
#ifndef _PMBMAINFRAME_H
#define _PMBMAINFRAME_H
#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>
#include <afxdtctl.h>
class PMBMainFrame : public CMDIFrameWnd
{
public:
PMBMainFrame();
~PMBMainFrame();
public:
CToolBar toolBar;
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
};
#endif //_PMBMAINFRAME_H
/*******************************************/
//PMBMainFrame.cpp
#include \"PMBApp.h\"
#include \"PMBMainFrame.h\"
#include \"resource.h\"
BEGIN_MESSAGE_MAP(PMBMainFrame, CMDIFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
PMBMainFrame::PMBMainFrame()
{
}
PMBMainFrame::~PMBMainFrame()
{
}
int PMBMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
CMDIFrameWnd::OnCreate(lpCreateStruct);
this->toolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_GRIPPER|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC);
this->toolBar.LoadToolBar(IDR_TOOLBAR);
return 0;
}
/****************************************************/
이거 도데체 왜 안돼는거야.. CFrameWnd로 하면 잘 되거든??
근데 CMDIFrameWnd로 하면 안돼..
왜 이려..밑에 프로젝트 통째로 올려줄께 한번 봐주라
댓글 0