@@ -29,47 +29,52 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR szCmdLine, int nC
2929 return msg.wParam ;
3030}
3131
32- LRESULT fusion::CMainFrame::OnClose (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
32+ namespace fusion
3333{
34- DestroyWindow ();
35- return 0 ;
36- }
3734
38- LRESULT fusion:: CMainFrame::OnDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
39- {
40- PostQuitMessage ( 0 );
41- return 0 ;
42- }
35+ LRESULT CMainFrame::OnClose (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
36+ {
37+ DestroyWindow ( );
38+ return 0 ;
39+ }
4340
44- LRESULT fusion::CMainFrame::OnSize (UINT nType, CSize Extent)
45- {
46- cdbg << " OnSize:: " << Extent.cx << " , " << Extent.cy << " \n " ;
47- UpdateLayout ();
48- return 1 ;
49- }
41+ LRESULT CMainFrame::OnDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
42+ {
43+ PostQuitMessage (0 );
44+ return 0 ;
45+ }
5046
51- void fusion::CMainFrame::AddTab (const std::wstring name)
52- {
53- auto lvi = std::make_shared<CLogViewTabItem2>();
54- m_tabitems.push_back (lvi);
55- lvi->SetText (name.c_str ());
56- lvi->Create (*this );
57-
58- int newIndex = GetTabCtrl ().GetItemCount ();
59- GetTabCtrl ().InsertItem (newIndex, lvi.get ());
60- GetTabCtrl ().SetCurSel (newIndex);
61- }
47+ LRESULT CMainFrame::OnSize (UINT nType, CSize Extent)
48+ {
49+ cdbg << " OnSize:: " << Extent.cx << " , " << Extent.cy << " \n " ;
50+ UpdateLayout ();
51+ return 1 ;
52+ }
6253
63- LRESULT fusion::CMainFrame::OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
64- {
65- auto rect = RECT ();
66- GetClientRect (&rect);
54+ void CMainFrame::AddTab (const std::wstring name)
55+ {
56+ auto lvi = std::make_shared<CLogViewTabItem2>();
57+ m_tabitems.push_back (lvi);
58+ lvi->SetText (name.c_str ());
59+ lvi->Create (*this );
6760
68- // block 2
69- CreateTabWindow (* this , rect, CTCS_CLOSEBUTTON | CTCS_DRAGREARRANGE );
70- AddTab ( L" Tab1 " );
71- AddTab ( L" Tab2 " );
61+ int newIndex = GetTabCtrl (). GetItemCount ();
62+ GetTabCtrl (). InsertItem (newIndex, lvi. get () );
63+ GetTabCtrl (). SetCurSel (newIndex );
64+ }
7265
73- ShowTabControl ();
74- return 0 ;
75- }
66+ LRESULT CMainFrame::OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
67+ {
68+ auto rect = RECT ();
69+ GetClientRect (&rect);
70+
71+ // block 2
72+ CreateTabWindow (*this , rect, CTCS_CLOSEBUTTON | CTCS_DRAGREARRANGE);
73+ AddTab (L" Tab1" );
74+ AddTab (L" Tab2" );
75+
76+ ShowTabControl ();
77+ return 0 ;
78+ }
79+
80+ }
0 commit comments