| MIL 10 User Guide
| Customize Help

Types of displays



See also
Availability
Available in MIL-Lite

Available in MIL

You can allocate a display so that an image buffer selected to this display is:

  • Displayed in a window on a Windows desktop screen. This is called a windowed display (M_WINDOWED).

  • Displayed on a dedicated screen that is also a Windows desktop screen. This is called an exclusive display (M_EXCLUSIVE).

  • Displayed on a dedicated screen that is not a Windows desktop screen. This is called an auxiliary display (M_AUXILIARY).

  • Published on the network. This is called a network display (M_NETWORK).

You must specify the required type of display upon allocating the display, with MdispAlloc().

Windowed display

An image buffer selected to a windowed display is presented within a window on the Windows desktop screen(s). To choose a windowed display, set the InitFlag parameter of MdispAlloc() to M_WINDOWED.

Windowed displays can be presented on a desktop that is displayed using one screen or multiple screens. We refer to these screens, either one or many, as the Windows desktop screen(s). Your desktop can be extended over screens at different resolutions.

All windowed displays are displayed in their own MIL default window (or, as discussed later, in a user-allocated window). This window is transparently tracked and updated with the image buffer selected to the display; that is, if the window moves or is occluded, the window is automatically updated with the image buffer accordingly.

Multiple windowed displays can be allocated and selected for display.

The display's device number should always be set to M_DEFAULT. Based on the specified format, MIL will find the best device to use when displaying an image.

For windowed displays, the display format parameter of MdispAlloc() is ignored. When you select an image buffer to a windowed display, Windows will create a display that has the same size as the image, unless such a display would not fit on the Windows desktop or would be too small. If the image is too large to fit in the largest possible window at the resolution of the selected display, the top-left corner of the image will be aligned with the top-left corner of the largest possible window, and the right and bottom portion of the image, the part that exceeds the window, will not be displayed; to view the missing portions of the image, you can pan the displayed image (see the Panning and zooming section later in this chapter for more information). If the image is smaller in size than the smallest possible window, the image will be centered in the smallest possible window, and the surrounding area will be filled with the background color (MdispControl() with M_BACKGROUND_COLOR). If the window is enlarged or maximized, the image will remain the same size and centered.

For windowed displays, MIL does not typically communicate directly with the graphics controller, but uses the normal Windows mechanisms to display images. Upon selecting a windowed display, MIL uses internal image buffers to store the selected image buffer and overlay information; it then uses either Windows GDI functions or a Windows Direct3D surface for the final blit to screen.

When allocating a windowed display for a Distributed MIL application, you can set the SystemId parameter to a remote system. Image buffers selected to such a display are presented on the local computer by default. However, if required, you can allocate the display so that image buffers are presented on the remote computer. For more information on allocating such a display, see Chapter 29: Distributed MIL.

Exclusive display

An image selected to an exclusive display is presented full-screen, without a windowed border or frame, on one of the Windows desktop screens. The image buffer is presented at the center of the screen. This screen is referred to as an exclusive screen.

Exclusive displays work with any graphic controller and are compatible with all video hardware acceleration modes.

To use an exclusive display, your Windows desktop should be using more than one screen. Allocating an exclusive display on the main screen might not be convenient; if you do so, the MIL exclusive display will hide third-party applications designed to start on the main screen and hide the Windows taskbar.

When allocating an exclusive display using MdispAlloc(), you can set the display number parameter of MdispAlloc() to M_DEFAULT, or to the position of the display device in a 3x3 multi-screen arrangement. For exclusive displays, M_DEFAULT will select the best available screen, avoiding the main desktop screen if possible. In screen arrangements of up to 3x3 screens, you can select the display device by specifying its position in the arrangement; you can specify that the screen is at the bottom, top, left, right, and/or center of the multi-screen arrangement (for example, M_BOTTOM + M_RIGHT).

