This method displays the image in a window using the window handle.

[Visual Basic]   [ Boolean = ]imagekitcontrolname.PrintDraw.ImageOutToHwnd(hWnd As LONG_PTR, Handle As LONG_PTR, Color As OLE_COLOR, Aspect As Boolean, DXFBlack As Boolean)
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetPrintDraw().ImageOutToHwnd(LONG_PTR hWnd, LONG_PTR Handle, unsigned long Color, BOOL Aspect, BOOL DXFBlack)
[VB.NET]   [ Boolean = ]imagekitcontrolname.PrintDraw.ImageOutToHwnd(hWnd As Integer(x86) or Long(x64), Handle As Integer(x86) or Long(x64), Color As UInteger, Aspect As Boolean, DXFBlack As Boolean)
[C#.NET]   [ bool = ]imagekitcontrolname.PrintDraw.ImageOutToHwnd(int(x86) or long(x64) hWnd, int(x86) or long(x64) Handle, uint Color, bool Aspect, bool DXFBlack)

*(x86) refers to the 32 bit version, (x64) refers to the 64 bit version.

Parameters

Name Explanation
hWnd The window handle
Handle The image handle of the raster or vector image
Color Sets the background color of the window
Aspect Maintains the height to width ratio [True (nonzero): Ratio maintained, False (0): Ratio not maintained]
DXFBlack In DXF images only, this sets black to white and white to black. [True (nonzero): Black and white are exchanged, False (0): Black and white are not exchanged]

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The ImageOutToHwnd method displays the image in a window using the window handle. If the image does not fit within the window's canvas the image will be scaled to fit. If the Aspect parameter is False, the image will be displayed within the window canvas as it is, i.e. the height to width ratio will not be maintained. If the Aspect parameter is True, the image will be displayed within the window canvas with the height to width ratio maintained. To set the background color of the window, enter the appropriate RGB (red, green, blue) values in the Color parameter.

This method can draw in the following designated objects: screen only.

Differences between the ImageKit7/8

The hWnd, Handle, and Color arguments' type has changed.

 

The ImageKit10 ActiveX is a product created by Newtone Corporation