| MIL 10 Reference
| Customize Help
| Save Settings

MdispSelectWindow



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Select an image buffer to display in a user-defined window.
Syntax
void MdispSelectWindow(
MIL_ID DisplayId, //in
MIL_ID ImageBufId, //in
MIL_WINDOW_HANDLE ClientWindowHandle //in
)
Description

This function outputs the content of the specified image buffer to the specified user-defined window, using the specified MIL display.

If the specified image buffer is smaller in size than the target window size, the border outside the image is not modified. If the specified buffer is larger in size than the target window, the right and bottom portion of the buffer, the part that exceeds the window, is not displayed.

You can control the displayed area using MdispControl(), MdispPan(), or MdispZoom(). For example, you can center the selected image in the display using MdispControl() with M_CENTER_DISPLAY.

To remove an image buffer selected to the display using MdispSelectWindow(), you can use MdispSelectWindow() with M_NULL. This leaves the associated window open but leaves it blank.

This function does not support remote displays (MdispAlloc() with M_REMOTE_DISPLAY).

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
DisplayId

Specifies the identifier of the display.

ImageBufId

Specifies the image buffer to display. To be displayable, this buffer must be an image buffer that has an M_IMAGE + M_DISP attribute.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

Set this parameter to M_NULL to stop displaying the currently selected image buffer on the specified display.

ClientWindowHandle

Specifies the window handle of the user-defined window or child window. This window must have a window handle of type HWND or X11. For example, the Windows API functions can create a window with an HWND handle, and third-party functions (like Qt) can create an X11 window handle. If this parameter is set to zero, this function behaves like MdispSelect().

Set this parameter to M_NULL if the ImageBufId parameter is set to M_NULL.

Type-specific versions of the function
void MdispSelectWPF (MIL_ID DisplayId, MIL_ID ImageBufId, WindowsFormsHost DisplayHostingObject)
Parameters

DisplayId

See DisplayId of the main function for a description.

ImageBufId

See ImageBufId of the main function for a description.

DisplayHostingObject

Specifies a System.Windows.Forms.Integration.WindowsFormsHost object that should host the MIL display. This object must have been created in a Windows Presentation Foundation (WPF) application before calling this function. If this parameter is set to null in C# or Nothing in VB .NET, this function behaves like MdispSelect().

Compilation information
Header Include windows.h; mil.h (windows.h must be included first).
Library Use mil.lib.
DLL Requires mil.dll; mildisplay.dll.
DISP NONE