BCGControlBar Pro for MFC
CBCGPVisualContainer

Detailed Description

The CBCGPVisualContainer class implements functionality of the visual container.

The visual container is a windowless object that hosts CBCGPBaseVisualObject - derived objects. You can initialize this object either using CBCGPVisualContainerCtrl window (simplest way) or directly:

You can add CBCGPBaseVisualObject - derived objects using Add() method or prepare the container context in our WYSWYG Visual Designer application and call LoadFromXML() or LoadFromFile() methods to load the container objects saved by Designer.

Please take a look at the following examples to study how to use the Visual Container:

  • BCGPChartExample: CChartAdvancedLegendView, CChartContainerView and CChartThumbnailsView classes.
  • BCGPDigitalDashboard: each view hosts CBCGPVisualContainer - derived class
  • BCGPGaugesDemo: CDesignerDataView demonstrates how to load and use container prepared by Visual Designer application; other classes such as CBCGPColorIndicatorView, CBCGPImageIndicatorView, CBCGPNumericIndicatorView or CBCGPTextIndicatorView show how to create the container programmatically.
+ Inheritance diagram for CBCGPVisualContainer:

Public Types

enum  BCGP_VISUAL_CONTAINER_GRID_STYLE
 

Public Member Functions

 CBCGPVisualContainerConstructor.
 
 AddAdds a new child visual object to the container.
 
 ClearSelectionUnselect all previously selected objects.
 
 CopyToClipboardCopies visual container to the Clipboard.
 
 EnableEditModeEnables or disables the container edit mode.
 
 EnableImageCacheEnables or disables visual container image cache.
 
 EnableLayoutEnables or disables layout manager for a visual container
 
 EnableScrollBarsEnables or disables visual container scroll bars.
 
 ExportToBitmapExports the visual container to bitmap.
 
 ExportToFileExports the visual container to an image file (BMP or PNG).
 
 ExportToImageExports the visual container to an image.
 
 FindIndexGets a specified object index.
 
 GetAtGets a child object by index.
 
 GetBoundsRectGets a rectangle which includes all child visual objects.
 
 GetByIDGets a child object by identifier.
 
 GetCountGets the number of the child visual objects.
 
 GetFillBrushGets container fill brush.
 
 GetFromPointGets a visual object located at specified coordinates.
 
 GetGridBrushGets container grid brush.
 
 GetGridSizeGets container grid cell size.
 
 GetGridStyleGets container grid style.
 
 GetLayoutReturns a pointer to layout manager.
 
 GetOutlineBrushGets container outline brush.
 
 GetOwnerGets the visual container owner.
 
 GetRectGets the container bounding rectangle.
 
 GetScrollOffsetGets container scroll offset.
 
 GetSelGets a selected object by index.
 
 GetSelCountGets number of the selected objects.
 
 GetSelectedThemeObtain a currently selected visual theme.
 
 GetVisualThemesCountGets visual themes count.
 
 HasScrollBarsTells whether this container has scroll bars.
 
 InsertAtAdds a new child visual object to the container at the specific position.
 
 IsEditModeTells whether the container is in the edit mode.
 
 IsImageCacheTells whether image cache is enabled for this container.
 
 IsLayoutEnabledTells whether layout management is enabled for a visual container.
 
 IsSingleSelTells whether a single selection mode is activated.
 
 LoadFromBufferLoads container data from buffer.
 
 LoadFromFileLoads container data from external file.
 
 LoadFromXMLLoads container data from XML resource.
 
 LoadFromXMLLoads container data from XML resource.
 
 OnAfterCreateWndCalled by the framework after custom control creating.
 
 OnBeforeDestroyWndCalled by the framework before custom window destroying.
 
 OnCreateCustomControlCalled by the framework to create a Visual Container custom control.
 
 OnDrawCalled by the framework to draw a visual container
 
 RemoveRemoves the child visual object by specified index.
 
 RemoveRemoves the child visual object.
 
 RemoveAllRemoves all child visual objects from the container.
 
 RemoveSelectedRemoves all currenly selected child visual objects from the container.
 
 SaveToXMLSaves container data to external file.
 
 SelectSelects an object.
 
 SelectAllSelects all visual objects.
 
 SelectVisualThemeSelect a visual theme (by index) created in Visual Designer.
 
 SelectVisualThemeByNameSelect a visual theme (by name) created in Visual Designer.
 
 SetFillBrushSets container fill brush.
 
 SetGridBrushSets container grid brush.
 
 SetGridSizeSets container grid size.
 
 SetGridStyleSets container grid style.
 
 SetOutlineBrushSets container outline brush.
 
 SetOwnerSets the visual container owner window.
 
 SetRectSets a new bounding rectangle.