DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


DIView Sample

Source code for DIView sample is available in Samples\VC folder of the installation directory. We suggest to copy whole VC directory to location outside of the installation folder before compiling the project.

Description

Implementation

All the work is done inside CDIViewView class. The most interesting part is contained in CDIViewView::OnInitialUpdate() method. In this application the DG Kernel Control is  not embedded into a dialogue using the resource editor. Instead it is created directly using Create() method.

The rest of the code in CDIViewView::OnInitialUpdate() is devoted to obtaining size of the client area of the window which will be covered by the control's display.

CDIViewView::OnSize() method synchronizes size and position of the view and the control.

Background manipulation is implemented in a set of functions called from CDIViewView::InitBackground(). It is using IRectangleColor_DG interface to access and modify arrays of colors assigned to four sides of the window rectangle.

See also: C# DIView sample, VB .NET DIView Sample, VB 6.0 DIView Sample, All samples