📄 ipmtestsuitdlg.cpp
字号:
// IPMTestSuitDlg.cpp : implementation file
//
#include "stdafx.h"
#include "IPMTestSuit.h"
#include "IPMTestSuitDlg.h"
#include "ipm_api.h"
#include "ipmioctl.h"
#include "ioctl_cfg.h"
#include "winioctl.h"
#include <Pkfuncs.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CIPMTestSuitDlg dialog
CIPMTestSuitDlg::CIPMTestSuitDlg(CWnd* pParent /*=NULL*/)
: CDialog(CIPMTestSuitDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CIPMTestSuitDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CIPMTestSuitDlg, CDialog)
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
ON_WM_SIZE()
#endif
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
// CIPMTestSuitDlg message handlers
BOOL CIPMTestSuitDlg::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
SetWindowText(IPM_APP_TITLE);
//this is important app will register first , since Driver will make sure dgb is suppotrted
//AfxMessageBox(_T("IPM Application is launched, Ver 1.0" ));
OutputDebugString(_T("IPM Application is launched, Ver 1.0" ));
IPM_STATUS_T ret = IPM_Register(APP_REG_NAME,&m_myId,INFINITE);
if ( ret!=IPM_STATUS_SUCCESS)
{
AfxMessageBox(_T("Unable to connect to IPM Driver" ));
OnOK();
}
else
{
IPM_NotifyReadyForProcState(m_myId,IPM_PROCESSOR_D0_RDY|IPM_PROCESSOR_D1_RDY,3000);
// InitClientList();
if ( IPM_DBG_RequestIPMInfo()!=IPM_STATUS_SUCCESS)
{
OutputDebugString(TEXT("[IPM APP] IPM_DBG_RequestIPMInfo Failed \r\n"));
}
}
return TRUE; // return TRUE unless you set the focus to a control
}
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
void CIPMTestSuitDlg::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
{
if (AfxIsDRAEnabled())
{
DRA::RelayoutDialog(
AfxGetResourceHandle(),
this->m_hWnd,
DRA::GetDisplayMode() != DRA::Portrait ?
MAKEINTRESOURCE(IDD_IPMTESTSUIT_DIALOG_WIDE) :
MAKEINTRESOURCE(IDD_IPMTESTSUIT_DIALOG));
}
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -