当前位置:网站首页>New wizard effect used by BCG
New wizard effect used by BCG
2022-07-04 19:42:00 【Spring buds and summer lotus_ seven hundred and twenty-eight mi】
The effect is as follows :
Go straight to source :
1、 Modify program entry :
BOOL CToolBarSampleApp::InitInstance()
{
InitCommonControls();
CBCGPWinApp::InitInstance();
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
AfxEnableControlContainer();
CBCGControlsPropSheet propSheet;
m_pMainWnd = &propSheet;
propSheet.DoModal();
return FALSE;
}
2、 Create a class BCGControlsPropSheet Used to load various pages :
(1)BCGControlsPropSheet.h
#pragma once
#include "Page1.h"
class CBCGControlsPropSheet : public CBCGPPropertySheet
{
DECLARE_DYNAMIC(CBCGControlsPropSheet)
public:
CBCGControlsPropSheet(CWnd* pParentWnd = NULL);
public:
CPage1 m_Page1;
HICON m_hIcon;
public:
public:
virtual BOOL OnInitDialog();
public:
virtual ~CBCGControlsPropSheet();
protected:
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
(2)BCGControlsPropSheet.cpp
#include "stdafx.h"
#include "BCGControlsPropSheet.h"
#include "Resource.h"
IMPLEMENT_DYNAMIC(CBCGControlsPropSheet, CBCGPPropertySheet)
CBCGControlsPropSheet::CBCGControlsPropSheet(CWnd* pParentWnd)
:CBCGPPropertySheet (IDS_CAPTION, pParentWnd)
{
SetLook(CBCGPPropertySheet::PropSheetLook_Tabs, globalUtils.ScaleByDPI(100));// Here, modify the first parameter to display different effects
SetIconsList (IDB_ICONS32, 32, RGB(255, 0, 255), TRUE);
AddPage(&m_Page1);
EnableVisualManagerStyle(TRUE, TRUE);
EnableDragClientArea();
}
CBCGControlsPropSheet::~CBCGControlsPropSheet()
{
}
BEGIN_MESSAGE_MAP(CBCGControlsPropSheet, CBCGPPropertySheet)
ON_WM_QUERYDRAGICON()
ON_WM_SYSCOMMAND()
END_MESSAGE_MAP()
BOOL CBCGControlsPropSheet::OnInitDialog()
{
BOOL bResult = CBCGPPropertySheet::OnInitDialog();
return bResult;
}
HCURSOR CBCGControlsPropSheet::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CBCGControlsPropSheet::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
BCGPShowAboutDlg (AFX_IDS_APP_TITLE);
}
else
{
CBCGPPropertySheet::OnSysCommand(nID, lParam);
}
}
3、 Create each page page
(1)Page1.h
#pragma once
#include "Resource.h"
class CPage1 : public CBCGPPropertyPage
{
DECLARE_DYNCREATE(CPage1)
public:
CPage1();
~CPage1();
enum { IDD = IDD_TOOLBARSAMPLE_DIALOG };
public:
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
protected:
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
CMenu m_menu;
BOOL m_bItem4Checked;
};
(2)Page1.cpp
#include "stdafx.h"
#include "Page1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
IMPLEMENT_DYNCREATE(CPage1, CBCGPPropertyPage)
CPage1::CPage1() : CBCGPPropertyPage(CPage1::IDD)
{
}
CPage1::~CPage1()
{
}
void CPage1::DoDataExchange(CDataExchange* pDX)
{
CBCGPPropertyPage::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CPage1, CBCGPPropertyPage)
END_MESSAGE_MAP()
BOOL CPage1::OnInitDialog()
{
CBCGPPropertyPage::OnInitDialog();
return TRUE;
}
边栏推荐
- Online data migration scheme encountered in the project 1 - general idea sorting and technical sorting
- 92. (cesium chapter) cesium building layering
- 如何使用Async-Awati异步任務處理代替BackgroundWorker?
- kotlin 条件控制
- HMM隐马尔可夫模型最详细讲解与代码实现
- BCG 使用之CBCGPProgressDlgCtrl进度条使用
- HDU 1097 A hard puzzle
- 勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
- Shell programming core technology "I"
- kotlin 基本使用
猜你喜欢
What should we pay attention to when doing social media marketing? Here is the success secret of shopline sellers!
Pythagorean number law (any three numbers can meet the conditions of Pythagorean theorem)
多表操作-外连接查询
MySQL数据库基本操作-DDL | 黑马程序员
Multi table operation - external connection query
在线SQL转Excel(xls/xlsx)工具
Chrome开发工具:VMxxx文件是什么鬼
牛客小白月赛7 谁是神箭手
SSRS筛选器的IN运算(即包含于)用法
记一次 .NET 某工控数据采集平台 线程数 爆高分析
随机推荐
The page element is vertically and horizontally centered, realizing the vertical and horizontal centering of known or unknown width.
线上数据库迁移的几种方法
1003 emergency (25 points) (PAT class a)
牛客小白月赛7 I 新建 Microsoft Office Word 文档
Cbcgpprogressdlgctrl progress bar used by BCG
Find the nth power of 2
公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
node_ Exporter deployment
HDU 1097 A hard puzzle
92. (cesium chapter) cesium building layering
1011 World Cup betting (20 points) (pat a)
Comment utiliser async awati asynchrone Task Handling au lieu de backgroundworker?
1011 World Cup Betting (20 分)(PAT甲级)
《工作、消费主义和新穷人》的微信读书笔记
Shell 编程核心技术《四》
西门子HMI下载时提示缺少面板映像解决方案
Stream stream
There are multiple divs in the large div, which are displayed on the same line. After overflow, scroll bars are generated without line breaks
kotlin 基本数据类型
数据集划分