|
IViewObject
The IViewObject interface enables an object to display itself directly without passing a data
object to the caller. In addition, this interface can create and manage a
connection with an advise sink so the caller can be notified of changes in the view
object.
The caller can request specific representations and specific target devices.
For example, a caller can ask for either an object's content or an iconic
representation. Also, the caller can ask the object to compose a picture for a target
device that is independent of the drawing device context. As a result, the
picture can be composed for one target device and drawn on another device context.
For example, to provide a print preview operation, you can compose the drawing
for a printer target device but actually draw the representation on the
display.
The IViewObject interface is similar to IDataObject; except that IViewObject places a representation of the data onto a device context while IDataObject places the representation onto a transfer medium.
Unlike most other interfaces, IViewObject cannot be marshaled to another process. This is because device contexts are
only effective in the context of one process.
When to Implement
Object handlers and in-process servers that manage their own presentations
implement IViewObject for use by compound document containers. OLE provides an IViewObject implementation for its default object handler's cache.
When to Use
You call IViewObject from a container application if you need to draw a contained object on a
specific device context. For example, if you want to print the object to a printer,
you call the Draw method in the IViewObject interface.
Methods in VTable Order
IViewObject Methods
| Description
| Draw
| Draws a representation of the object onto a device context.
| GetColorSet
| Returns the logical palette the object uses for drawing.
| Freeze
| Freezes the drawn representation of an object so it will not change until a
subsequent Unfreeze.
| Unfreeze
| Unfreezes the drawn representation of an object.
| SetAdvise
| Sets up a connection between the view object and an advise sink so that the
advise sink can receive notifications of changes in the view object.
| GetAdvise
| Returns the information on the most recent SetAdvise.
|
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|