oleshowpage.cpp
来自「《VC++ 编程技巧与示例 .rar》各个示例代码绝对可用」· C++ 代码 · 共 86 行
CPP
86 行
// OleShowPage.cpp : implementation file
//
#include "stdafx.h"
#include "GamblerCtrl.h"
#include "OleShowPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COleShowPage dialog
IMPLEMENT_DYNCREATE(COleShowPage, COlePropertyPage)
/////////////////////////////////////////////////////////////////////////////
// Message map
BEGIN_MESSAGE_MAP(COleShowPage, COlePropertyPage)
//{{AFX_MSG_MAP(COleShowPage)
// NOTE - ClassWizard will add and remove message map entries
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Initialize class factory and guid
// {43B7BA49-B0C0-11D3-9460-0000000038B2}
IMPLEMENT_OLECREATE_EX(COleShowPage, "GamblerCtrl.COleShowPage",
0x43b7ba49, 0xb0c0, 0x11d3, 0x94, 0x60, 0x0, 0x0, 0x0, 0x0, 0x38, 0xb2)
/////////////////////////////////////////////////////////////////////////////
// COleShowPage::COleShowPageFactory::UpdateRegistry -
// Adds or removes system registry entries for COleShowPage
BOOL COleShowPage::COleShowPageFactory::UpdateRegistry(BOOL bRegister)
{
// TODO: Define string resource for page type; replace '0' below with ID.
if (bRegister)
return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
m_clsid, IDS_SHOW_PPG);//最后一项原来为0;
else
return AfxOleUnregisterClass(m_clsid, NULL);
}
/////////////////////////////////////////////////////////////////////////////
// COleShowPage::COleShowPage - Constructor
// TODO: Define string resource for page caption; replace '0' below with ID.
COleShowPage::COleShowPage() :
COlePropertyPage(IDD,IDS_SHOW_PPG_CAPTION)//第二项原来为0;
{
//{{AFX_DATA_INIT(COleShowPage)
m_Show = _T("猜一猜");
//}}AFX_DATA_INIT
}
/////////////////////////////////////////////////////////////////////////////
// COleShowPage::DoDataExchange - Moves data between page and properties
void COleShowPage::DoDataExchange(CDataExchange* pDX)
{
// NOTE: ClassWizard will add DDP, DDX, and DDV calls here
// DO NOT EDIT what you see in these blocks of generated code !
//{{AFX_DATA_MAP(COleShowPage)
DDP_Text(pDX, IDC_SHOW, m_Show, _T("ShowString") );
DDX_Text(pDX, IDC_SHOW, m_Show);
DDV_MaxChars(pDX, m_Show, 24);
//}}AFX_DATA_MAP
DDP_PostProcessing(pDX);
}
/////////////////////////////////////////////////////////////////////////////
// COleShowPage message handlers
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?