LRESULT CXTPTaskDialogFrame::OnDialogSetElementText(WPARAM wParam, LPARAM lParam) { if (wParam == TDE_MAIN_INSTRUCTION) { m_strMainInstruction.SetCaption(LoadItemString((LPCWSTR)lParam)); RecalcLayout(); return TRUE; } if (wParam == TDE_CONTENT) { m_strContent.SetCaption(LoadItemString((LPCWSTR)lParam)); m_wndContent.DestroyWindow(); if (IsHyperlinksEnabled()) { m_wndContent.Create(CRect(0, 0, 0, 0), m_strContent.m_strCaption, &m_font, this); } RecalcLayout(); return TRUE; } if (wParam == TDE_EXPANDED_INFORMATION) { m_strExpandedInformation.SetCaption(LoadItemString((LPCWSTR)lParam)); m_wndExpandedInformation.DestroyWindow(); RecalcLayout(); return TRUE; } if (wParam == TDE_FOOTER) { m_strFooter.SetCaption(LoadItemString((LPCWSTR)lParam)); m_wndFooter.DestroyWindow(); if (IsHyperlinksEnabled()) { m_wndFooter.Create(CRect(0, 0, 0, 0), m_strFooter.m_strCaption, &m_font, this); } RecalcLayout(); return TRUE; } return FALSE; }
int HDMessageBox(wchar_t * cStringID,wchar_t * cDefault,HWND hParentWnd,UINT uType) { wchar_t * pText = new wchar_t[1024]; memset(pText,0, 1024 * sizeof(wchar_t)); wchar_t * pTitle = new wchar_t [1024]; wcscpy(pTitle,LoadItemString(L"IDS_MAINDIALOG_TITLE",pTitle,L"隐身专家")); if(hParentWnd == NULL) { hParentWnd = hMainDlg; } int iRet = MessageBoxW(hParentWnd,LoadItemString(cStringID,pText,cDefault),pTitle,uType); delete [] pTitle; delete [] pText; return iRet; }