// backlightDlg.cpp : implementation file
//
#include "stdafx.h"
#include "backlight.h"
#include "backlightDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CbacklightDlg dialog
CbacklightDlg::CbacklightDlg(CWnd* pParent /*=NULL*/)
: CDialog(CbacklightDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CbacklightDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_SLIDER1, m_slider);
DDX_Control(pDX, IDC_EDIT1, m_edit);
}
BEGIN_MESSAGE_MAP(CbacklightDlg, CDialog)
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
ON_WM_SIZE()
#endif
//}}AFX_MSG_MAP
ON_WM_HSCROLL()
END_MESSAGE_MAP()
// CbacklightDlg message handlers
BOOL CbacklightDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_slider.SetRange(0,30,TRUE);
m_slider.SetPos(16);
m_edit.SetWindowTextW(_T("16"));
return TRUE; // return TRUE unless you set the focus to a control
}
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
void CbacklightDlg::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
{
if (AfxIsDRAEnabled())
{
DRA::RelayoutDialog(
AfxGetResourceHandle(),
this->m_hWnd,
DRA::GetDisplayMode() != DRA::Portrait ?
MAKEINTRESOURCE(IDD_BACKLIGHT_DIALOG_WIDE) :
MAKEINTRESOURCE(IDD_BACKLIGHT_DIALOG));
}
}
#endif
void CbacklightDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: Add your