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

Method Init

DuiLib/Control/UIDateTime.cpp:38–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 void CDateTimeWnd::Init(CDateTimeUI* pOwner)
39 {
40 m_pOwner = pOwner;
41 m_pOwner->m_nDTUpdateFlag = DT_NONE;
42
43 if (m_hWnd == NULL)
44 {
45 RECT rcPos = CalPos();
46 UINT uStyle = WS_CHILD;
47 Create(m_pOwner->GetManager()->GetPaintWindow(), NULL, uStyle, 0, rcPos);
48 SetWindowFont(m_hWnd, m_pOwner->GetManager()->GetFontInfo(m_pOwner->GetFont())->hFont, TRUE);
49 }
50
51 if (m_pOwner->GetText().IsEmpty())
52 ::GetLocalTime(&m_pOwner->m_sysTime);
53
54 ::SendMessage(m_hWnd, DTM_SETSYSTEMTIME, 0, (LPARAM)&m_pOwner->m_sysTime);
55 ::ShowWindow(m_hWnd, SW_SHOWNOACTIVATE);
56 ::SetFocus(m_hWnd);
57
58 m_bInit = true;
59 }
60
61 RECT CDateTimeWnd::CalPos()
62 {

Callers 1

DoEventMethod · 0.45

Calls 6

GetPaintWindowMethod · 0.80
GetManagerMethod · 0.80
GetFontInfoMethod · 0.80
IsEmptyMethod · 0.80
GetFontMethod · 0.45
GetTextMethod · 0.45

Tested by

no test coverage detected