| 19 | } |
| 20 | |
| 21 | void MessageBoxWhd::InitWindow() |
| 22 | { |
| 23 | CLabelUI* pLbl = NULL; |
| 24 | CControlUI* pCtl = NULL; |
| 25 | if (m_uType == Info) |
| 26 | { |
| 27 | pLbl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("lab_msg_info"))); |
| 28 | pCtl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("ctl_msg_info"))); |
| 29 | } |
| 30 | else if (m_uType == Warn) |
| 31 | { |
| 32 | pLbl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("lab_msg_warn"))); |
| 33 | pCtl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("ctl_msg_warn"))); |
| 34 | } |
| 35 | else if (m_uType == Error) |
| 36 | { |
| 37 | pLbl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("lab_msg_error"))); |
| 38 | pCtl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("ctl_msg_error"))); |
| 39 | } |
| 40 | pLbl->SetVisible(true); |
| 41 | pCtl->SetVisible(true); |
| 42 | |
| 43 | std::stringstream ss; |
| 44 | ss<<"lbl_msg_"<<m_uMsgCode; |
| 45 | CLabelUI* pTextUI = static_cast<CLabelUI*> (m_PaintManager.FindControl(Base::CharacterSet::ANSIToUnicode(ss.str()).c_str())); |
| 46 | if (pTextUI) |
| 47 | { |
| 48 | pTextUI->SetVisible(true); |
| 49 | if (!m_dstrExMsg.IsEmpty()) |
| 50 | { |
| 51 | CDuiString theMsg = pTextUI->GetText(); |
| 52 | theMsg.Replace(_T("$"), m_dstrExMsg); |
| 53 | pTextUI->SetText(theMsg); |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | LPCTSTR MessageBoxWhd::GetWindowClassName() const |
| 59 | { |
nothing calls this directly
no test coverage detected