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

📄 exampledlg.cpp

📁 动态鼠标
💻 CPP
字号:
// ExampleDlg.cpp : implementation file
//

#include "stdafx.h"
#include "KSComDlg.h"
#include "ExampleDlg.h"

//#include "KSComDlgDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CExampleDlg dialog
CKSComDlgDlg *ksComDlgDlg;


CExampleDlg::CExampleDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CExampleDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CExampleDlg)
	//}}AFX_DATA_INIT
	m_hIcon1  =  AfxGetApp()->LoadIcon(IDI_ICON3);//IDR_MAINFRAME
}


void CExampleDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CExampleDlg)
	DDX_Control(pDX, IDOK, m_ProExit);
	DDX_Control(pDX, IDC_KSCOMMCTRL, m_CommCtl);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CExampleDlg, CDialog)
	//{{AFX_MSG_MAP(CExampleDlg)
	ON_WM_CLOSE()
	ON_BN_CLICKED(IDOK, OnExitExample)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CExampleDlg message handlers

//InitInstance

BOOL CExampleDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	m_Prosheet.AddPage(&setCommPage);
	m_Prosheet.AddPage(&appCommPage);
	m_Prosheet.AddPage(&help_VerPage);
    m_Prosheet.Create(this, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT);
    //RECT rect;
    
	CRect rect;
	GetWindowRect(rect);
	ScreenToClient(rect );
	int width = rect.right - rect.left;
	int height = rect.bottom - rect.top;

	m_Prosheet.SetWindowPos (NULL, 0, 0, width,height - 70, SWP_NOZORDER | SWP_NOACTIVATE);
		           
	//----------------------------------------------------------------
	HICON	hIcon1 = AfxGetApp()->LoadIcon(IDI_ICON5);
    HICON	hIcon2 = AfxGetApp()->LoadIcon(IDI_ICON6);

	HCURSOR hHand = AfxGetApp()->LoadCursor(IDC_CURSOR1);
    
	m_ProExit.m_hCursor  =  hHand;
	m_ProExit.m_hIcon_Active  =  hIcon1;
	m_ProExit.m_hIcon_Enable = hIcon2;
	m_ProExit.m_IconSize = CSize(32,32);

	//----------------------------------------------------------------
	for(int i = 0;i < 3;i++)
        m_Prosheet.SetActivePage(i);
	//----------------------------------------------------------------
	CString str;
	int nLength;
    str = m_CommCtl.GetVersionInfo(); //GetVersionInfo
    nLength = str.GetLength();
    
	LPSTR lpFrame = (LPSTR)LocalAlloc(LPTR, nLength + 1);
	if (NULL == lpFrame)// Out of memory
        return FALSE;
	MoveMemory(lpFrame, str, nLength);
	lpFrame[nLength] = 0x00;       // 0
	::SendMessage(help_VerPage.m_hWnd,WM_HELP_VERVIEW, 
		WPARAM(nLength), LPARAM(lpFrame));
    
    SetIcon(m_hIcon1, TRUE);	    // Set big icon
	SetIcon(m_hIcon1, FALSE);		// Set small icon
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}



void CExampleDlg::OnClose() 
{
	CDialog::OnOK();
	
	AfxGetApp()->m_pMainWnd = ksComDlgDlg;
    ::ShowWindow(this->m_hWnd,SW_SHOW);
}

void CExampleDlg::PostNcDestroy() 
{
	delete this;
	CDialog::PostNcDestroy();
}


BOOL CExampleDlg::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	
	return CDialog::OnCommand(wParam, lParam);
}


void CExampleDlg::OnExitExample() 
{
	OnClose();
}

⌨️ 快捷键说明

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