// [!output DIALOG_IMPL] : 實作檔 // #include "stdafx.h" #include "[!output APP_HEADER]" #include "[!output DIALOG_HEADER]" #ifdef _DEBUG #define new DEBUG_NEW #endif // [!output DIALOG_CLASS] 對話方塊 [!output DIALOG_CLASS]::[!output DIALOG_CLASS](CWnd* pParent /*=NULL*/) : [!output DIALOG_BASE_CLASS]([!output DIALOG_CLASS]::IDD, pParent) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void [!output DIALOG_CLASS]::DoDataExchange(CDataExchange* pDX) { [!output DIALOG_BASE_CLASS]::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP([!output DIALOG_CLASS], [!output DIALOG_BASE_CLASS]) #if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP) ON_WM_SIZE() #endif [!if HELPSTYLE_WINHELP] ON_WM_HELPINFO() [!endif] //}}AFX_MSG_MAP END_MESSAGE_MAP() // [!output DIALOG_CLASS] 訊息處理常式 BOOL [!output DIALOG_CLASS]::OnInitDialog() { [!output DIALOG_BASE_CLASS]::OnInitDialog(); // 設定此對話方塊的圖示。當應用程式的主視窗不是對話方塊時, // 框架會自動從事此作業 SetIcon(m_hIcon, TRUE); // 設定大圖示 SetIcon(m_hIcon, FALSE); // 設定小圖示 [!if !MULTIPLE_PLATFORM] [!if SMARTPHONE2003_UI_MODEL] if (!m_dlgCommandBar.Create(this) || !m_dlgCommandBar.InsertMenuBar(IDR_MAINFRAME)) { TRACE0("無法建立 CommandBar\n"); return FALSE; // 無法建立 } [!endif] [!else] [!if SMARTPHONE2003_UI_MODEL] #ifdef WIN32_PLATFORM_WFSP if (!m_dlgCommandBar.Create(this) || !m_dlgCommandBar.InsertMenuBar(IDR_MAINFRAME)) { TRACE0("無法建立 CommandBar\n"); return FALSE; // 無法建立 } #endif // WIN32_PLATFORM_WFSP [!endif] [!endif] // TODO: 在此加入額外的初始設定 return TRUE; // 傳回 TRUE,除非您對控制項設定焦點 } #if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP) void [!output DIALOG_CLASS]::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { if (AfxIsDRAEnabled()) { DRA::RelayoutDialog( AfxGetResourceHandle(), this->m_hWnd, DRA::GetDisplayMode() != DRA::Portrait ? MAKEINTRESOURCE(IDD_[!output UPPER_CASE_SAFE_PROJECT_IDENTIFIER_NAME]_DIALOG_WIDE) : MAKEINTRESOURCE(IDD_[!output UPPER_CASE_SAFE_PROJECT_IDENTIFIER_NAME]_DIALOG)); } } #endif [!if HELPSTYLE_WINHELP] void [!output DIALOG_CLASS]::OnHelpInfo() { // TODO: 在此實作說明 MessageBox(_T("說明")); } [!endif]