1.将菜单栏归零,工具栏放在窗口低部,加载自己新建的工具栏
CMainFrame::OnCreate()函数中 this->SetMenu(0);
2.将窗口初始化为最大化
APP类中:m_pMainWnd->ShowWindow(SW_MAXIMIZE);
3.去掉边框
CMainFrame::PreCreateWindow()函数中 cs.style = WS_POPUP;
4.在FRAME类中添加工具栏命令消息,关闭
通过ON_COMMAND(ToolBar下的图片ID,实现的函数) this->PostMessage(WM_CLOSE);
5.在VIEW类中添加系统消息keydown
void CDRAWView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if(nChar == VK_ESCAPE)
{
AfxGetMainWnd()->PostMessage(WM_CLOSE);
}
CView::OnKeyDown(nChar, nRepCnt, nFlags);
}