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

📄 optionset.cpp

📁 这是一个用VC++编写的FLSHPLAYER
💻 CPP
字号:
// OptionSet.cpp : implementation file
//

#include "stdafx.h"
#include "FlashPlay.h"
#include "OptionSet.h"

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

/////////////////////////////////////////////////////////////////////////////
// COptionSet dialog


COptionSet::COptionSet(CWnd* pParent /*=NULL*/)
	: CDialog(COptionSet::IDD, pParent)
{
	//{{AFX_DATA_INIT(COptionSet)
	m_bFileType = FALSE;
	m_bHideMouse = FALSE;
	m_bPopupMenu = FALSE;
	m_nEditHideTime = 0;
	m_bOnTop = FALSE;
	//}}AFX_DATA_INIT
}


void COptionSet::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(COptionSet)
	DDX_Check(pDX, IDC_FILETYPE, m_bFileType);
	DDX_Check(pDX, IDC_HIDEMOUSE, m_bHideMouse);
	DDX_Check(pDX, IDC_POPUPMENU, m_bPopupMenu);
	DDX_Text(pDX, IDC_EDITHIDETIME, m_nEditHideTime);
	DDV_MinMaxUInt(pDX, m_nEditHideTime, 0, 20);
	DDX_Check(pDX, IDC_ONTOP, m_bOnTop);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(COptionSet, CDialog)
	//{{AFX_MSG_MAP(COptionSet)
	ON_WM_SHOWWINDOW()
	ON_WM_VSCROLL()
	ON_BN_CLICKED(IDC_HIDEMOUSE, OnHideMouse)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// COptionSet message handlers



void COptionSet::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
    /*
	// TODO: Add your message handler code here
	CSpinButtonCtrl* pWnd = ((CSpinButtonCtrl*)GetDlgItem(IDC_SPINHIDETIME));
	pWnd->SetRange(0,20);
    pWnd->SetBuddy( (CEdit*)GetDlgItem(IDC_EDITHIDETIME) );
    CRect rect;
    pWnd->GetWindowRect(&rect);
    ScreenToClient(&rect);
    rect.left -= 8; rect.right -= 8;
    pWnd->MoveWindow(&rect);
    //*/
}

void COptionSet::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{
	// TODO: Add your message handler code here and/or call default
	CSpinButtonCtrl* pwndSpin = (CSpinButtonCtrl*) pScrollBar;
	
	CDialog::OnVScroll(nSBCode, nPos, pScrollBar);
}

BOOL COptionSet::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
    CSpinButtonCtrl *pSpin;
    pSpin = ((CSpinButtonCtrl *) GetDlgItem(IDC_SPINHIDETIME));
	pSpin->SetRange(0,20);
    
    CString strTmp;
	strTmp.Format("%d",5);
	//((CEdit*) GetDlgItem(IDC_EDITHIDETIME))->SetWindowText(strTmp);    

    ((CEdit*) GetDlgItem(IDC_EDITHIDETIME))->EnableWindow(
        ((CButton*) GetDlgItem(IDC_HIDEMOUSE))->GetCheck() );	
    
    return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void COptionSet::OnHideMouse()
{
	// TODO: Add your control notification handler code here
	//(CButton*) GetDlgItem(IDC_HIDEMOUSE)
    // enable hide the mouse pointer ;
    BOOL bButton = ((CButton*) GetDlgItem(IDC_HIDEMOUSE))->GetCheck();
    GetDlgItem(IDC_EDITHIDETIME)->EnableWindow(bButton);
    GetDlgItem(IDC_SPINHIDETIME)->EnableWindow(bButton);
}


⌨️ 快捷键说明

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