readme.wzd

来自「《Visual C++ MFC编程实例》配套代码」· WZD 代码 · 共 39 行

WZD
39
字号
/////////////////////////////////////////////////////////////////////
// Example files...
/////////////////////////////////////////////////////////////////////

WzdTlBar.cpp -- toolbar class that supports non-button controls
WzdTlBar.h

/////////////////////////////////////////////////////////////////////
// Modify Mainframe Class
/////////////////////////////////////////////////////////////////////

// 1) declare new toolbar class in Mainfrm.h
//  (change CToolBar to CWzdToolBar)
	CWzdToolBar    m_wndToolBar;


// 2) in Mainfrm.cpp's OnCreate(), change LoadToolBar() to LoadToolBarEx()
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	if (!m_wndToolBar.Create(this) ||
		!m_wndToolBar.LoadToolBarEx(IDR_MAINFRAME))
	{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
	}

// 3) use Toolbar Editor to add a button where you want combobox to appear
//  and give it the id: IDC_WZD_COMBO


/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1998 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?