ImageGear for C and C++ on Windows v19.5 - Updated
IG_GUI_pan_window_create
API Reference Guide > Core Component API Reference > Core Component Functions Reference > GUI Functions > GUI Pan Functions > IG_GUI_pan_window_create

Please use the new upgraded function IG_GUI_pan_window_create_ex(). See the Remarks below.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_GUI_pan_window_create (
        HIGEAR hIGear, 
        DWORD dwGrpID, 
        HWND hWndParent, 
        const LPSTR lpszTitle, 
        INT nX, 
        INT nY, 
        INT nWidth, 
        INT nHeight, 
        HWND FAR* lphWndPan
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image.
dwGrpID DWORD Identifier of group which is used for drawing image in the hWndParent window. New group will be allocated internally for drawing image in the pan window.
hWndParent HWND Handle of Parent window. This function assumes that the Parent window is the image window. If you would like to supply a separate handle for an image window, please use IG_GUI_pan_window_create_ex().
lpszTitle const LPSTR Title of Pan Window.
nX INT X position of upper left corner of window.
nY INT Y position of upper left corner of window.
nWidth INT Width of window.
nHeight INT Height of window.
lphWndPan HWND FAR* Far pointer to HWND object to hold Pan window handle.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

Panning, Display

Example:

See the example for function IG_GUI_pan_track_mouse().

Remarks:

The functionality of this API call has been upgraded and supported by the new function IG_GUI_pan_window_create_ex(). The reason that this new function has been created is that the old function does not allow you to set the Windows style of the pan window, or to specify the handle of the image window. In the interest of backward compatibility, we have left the old function in its original form and have retained support for it. If you have already used the old function in your code, it is not mandatory for you to modify your code, but it is recommended.

This function is called to create a GUI pan window. When the user moves the mouse around in the pan window, your application can pan the specified portion of the image, in the parent image window. See IG_GUI_pan_track_mouse().