CGRect CCXEGLView::getFrame() { TRectangle rc; GetClientBounds(&rc); return (CGRect((float)rc.X(), (float)rc.Y(), (float)rc.Width(), (float)rc.Height())); }
Int32 TUserInfoDetailForm::_SetCoolBarList(TApplication* pApp) { TBarRowList *lpRowList = NULL; TBarRow *lpRow = NULL; TCoolBarList* pCoolBarList = static_cast<TCoolBarList*>(GetControlPtr(APP_KA_ID_UserInfoDetailForm_InfoCoolBarList)); if (pCoolBarList) { #if 0 TRectangle rc; Int32 oldTop = 0; pCoolBarList->GetBounds(&rc); oldTop = rc.Y(); pCoolBarList->SetBounds(RC_LIST_NORMAL); pCoolBarList->GetBounds(&rc); rc.SetRect(rc.X(),oldTop,rc.Width(),rc.Height()); pCoolBarList->SetBounds(&rc); #endif TBarListItem* lpItem = NULL; lpRowList = pCoolBarList->Rows(); if (lpRowList) { lpRowList->BeginUpdate(); for(int i=0; i < lpRowList->Count(); i++) { lpRow = lpRowList->GetRow(i); if(lpRow) { for(int j = 0; j < lpRow->Count(); j++) { lpItem = lpRow->GetItem(j); if(lpItem) { Int32 ItemHeight = 60;//设置详情列表默认高度为60 lpItem->SetCaption(NULL); lpItem->SetIndicatorType(itNone); lpItem->SetHeight(ItemHeight); } } } } //取第一行的特别item,调整高度 lpRow = lpRowList->GetRow(0); if(lpRow) { TRectangle Rc_Temp; //HomeTown lpItem = lpRow->GetItem(3); if(lpItem) { Int32 ItemHeight = 60; TRichView* pView = static_cast<TRichView*>(GetControlPtr(APP_KA_ID_UserInfoDetailForm_HomeTownValueView)); pView->GetBounds(&Rc_Temp); ItemHeight = 20 + Rc_Temp.Height() + 20; if(ItemHeight > 60) lpItem->SetHeight(ItemHeight); } } //取第二行的特别item,调整高度 lpRow = lpRowList->GetRow(1); if(lpRow) { TRectangle Rc_Temp; //MSN lpItem = lpRow->GetItem(3); if(lpItem) { Int32 ItemHeight = 60; TRichView* pView = static_cast<TRichView*>(GetControlPtr(APP_KA_ID_UserInfoDetailForm_MSNValueView)); pView->GetBounds(&Rc_Temp); ItemHeight = 20 + Rc_Temp.Height() + 20; if(ItemHeight > 60) lpItem->SetHeight(ItemHeight); } //email lpItem = lpRow->GetItem(6); if(lpItem) { Int32 ItemHeight = 60; TRichView* pView = static_cast<TRichView*>(GetControlPtr(APP_KA_ID_UserInfoDetailForm_EmailValueView)); pView->GetBounds(&Rc_Temp); ItemHeight = 20 + Rc_Temp.Height() + 20; if(ItemHeight > 60) lpItem->SetHeight(ItemHeight); } //教育背景 lpItem = lpRow->GetItem(7); if(lpItem) { Int32 ItemHeight = 60; TRichView* pView = static_cast<TRichView*>(GetControlPtr(APP_KA_ID_UserInfoDetailForm_EduValueView)); pView->GetBounds(&Rc_Temp); ItemHeight = 20 + Rc_Temp.Height() + 20; if(ItemHeight > 60) lpItem->SetHeight(ItemHeight); } //工作经历 lpItem = lpRow->GetItem(8); if(lpItem) { Int32 ItemHeight = 60; TRichView* pView = static_cast<TRichView*>(GetControlPtr(APP_KA_ID_UserInfoDetailForm_CareerValueView)); pView->GetBounds(&Rc_Temp); ItemHeight = 20 + Rc_Temp.Height() + 20; if(ItemHeight > 60) lpItem->SetHeight(ItemHeight); } } lpRowList->EndUpdate(); } } return TRUE; }