ptypage.cpp

来自「SQLBig5BugTool 宽字符操作问题」· C++ 代码 · 共 95 行

CPP
95
字号
// PtyPage.cpp: implementation of the CPtyPage class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PtyPage.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

IMPLEMENT_DYNCREATE(CPtyPage, CPropertyPage)

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPtyPage::CPtyPage( ):CPropertyPage()
{
	m_lIndex=-1;
}

CPtyPage::CPtyPage( UINT nIDTemplate, UINT nIDCaptio ):CPropertyPage(nIDTemplate,nIDCaptio)
{
	m_lIndex=-1;
}

CPtyPage::CPtyPage( LPCTSTR lpszTemplateName, UINT nIDCaption )
:CPropertyPage(lpszTemplateName,nIDCaption)
{
	m_lIndex=-1;
}


CPtyPage::~CPtyPage()
{

}

BOOL CPtyPage::OnSetActive() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CPropertyPage::OnSetActive();
}

const char* CPtyPage::GetPageTitleFull()
{
	return m_strPageTitleFull;
};

void CPtyPage::SetPageIndex(const long lIndex)
{
	m_lIndex=lIndex;

	UpdatePageTitleFull();
}

void CPtyPage::UpdatePageTitleFull()
{
	if(m_strPageTitleBase.IsEmpty())
	{
		return ;
	}
	if(m_lIndex<0)
	{
		m_strPageTitleFull=m_strPageTitleBase;
	}
	else
	{
		m_strPageTitleFull.Format(
			"%02d : %s",
			m_lIndex+1,
			m_strPageTitleBase
			);
	}
	m_psp.pszTitle=m_strPageTitleFull; 
	m_psp.dwFlags|=PSP_USETITLE; 
}

void CPtyPage::SetTitle(CString strPageTitle)
{
	m_strPageTitleFull=strPageTitle;

	m_psp.pszTitle=m_strPageTitleFull; 

	m_psp.dwFlags|=PSP_USETITLE; 
}

void CPtyPage::SetPageTitleBase(CString strPageTitleBase)
{
	m_strPageTitleBase=strPageTitleBase;
}

⌨️ 快捷键说明

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