// DIPDlg.cpp : implementation file // #include "stdafx.h" #include "DIP.h" #include "DIPDlg.h" #include "PACSDK.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CDIPDlg dialog CDIPDlg::CDIPDlg(CWnd* pParent /*=NULL*/) : CDialog(CDIPDlg::IDD, pParent) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CDIPDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CDIPDlg, CDialog) #if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP) ON_WM_SIZE() #endif //}}AFX_MSG_MAP ON_BN_CLICKED(IDC_BUTTON2, &CDIPDlg::OnBnClickedButton2) END_MESSAGE_MAP() // CDIPDlg message handlers BOOL CDIPDlg::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 return TRUE; // return TRUE unless you set the focus to a control } #if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP) void CDIPDlg::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { if (AfxIsDRAEnabled()) { DRA::RelayoutDialog( AfxGetResourceHandle(), this->m_hWnd, DRA::GetDisplayMode() != DRA::Portrait ? MAKEINTRESOURCE(IDD_DIP_DIALOG_WIDE) : MAKEINTRESOURCE(IDD_DIP_DIALOG)); } } #endif void CDIPDlg::OnBnClickedButton2() { // TODO: Add your control notification handler code here TCHAR temp[30]; //get dip value and show on TextBox int DIPValue = pac_GetDIPSwitch(); wsprintf(temp,L"0x%lx",DIPValue); SetDlgItemText(IDC_EDIT1,temp); }