⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.wzd

📁 本书通过85个实例全面讲述了应用MFC进行Visual C++编程的思想。每个实例均以编写一个应用程序要走的步骤编写。全书共分四部分进行介绍
💻 WZD
字号:
/////////////////////////////////////////////////////////////////////
// Example files...
/////////////////////////////////////////////////////////////////////

WzdStBar.cpp -- status class that supports other controls
WzdStBar.h

/////////////////////////////////////////////////////////////////////
// Edit String Table
/////////////////////////////////////////////////////////////////////

// 1) add ID's to string table that simply define spaces
// (this will become the width of your control
STRINGTABLE DISCARDABLE 
BEGIN
    ID_INDICATOR_WZDBUTTON  "                  "
    ID_INDICATOR_WZDPROGRESS "                                                "
END

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

// 1) substitute CWzdStatusBar for CStatusBar in MainFrm.h
protected:  // control bar embedded members
	CWzdStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;



// 2) add new id's to indicators in Mainfrm.cpp
static UINT indicators[] =
{
	ID_SEPARATOR,           // status line indicator
	ID_INDICATOR_WZDBUTTON,
	ID_INDICATOR_WZDPROGRESS,
	ID_INDICATOR_CAPS,
	ID_INDICATOR_NUM,
	ID_INDICATOR_SCRL,
};


// 3) to hide and show a control...
	m_wndStatusBar.GetButton().ShowWindow(SW_SHOW);

// 4) to increment a progress control...
	if ((m_nInc+=20)>=100) m_nInc=0;
	m_wndStatusBar.GetProgressCtrl().SetPos(m_nInc);


/////////////////////////////////////////////////////////////////////
// Process messages from these controls
/////////////////////////////////////////////////////////////////////
// button messages from the statusbar can be processed in the same 
// classes that a menu click can be
void CMainFrame::OnWzdButton() 
{
	// these commands keep a button control from being highlighted
	SetFocus();
	m_wndStatusBar.GetButton().SetButtonStyle(BS_PUSHBUTTON);

	// process command
	:	:	:
}


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

⌨️ 快捷键说明

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