Layout* LayoutItem::ParentLayout() const { if(GetWidget()) { return GetWidget()->ParentLayout(); } else if(GetLayout()) { GetLayout()->ParentLayout(); } return nullptr; }
BSize BBox::MaxSize() { _ValidateLayoutData(); BSize size = (GetLayout() ? GetLayout()->MaxSize() : fLayoutData->max); return BLayoutUtils::ComposeSize(ExplicitMaxSize(), size); }
void Dialog::CompleteConstruction() { Wnd::CompleteConstruction(); SetLayout(GG::Wnd::Create<GG::Layout>(GG::X0, GG::Y0, GG::X1, GG::Y1, 1, 1, 2, 2)); GetLayout()->SetColumnStretch(0, 1.0); //GetLayout()->SetRowStretch(0, 1.0); GetLayout()->Add(m_child, 0 , 0); }
BSize BBox::PreferredSize() { _ValidateLayoutData(); BSize size = (GetLayout() ? GetLayout()->PreferredSize() : fLayoutData->preferred); return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), size); }
void CamStatusView::MessageReceived(BMessage *message) { switch (message->what) { case B_OBSERVER_NOTICE_CHANGE: { int32 what; message->FindInt32("be:observe_change_what", &what); switch (what) { case kMsgControllerCaptureStarted: SetRecording(true); break; case kMsgControllerCaptureStopped: if (fPaused) fPaused = false; SetRecording(false); break; case kMsgControllerCapturePaused: case kMsgControllerCaptureResumed: TogglePause(what == kMsgControllerCapturePaused); break; case kMsgControllerEncodeStarted: fEncodingStringView->SetText(kEncodingString); ((BCardLayout*)GetLayout())->SetVisibleItem(1); break; case kMsgControllerEncodeProgress: { int32 totalFrames = 0; if (message->FindInt32("frames_total", &totalFrames) == B_OK) { fStatusBar->SetMaxValue(float(totalFrames)); } int32 remainingFrames = 0; if (message->FindInt32("frames_remaining", &remainingFrames) == B_OK) { BString string = kEncodingString; string << " (" << remainingFrames << " frames)"; fEncodingStringView->SetText(string); } fStatusBar->Update(1); break; } case kMsgControllerEncodeFinished: { ((BCardLayout*)GetLayout())->SetVisibleItem((int32)0); break; } default: break; } break; } default: BView::MessageReceived(message); break; } }
bool LayoutItem::IsEmpty() const { if(GetWidget() && GetWidget()->IsVisible()) { return false; } else if(GetLayout() && !GetLayout()->IsEmpty()) { return false; } else if(GetLayoutSpace()) { return false; } return true; }
status_t BSplitView::AllUnarchived(const BMessage* from) { status_t err = BView::AllUnarchived(from); if (err == B_OK) { fSplitLayout = dynamic_cast<BSplitLayout*>(GetLayout()); if (!fSplitLayout && GetLayout()) return B_BAD_TYPE; else if (!fSplitLayout) return B_ERROR; } return err; }
inline bool MtgCard::operator==(const MtgCard& rhs) { return GetLayout() == rhs.GetLayout() && GetManacost() == rhs.GetManacost() && GetCmc() == rhs.GetCmc() && CompareStringList(GetColors(), rhs.GetColors()) && type == rhs.type && CompareStringList(GetSupertypes(), rhs.GetSupertypes()) && CompareStringList(GetTypes(), rhs.GetTypes()) && CompareStringList(GetSubtypes(), rhs.GetSubtypes()) && GetRarity() == rhs.GetRarity() && text == rhs.GetText() && GetFlavor() == rhs.GetFlavor() && GetArtist() == rhs.GetArtist() && GetNumber() == rhs.GetNumber() && GetPower() == rhs.GetPower() && GetToughness() == rhs.GetToughness() && GetLoyalty() == rhs.GetLoyalty() && GetMultiverseid() == rhs.GetMultiverseid() && CompareIntList(GetVariations(), rhs.GetVariations()) && GetImageName() == rhs.GetImageName() && GetWatermark() == rhs.GetWatermark() && GetBorder() == rhs.GetBorder() && IsTimeshifted() == rhs.IsTimeshifted() && GetHand() == rhs.GetHand() && GetLife() == rhs.GetLife() && IsReserved() == rhs.IsReserved() && GetReleasedate() == rhs.GetReleasedate() && IsStarter() == rhs.IsStarter() && CompareStringPairList(GetRulings(), rhs.GetRulings()) && CompareStringPairList(GetForeignNames(), rhs.GetForeignNames()) && GetOriginalText() == rhs.GetOriginalText() && GetOriginalType() == rhs.GetOriginalType() && CompareStringPairList(GetLegalities(), rhs.GetLegalities()) && GetEdition() == rhs.GetEdition(); }
/** * Function IsLayerVisible * tests whether a given layer is visible * @param aLayerIndex = The index of the layer to be tested * @return bool - true if the layer is visible. */ bool GERBVIEW_FRAME::IsLayerVisible( int aLayerIndex ) const { if( ! m_DisplayOptions.m_IsPrinting ) return m_LayersManager->IsLayerVisible( aLayerIndex ); else return GetLayout()->IsLayerVisible( aLayerIndex ); }
BOOL CBCGPRibbonItemDlg::OnInitDialog() { CBCGPDialog::OnInitDialog(); CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout (); if (pLayout != NULL) { pLayout->AddAnchor (IDC_BCGBARRES_IMAGE_LIST, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeBoth, CSize(0, 0), CSize(100, 100)); pLayout->AddAnchor (IDD_BCGBAR_RES_LABEL1, CBCGPStaticLayout::e_MoveTypeVert, CBCGPStaticLayout::e_SizeTypeNone, CSize(50, 100)); pLayout->AddAnchor (IDC_BCGBARRES_NAME, CBCGPStaticLayout::e_MoveTypeVert, CBCGPStaticLayout::e_SizeTypeHorz, CSize(50, 100), CSize(100, 100)); pLayout->AddAnchor (IDOK, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone, CSize(100, 100)); pLayout->AddAnchor (IDCANCEL, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone, CSize(100, 100)); } m_wndImageList.SetImages(&m_images); int nCount = m_images.GetCount (); for (int iImage = 0; iImage < nCount; iImage++) { CBCGPToolbarButton* pButton = new CBCGPToolbarButton; pButton->SetImage (iImage); m_wndImageList.AddButton (pButton); m_Buttons.AddTail (pButton); } m_wndImageList.SelectButton (m_iSelImage); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CBCGPGridFilterListDlg::OnInitDialog() { CBCGPDialog::OnInitDialog(); CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout(); if (pLayout != NULL) { pLayout->AddAnchor(IDC_BCGBARRES_FILTER_SEARCH, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeHorz); pLayout->AddAnchor(IDC_BCGBARRES_FILTER_LIST, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeBoth); pLayout->AddAnchor(IDOK, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone); pLayout->AddAnchor(IDCANCEL, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone); } CString strPrompt; { CBCGPLocalResource locaRes; strPrompt.LoadString(IDS_BCGBARRES_SEARCH_PROMPT); m_strSelectAll.LoadString(IDS_BCGBARRES_SELECT_ALL); } m_wndEdit.EnableSearchMode(TRUE, strPrompt); FillList(); m_wndEdit.SetFocus(); return FALSE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void NotificationWindow::_LoadDisplaySettings(BMessage& settings) { int32 setting; float originalWidth = fWidth; if (settings.FindFloat(kWidthName, &fWidth) != B_OK) fWidth = kDefaultWidth; if (originalWidth != fWidth) GetLayout()->SetExplicitSize(BSize(fWidth, B_SIZE_UNSET)); if (settings.FindInt32(kIconSizeName, &setting) != B_OK) fIconSize = kDefaultIconSize; else fIconSize = (icon_size)setting; int32 position; if (settings.FindInt32(kNotificationPositionName, &position) != B_OK) fPosition = kDefaultNotificationPosition; else fPosition = position; // Notify the views about the change appview_t::iterator aIt; for (aIt = fAppViews.begin(); aIt != fAppViews.end(); ++aIt) { AppGroupView* view = aIt->second; view->Invalidate(); } }
void PartitionsPage::_BuildUI() { BString text; text << B_TRANSLATE_COMMENT("Partitions", "Title") << "\n" << B_TRANSLATE("The following partitions were detected. Please " "check the box next to the partitions to be included " "in the boot menu. You can also set the names of the " "partitions as you would like them to appear in the " "boot menu."); fDescription = CreateDescription("description", text); MakeHeading(fDescription); fPartitions = new BGridView("partitions", 0, be_control_look->DefaultItemSpacing() / 3); BLayoutBuilder::Grid<>(fPartitions) .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) .SetColumnWeight(0, 0) .SetColumnWeight(1, 1) .SetColumnWeight(2, 0.5) .SetColumnWeight(3, 0.5); _FillPartitionsView(fPartitions); BScrollView* scrollView = new BScrollView("scrollView", fPartitions, 0, false, true); SetLayout(new BGroupLayout(B_VERTICAL)); BLayoutBuilder::Group<>((BGroupLayout*)GetLayout()) .Add(fDescription) .Add(scrollView); }
void XaLibControllerFrontEnd::OnStart(const string& ConfFile) { try { LoadXmlConfFile(ConfFile); StartLog(); LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"########################### STARTING FRONT END ACTION LOG ############################"); //StartDb(); StartHttp(); //GetServerInfo(); //GetClientInfo(); SESSION.FrontEndIp=HTTP.GetServerIpAddress(); SESSION.ClientIp=HTTP.GetClientIpAddress(); GetLayout(); LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"IP Address Client-> "+SESSION.ClientIp); LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Ip Address Front End Server -> "+SESSION.FrontEndIp); LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Read HttpString -> " + REQUEST.HeadersString); LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Request Language -> "+REQUEST.Language); // LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Request Device -> "+REQUEST.Device); //RESPONSE.ResponseType=REQUEST.ResponseType; } catch (int e) { throw; } };
void MusicPaymentPreview::PreLayoutManagement() { nux::Geometry const& geo = GetGeometry(); GetLayout()->SetGeometry(geo); previews::Style& style = dash::previews::Style::Instance(); int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale); int width = std::max<int>(0, content_width); if(full_data_layout_) { full_data_layout_->SetMaximumWidth(width); } if(header_layout_) { header_layout_->SetMaximumWidth(width); } if(intro_) { intro_->SetMaximumWidth(width); } if(form_layout_) { form_layout_->SetMaximumWidth(width); } if(footer_layout_) { footer_layout_->SetMaximumWidth(width); } // set the tab ordering SetFirstInTabOrder(password_entry_->text_entry()); SetLastInTabOrder(buttons_map_[MusicPaymentPreview::CANCEL_PURCHASE_ACTION].GetPointer()); SetLastInTabOrder(buttons_map_[MusicPaymentPreview::PURCHASE_ALBUM_ACTION].GetPointer()); SetLastInTabOrder(buttons_map_[MusicPaymentPreview::CHANGE_PAYMENT_ACTION].GetPointer()); SetLastInTabOrder(buttons_map_[MusicPaymentPreview::FORGOT_PASSWORD_ACTION].GetPointer()); Preview::PreLayoutManagement(); }
DrivesPage::DrivesPage(WizardView* wizardView, const BootMenuList& menus, BMessage* settings, const char* name) : WizardPageView(settings, name), fWizardView(wizardView), fHasInstallableItems(false) { BString text; text << B_TRANSLATE_COMMENT("Drives", "Title") << "\n" << B_TRANSLATE("Please select the drive you want the boot manager to " "be installed to or uninstalled from."); BTextView* description = CreateDescription("description", text); MakeHeading(description); fDrivesView = new BListView("drives", B_SINGLE_SELECTION_LIST, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE | B_FULL_UPDATE_ON_RESIZE); fDrivesView->SetSelectionMessage(new BMessage(kMsgSelectionChanged)); BScrollView* scrollView = new BScrollView("scrollView", fDrivesView, 0, false, true); SetLayout(new BGroupLayout(B_VERTICAL)); BLayoutBuilder::Group<>((BGroupLayout*)GetLayout()) .Add(description, 0.5) .Add(scrollView, 1); _UpdateWizardButtons(NULL); _FillDrivesView(menus); }
void AppGroupView::MessageReceived(BMessage* msg) { switch (msg->what) { case kRemoveView: { NotificationView* view = NULL; if (msg->FindPointer("view", (void**)&view) != B_OK) return; infoview_t::iterator vIt = find(fInfo.begin(), fInfo.end(), view); if (vIt == fInfo.end()) break; fInfo.erase(vIt); GetLayout()->RemoveView(view); delete view; fParent->PostMessage(msg); if (!this->HasChildren()) { Hide(); BMessage removeSelfMessage(kRemoveGroupView); removeSelfMessage.AddPointer("view", this); fParent->PostMessage(&removeSelfMessage); } break; } default: BView::MessageReceived(msg); } }
ScreenSaverWindow::ScreenSaverWindow() : BWindow(BRect(50.0f, 50.0f, 50.0f + kWindowWidth, 50.0f + kWindowHeight), B_TRANSLATE_SYSTEM_NAME("ScreenSaver"), B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS) { fSettings.Load(); fMinWidth = floorf(be_control_look->DefaultItemSpacing() * (kWindowWidth / kDefaultItemSpacingAt12pt)); font_height fontHeight; be_plain_font->GetHeight(&fontHeight); float textHeight = ceilf(fontHeight.ascent + fontHeight.descent); fMinHeight = ceilf(std::max(kWindowHeight, textHeight * 28)); // Create the password editing window fPasswordWindow = new PasswordWindow(fSettings); fPasswordWindow->Run(); // Create the tab view fTabView = new TabView(); fTabView->SetBorder(B_NO_BORDER); // Create the controls inside the tabs fFadeView = new FadeView(B_TRANSLATE("General"), fSettings); fModulesView = new ModulesView(B_TRANSLATE("Screensavers"), fSettings); fTabView->AddTab(fFadeView); fTabView->AddTab(fModulesView); // Create the topmost background view BView* topView = new BView("topView", B_WILL_DRAW); topView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR); topView->SetExplicitAlignment(BAlignment(B_ALIGN_USE_FULL_WIDTH, B_ALIGN_USE_FULL_HEIGHT)); topView->SetExplicitMinSize(BSize(fMinWidth, fMinHeight)); BLayoutBuilder::Group<>(topView, B_VERTICAL) .SetInsets(0, B_USE_DEFAULT_SPACING, 0, B_USE_WINDOW_SPACING) .Add(fTabView) .End(); SetLayout(new BGroupLayout(B_VERTICAL)); GetLayout()->AddView(topView); fTabView->Select(fSettings.WindowTab()); if (fSettings.WindowFrame().left > 0 && fSettings.WindowFrame().top > 0) MoveTo(fSettings.WindowFrame().left, fSettings.WindowFrame().top); if (fSettings.WindowFrame().Width() > 0 && fSettings.WindowFrame().Height() > 0) { ResizeTo(fSettings.WindowFrame().Width(), fSettings.WindowFrame().Height()); } CenterOnScreen(); }
bool TreeNode::ValidateExpandButton() { bool repaint = false; if (child_nodes_ != 0 && expand_button_ == 0) { GUIImageManager* i_man = GetImageManager(); /*expand_button_ = new CheckButton(expand_icon_id_, collapse_icon_id_, expand_icon_id_, collapse_icon_id_, collapse_icon_id_, expand_icon_id_, "ExpandButton");*/ expand_button_->SetPreferredSize(i_man->GetImageSize(expand_icon_id_)); expand_button_->SetMinSize(expand_button_->GetPreferredSize()); expand_button_->SetOnClick(TreeNode, OnExpandButtonUnclicked); // Create a rect with a CenterLayout in order to keep the button centered. RectComponent* rect = new RectComponent(new CenterLayout()); rect->AddChild(expand_button_); rect->SetPreferredSize(expand_button_->GetPreferredSize()); rect->SetMinSize(expand_button_->GetMinSize()); if (((GridLayout*)GetLayout())->GetNumCols() > 1) { Component* comp = ((GridLayout*)GetLayout())->GetComponentAt(0, 0); ((GridLayout*)GetLayout())->DeleteColumn(0); delete comp; } ((GridLayout*)GetLayout())->InsertColumn(0); AddChild(rect, 0, 0); repaint = true; } else if (child_nodes_ == 0 && expand_button_ == 0) { GUIImageManager* i_man = GetImageManager(); RectComponent* rect = new RectComponent(new CenterLayout()); rect->SetPreferredSize(i_man->GetImageSize(expand_icon_id_)); rect->SetMinSize(rect->GetPreferredSize()); ((GridLayout*)GetLayout())->InsertColumn(0); AddChild(rect, 0, 0); } return repaint; }
NetworkWindow::NetworkWindow() : BWindow(BRect(50, 50, 269, 302), B_TRANSLATE_SYSTEM_NAME("Network"), B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_QUIT_ON_WINDOW_CLOSE) { SetLayout(new BGroupLayout(B_HORIZONTAL)); GetLayout()->AddView(new EthernetSettingsView()); }
void BTextControl::DoLayout() { // Bail out, if we shan't do layout. if (!(Flags() & B_SUPPORTS_LAYOUT)) return; CALLED(); // If the user set a layout, we let the base class version call its // hook. if (GetLayout()) { BView::DoLayout(); return; } _ValidateLayoutData(); // validate current size BSize size(Bounds().Size()); if (size.width < fLayoutData->min.width) size.width = fLayoutData->min.width; if (size.height < fLayoutData->min.height) size.height = fLayoutData->min.height; BRect dirty(fText->Frame()); BRect textFrame; // divider float divider = 0; if (fLayoutData->text_view_layout_item != NULL) { if (fLayoutData->label_layout_item != NULL) { // We have layout items. They define the divider location. divider = fabs(fLayoutData->text_view_layout_item->Frame().left - fLayoutData->label_layout_item->Frame().left); } textFrame = fLayoutData->text_view_layout_item->FrameInParent(); } else { if (fLayoutData->label_width > 0) { divider = fLayoutData->label_width + be_control_look->DefaultLabelSpacing(); } textFrame.Set(divider, 0, size.width, size.height); } // place the text view and set the divider textFrame.InsetBy(kFrameMargin, kFrameMargin); BLayoutUtils::AlignInFrame(fText, textFrame); fDivider = divider; // invalidate dirty region dirty = dirty | fText->Frame(); dirty.InsetBy(-kFrameMargin, -kFrameMargin); Invalidate(dirty); }
void UserPromptView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw) { nux::Geometry const& geo = GetGeometry(); graphics_engine.PushClippingRectangle(geo); if (!IsFullRedraw()) { EnsureBGLayer(); nux::GetPainter().PushLayer(graphics_engine, geo, bg_layer_.get()); } if (GetLayout()) GetLayout()->ProcessDraw(graphics_engine, force_draw); if (!IsFullRedraw()) nux::GetPainter().PopBackground(); graphics_engine.PopClippingRectangle(); }
void FilterBar::UpdateScale(double scale) { for (auto& filters : filter_map_) filters.second->scale = scale; auto& style = dash::Style::Instance(); auto* layout = static_cast<nux::VLayout*>(GetLayout()); layout->SetTopAndBottomPadding(style.GetFilterBarTopPadding().CP(scale) - style.GetFilterHighlightPadding().CP(scale)); layout->SetSpaceBetweenChildren(style.GetSpaceBetweenFilterWidgets().CP(scale) - style.GetFilterHighlightPadding().CP(scale)); }
void FilterBar::ClearFilters() { for (auto iter: filter_map_) { FilterExpanderLabel* filter_view = iter.second; RemoveChild(filter_view); GetLayout()->RemoveChildObject(filter_view); } filter_map_.clear(); }
double GERBVIEW_FRAME::BestZoom() { GERBER_DRAW_ITEM* item = GetLayout()->m_Drawings; // gives a minimal value to zoom, if no item in list if( item == NULL ) return ZOOM_FACTOR( 350.0 ); EDA_RECT bbox = GetLayout()->ComputeBoundingBox(); wxSize size = m_canvas->GetClientSize(); double x = (double) bbox.GetWidth() / (double) size.x; double y = (double) bbox.GetHeight() / (double) size.y; GetScreen()->SetScrollCenterPosition( bbox.Centre() ); double best_zoom = std::max( x, y ); return best_zoom; }
DevicesWindow::DevicesWindow() : BWindow(BRect(50, 50, 750, 550), B_TRANSLATE_SYSTEM_NAME("Devices"), B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS | B_QUIT_ON_WINDOW_CLOSE) { BLayoutBuilder::Group<>(this, B_VERTICAL) .SetInsets(0) .Add(fDevicesView = new DevicesView()); GetLayout()->SetExplicitMinSize(BSize(600, 300)); }
NetworkWindow::NetworkWindow(Setting* setting) : BWindow(BRect(50, 50, 269, 302), "Network", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS) { SetLayout(new BGroupLayout(B_HORIZONTAL)); fEthernetView = new EthernetSettingsView(setting); GetLayout()->AddView(fEthernetView); SetTitle(setting->Name()); }
AppGroupView::AppGroupView(NotificationWindow* win, const char* label) : BGroupView("appGroup", B_VERTICAL, 0), fLabel(label), fParent(win), fCollapsed(false) { SetFlags(Flags() | B_WILL_DRAW); static_cast<BGroupLayout*>(GetLayout())->SetInsets(0, kHeaderSize, 0, 0); }
OpenGLWindow::OpenGLWindow() : BWindow(BRect(50, 50, 450, 400), B_TRANSLATE_SYSTEM_NAME("OpenGL"), B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS) { SetLayout(new BGroupLayout(B_VERTICAL)); fView = new OpenGLView(); GetLayout()->AddView(fView); CenterOnScreen(); }
tagSIZE ILayoutItem::GetRootOffset() { CSize szOffset(0, 0); ILayout* pLayout = GetLayout(); while (pLayout != NULL) { CRect rc = pLayout->GetRect(); szOffset.cx += rc.left; szOffset.cy += rc.top; } return szOffset; }