当前位置:网站首页>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;
}
边栏推荐
- PointNeXt:通过改进的模型训练和缩放策略审视PointNet++
- Educational Codeforces Round 22 E. Army Creation
- Explicit random number
- C语言-入门-基础-语法-流程控制(七)
- Stream stream
- Swagger突然发癫
- Pointnet/Pointnet++点云数据集处理并训练
- 双冒号作用运算符以及命名空间详解
- Lenovo explains in detail the green smart city digital twin platform for the first time to solve the difficulties of urban dual carbon upgrading
- QT realizes interface sliding switching effect
猜你喜欢

TCP waves twice, have you seen it? What about four handshakes?

BCG 使用之CBCGPTabWnd控件(相当于MFC TabControl)

FPGA timing constraint sharing 01_ Brief description of the four steps

【问题】druid报异常sql injection violation, part alway true condition not allow 解决方案

一文掌握数仓中auto analyze的使用

水晶光电:长安深蓝SL03的AR-HUD产品由公司供应

如何使用Async-Awati异步任務處理代替BackgroundWorker?

Pointnet/Pointnet++点云数据集处理并训练

实战模拟│JWT 登录认证

The explain statement in MySQL queries whether SQL is indexed, and several types in extra collate and summarize
随机推荐
Shell 编程核心技术《三》
Oracle with as ORA-00903: invalid table name 多表报错
偏移量函数及开窗函数
1005 spell it right (20 points) (pat a)
Pytorch学习(四)
@Data source connection pool exhaustion caused by transactional abuse
如何使用Async-Awati异步任務處理代替BackgroundWorker?
YOLOv5s-ShuffleNetV2
1003 Emergency(25 分)(PAT甲级)
@transactional滥用导致数据源连接池耗尽问题
双冒号作用运算符以及命名空间详解
1002. A+b for Polynomials (25) (PAT class a)
Educational codeforces round 22 E. Army Creation
Euler function
C # use stopwatch to measure the running time of the program
How test engineers "attack the city" (Part 2)
PointNeXt:通过改进的模型训练和缩放策略审视PointNet++
函数式接口
Utilisation de la barre de progression cbcggprogressdlgctrl utilisée par BCG
Niuke Xiaobai month race 7 who is the divine Archer