|
// TransparencyDialog.cpp : implementation file
//
#include "stdafx.h"
#include "TransparencyDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTransparencyDialog dialog
BEGIN_MESSAGE_MAP(CTransparencyDialog, CDialog)
//{{AFX_MSG_MAP(CTransparencyDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CTransparencyDialog::CTransparencyDialog(CWnd* pParent /*=NULL*/)
: CDialog(CTransparencyDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CTransparencyDialog)
m_nTransparency = 255;
m_nByteTransparency = 255;
//}}AFX_DATA_INIT
}
void CTransparencyDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTransparencyDialog)
DDX_Text(pDX, IDC_EDIT_TRANSPARENCY, m_nTransparency);
DDV_MinMaxInt(pDX, m_nTransparency, 30, 255);
//}}AFX_DATA_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CTransparencyDialog message handlers
BOOL CTransparencyDialog::OnInitDialog()
{
m_nTransparency = (int) m_nByteTransparency;
CDialog::OnInitDialog();
CSpinButtonCtrl* pSpin = (CSpinButtonCtrl*) GetDlgItem(IDC_SPIN_TRANSPARENCY);
ASSERT(pSpin);
pSpin->SetRange(30, 255);
CEdit* pEdit = (CEdit*) GetDlgItem(IDC_EDIT_TRANSPARENCY);
ASSERT(pEdit);
pEdit->LimitText(3);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CTransparencyDialog::OnOK()
{
UpdateData(TRUE);
m_nByteTransparency = (BYTE) m_nTransparency;
CDialog::OnOK();
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I attended St. Michael's College of the University of Toronto, with the intention of becoming a priest. A friend in the University's Computer Science Department got me interested in programming, and I have been hooked ever since.
Recently, I have moved to Los Angeles where I am doing consulting and development work.
For consulting and custom software development, please see
www.hdsoft.org.