Additionally, when allocating an exclusive display using MdispAlloc(), you must specify the required video output format for the screen. You can set it to the current Windows resolution for the screen (M_CURRENT_RESOLUTION) or you can select a video configuration format (VCF) with the required resolution. If the image is too large to fit on screen given the selected display resolution, the top-left corner of the image will be aligned with the top-left corner of the screen, and the right and bottom portion of the image, the part that exceeds the screen area, will not be displayed; to view the missing portions of the image, you can pan the displayed image (see the Panning and zooming section later in this chapter for more information). If the image is smaller in size than the screen area, the image will be centered on screen, and the surrounding area will be filled with the background color (MdispControl() with M_BACKGROUND_COLOR).

By default, the mouse cursor cannot move over an exclusive display; however, you can remove this restriction using MdispControl() with M_RESTRICT_CURSOR. In addition, by default, the display reacts to standard key strokes, but you can disable this behavior using MdispControl() with M_KEYBOARD_USE.

For exclusive displays, MIL does not typically communicate directly with the graphics controller, but uses the normal Windows mechanisms to display images. Upon selecting an exclusive display, MIL uses internal image buffers to store the selected image buffer and overlay information; it then uses either Windows GDI functions or a Windows Direct3D surface for the final blit to screen.

When allocating an exclusive display for a Distributed MIL application, you can set the SystemId parameter to a remote system. Image buffers selected to such a display are presented on the local computer by default. However, if required, you can allocate the display so that image buffers are presented on the remote computer. For more information on allocating such a display, see Chapter 29: Distributed MIL.

If only using one screen, you can hook a function to a keypress or mouse movement, using MdispHookFunction() with either M_KEY... or M_MOUSE.... Once the display event occurs, the exclusive display could be freed to allow the user to perform other work on the single screen.

Auxiliary display

An image selected to an auxiliary display is presented without a windowed border or frame, at the top-left corner of a screen that is not used to display the Windows desktop. This screen is referred to as an auxiliary screen.

Note that in this context, the term screen refers to any device that supports video output data, such as a high-resolution monitor, TV, or VCR.

Auxiliary displays are only supported for a few imaging boards and only if the imaging board has a display section (for example, Matrox Vio).

To use an auxiliary display, allocate the display using MdispAlloc() with its InitFlag parameter set to M_AUXILIARY. You can only allocate one auxiliary display at a time on a given auxiliary screen.

When allocating an auxiliary display, you must specify the required video output format of the screen. In general, you must set the display format to a supported high resolution format (for example, 1024x768x32@70hz). To output using the encoder in the on-board display section of a Matrox imaging board, set the display format to an encoded video format (for example, NTSC/PAL). For example:

MdispAlloc(MilSystem, M_DEFAULT, MIL_TEXT("M_NTSC"), M_AUXILIARY, &MilDisplay1);
MdispAlloc(MilSystem, M_DEFAULT, MIL_TEXT("1024x768x32@70"), M_AUXILIARY, &MilDisplay2);

The maximum number of auxiliary displays that can be allocated is determined by limitations of your imaging boards. For example, two auxiliary displays with high-resolution formats can only be allocated if there are two independent video output connectors on your imaging board that support high-resolution formats.

For auxiliary displays, the display's device number should always be set to M_DEFAULT.

When allocating an auxiliary display for a Distributed MIL application, you can set the SystemId parameter to a remote system. Image buffers selected to such a display are presented on the local computer by default. However, if required, you can allocate the display so that image buffers are presented on the remote computer. For more information on allocating such a display, see Chapter 29: Distributed MIL.

Network display

An image selected to a network display is published on the network so that image buffers selected to the display can be viewed from any remote computer on your network in, for example, a web browser. In this case, there are no special requirements for the remote computer; you don't need to install MIL, a MIL license, nor the Distributed MIL server on it. An application interface (for example, a web page) must be created to view the display.

To choose a network display, set the display number parameter of MdispAlloc() to M_DEFAULT and the InitFlag parameter to M_NETWORK. In addition, select an appropriate format for the display. For more information, see MdispAlloc().

For information on how to view a network display in your web browser, see the MIL system's Hardware-specifc Notes chapter.