Microsoft DirectX 8.1 (C++)

DIDEVICEIMAGEINFO

Carries information required to display a device image or an overlay image with a callout. This structure is passed to the IDirectInputDevice8::GetImageInfo method as an array within a DIDEVICEIMAGEINFOHEADER structure.

typedef struct _DIDDEVICEIMAGEINFO {
    TCHAR  tszImagePath[MAX_PATH];
    DWORD  dwFlags;
    // The following are valid if DIDIFT_OVERLAY is present
    // in dwFlags
    DWORD  dwViewID; 
    RECT   rcOverlay; 
    DWORD  dwObjID; 
    DWORD  dwcValidPts;
    POINT  rgptCalloutLine[5];
    RECT   rcCalloutRect;
    DWORD  dwTextAlign;
} DIDEVICEIMAGEINFO, * LPDIDEVICEIMAGEINFO;

Members

tszImagePath
Fully qualified path to the file that contains an image of the device. The file format is given in dwFlags. If no image is available for the device, this member will be set to NULL. If so, the application is responsible for enumerating controls on the device and displaying a default listing of actions to device controls (similar to the method used by most applications before Microsoft® DirectX® 8.0).
dwFlags
Flag that describes the intended use of the image.
DIDIFT_CONFIGURATION
The file is used to display the current configuration of actions on the device. Overlay image coordinates are relative to the upper-left corner of the configuration image.
DIDIFT_OVERLAY
The file (if provided) is an overlay for a configuration image. The dwViewID, rcOverlay, dwObjID, rgptCalloutLine, rcCalloutRect, and dwTextAlign members are valid and contain data used to display the overlay and callout information for a single control on the device. If no file is provided (null path string), all other pertinent members are relevant except rcOverlay.
dwViewID
For device view images (DIDIFT_CONFIGURATION), this is the ID of the device view. For device control overlays (DIDIFT_OVERLAY), this value refers to the device view (by ID) over which an image and callout information should be displayed.
rcOverlay
Rectangle, using coordinates relative to the top-left pixel of the device configuration image, in which the overlay image should be painted. This member is valid only if the DIDIFT_OVERLAY flag is present in dwFlags.
dwObjID
Control identifier, as a combination of DIDFT_* flags and an instance value, to which an overlay image corresponds for this device. Applications use the DIDFT_GETINSTANCE and DIDFT_GETTYPE macros to decode this value to its constituent parts. This member is valid only if the DIDIFT_OVERLAY flag is present in dwFlags.
dwcValidPts
Number of points in the array at rgptCalloutLine.
rgptCalloutLine
Array of POINT structures that specify coordinates of the points describing a callout line. A callout line connects a device control to a caption for the game action. Each line can have from one to four segments. This member is valid only if the DIDIFT_OVERLAY flag is present in dwFlags.
rcCalloutRect
RECT structure that describes the rectangle in which the game action string is displayed. If the string cannot fit within the rectangle, the application is responsible for handling clipping. This member is valid only if the DIDIFT_OVERLAY flag is present in dwFlags.
dwTextAlign
DWORD value that specifies the alignment of the text in the rectangle described by the rcCalloutRect member. Must be one horizontal alignment flag combined with one vertical alignment flag.

The following horizontal alignment flags are defined.

DIDAL_LEFTALIGNED
Text is aligned on the left border.
DIDAL_CENTERED
Text is horizontally centered.
DIDAL_RIGHTALIGNED
Text is aligned on the right border.

The following vertical alignment flags are defined.

DIDAL_MIDDLE
The text is vertically centered.
DIDAL_TOPALIGNED
The text is aligned on the top border.
DIDAL_BOTTOMALIGNED
The text is aligned on the bottom border.

This member is valid only if the DIDIFT_OVERLAY flag is present in dwFlags.

Requirements

  Windows NT/2000/XP: Requires Windows 2000.
  Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.
  Header: Declared in Dinput.h.