void CvIpmLeft::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) { CdIpmDoc* pDoc = (CdIpmDoc*)GetDocument(); ASSERT (pDoc); if (!pDoc) return; CaIpmProperty& property = pDoc->GetProperty(); BOOL bSetToDefaultPercentage = FALSE; //UKS BOOL bRegularStaticSet = TRUE; int nHint = (int)lHint; switch (nHint) { case 1: // Invoked by CdIpmDoc::Initiate() GetTreeCtrl().SendMessage (WM_SETFONT, (WPARAM)property.GetFont(), MAKELPARAM(TRUE, 0)); if (bSetToDefaultPercentage) { CRect rcClient; CfIpmFrame* pFrame = (CfIpmFrame*)GetParentFrame(); ASSERT (pFrame); CSplitterWnd* pSplit = (CSplitterWnd *)pFrame->GetSplitterWnd(); ASSERT (pSplit); pFrame->GetClientRect (rcClient); pSplit->SetColumnInfo(0, (int) (0.4 * (double)rcClient.Width()), 10); pSplit->RecalcLayout(); } // Create regular static set, if needed if (bRegularStaticSet) { CuTMServerStatic *pItem1 = new CuTMServerStatic (pDoc->GetPTreeGD()); CuTMLockinfoStatic *pItem3 = new CuTMLockinfoStatic (pDoc->GetPTreeGD()); CuTMLoginfoStatic *pItem4 = new CuTMLoginfoStatic (pDoc->GetPTreeGD()); CuTMAllDbStatic *pItem5 = new CuTMAllDbStatic (pDoc->GetPTreeGD()); CuTMActiveUsrStatic *pItem6 = new CuTMActiveUsrStatic(pDoc->GetPTreeGD()); CuTMReplAllDbStatic *pItem7 = new CuTMReplAllDbStatic(pDoc->GetPTreeGD()); HTREEITEM hItem1 = pItem1->CreateTreeLine(); HTREEITEM hItem2 = pItem3->CreateTreeLine(); HTREEITEM hItem3 = pItem4->CreateTreeLine(); HTREEITEM hItem4 = pItem5->CreateTreeLine(); HTREEITEM hItem5 = pItem6->CreateTreeLine(); HTREEITEM hItem6 = pItem7->CreateTreeLine(); ASSERT (hItem1 && hItem2 && hItem3 && hItem4 && hItem5 && hItem6); CTreeCtrl& cTree = GetTreeCtrl(); cTree.SelectItem(hItem1); } break; default: break; } }