LRESULT CCompletionPage::OnInitDialog(HWND hWnd, LPARAM lParam) { CContainedWindow wndTitle; wndTitle.Attach(GetDlgItem(IDC_BIG_BOLD_TITLE)); wndTitle.SetFont(pGetTitleFont()); return 1; }
LRESULT CAboutDialog::OnInitDialog(HWND hWnd, LPARAM lParam) { BOOL fSuccess = FALSE; CenterWindow(GetParent()); m_wndHyperLink.SubclassWindow(GetDlgItem(IDC_LINK)); CString strHyperLink; strHyperLink.LoadString(IDS_ABOUTDLG_HYPERLINK); m_wndHyperLink.SetHyperLink(strHyperLink); CString strAppVer, strProdVer; pGetVersionStrings(strAppVer, strProdVer); CString strProdVerText; TCHAR szProdVerFmt[256] = {0}; CStatic wndProdVer; wndProdVer.Attach(GetDlgItem(IDC_PRODVER)); wndProdVer.GetWindowText(szProdVerFmt, 256); strProdVerText.FormatMessage(szProdVerFmt, strProdVer); wndProdVer.SetWindowText(strProdVerText); CStatic wndProdName; wndProdName.Attach(GetDlgItem(IDC_PRODNAME)); wndProdName.SetFont(pGetTitleFont()); CListViewCtrl wndListView(GetDlgItem(IDC_COMPVER)); CString colName[2]; fSuccess = colName[0].LoadString(IDS_ABOUTDLG_COL_COMPONENT); ATLASSERT(fSuccess); fSuccess = colName[1].LoadString(IDS_ABOUTDLG_COL_VERSION); ATLASSERT(fSuccess); wndListView.AddColumn(colName[0], 0); wndListView.AddColumn(colName[1], 1); wndListView.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT); CString strAppTitle; strAppTitle.LoadString(IDS_MAIN_TITLE); wndListView.AddItem(0, 0, strAppTitle); wndListView.SetItemText(0, 1, strAppVer); CRect rcListView; wndListView.GetClientRect(rcListView); wndListView.SetColumnWidth(0, LVSCW_AUTOSIZE); wndListView.SetColumnWidth(1, rcListView.Width() - wndListView.GetColumnWidth(0)); // // Image Header // m_pix.LoadFromResource( _Module.GetResourceInstance(), IDB_ABOUT_HEADER, _T("IMAGE")); // // Enable/Disable Check for update button // m_wndUpdate.Attach(GetDlgItem(IDC_CHECK_UPDATE)); AutoHModule hUpdateDLL = ::LoadLibrary(_T("ndupdate.dll")); if (NULL != (HMODULE)hUpdateDLL) { } else { m_wndUpdate.ShowWindow(FALSE); } return TRUE; }