MCPcopy Create free account
hub / github.com/cinience/RedisStudio / InitWindow

Method InitWindow

RedisStudio/MessageBoxWhd.cpp:21–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void 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
58LPCTSTR MessageBoxWhd::GetWindowClassName() const
59{

Callers

nothing calls this directly

Calls 6

IsEmptyMethod · 0.80
ReplaceMethod · 0.80
FindControlMethod · 0.45
SetVisibleMethod · 0.45
GetTextMethod · 0.45
SetTextMethod · 0.45

Tested by

no test coverage detected