PANWNDCALLBACK Callback Function
#include "l_bitmap.h"
L_VOID pEXT_CALLBACK YourFunction(hPanWindow, hWndParent, uFlag, prcPan, pUserData)
HWND hPanWindow; |
/* handle to the Pan Window */ |
HWND hWndParent; |
/* handle to the associated main window */ |
L_UINT uFlag; |
/* Pan Window notification flag */ |
LPRECT prcPan; |
/* pointer to the Pan Rect */ |
/* pointer to additional parameters */ |
Called to notify the main window of changes to the associated Pan Window.
Parameter |
Description |
|
hPanWindow |
Handle to the Pan Window which has changed. |
|
hWndParent |
Handle to the associated main window. |
|
uFlag |
Flag indicating the reason for the Pan Window notification. Possible values are: |
|
|
Value |
Meaning |
|
PANWIN_CREATED |
[0] Pan Window was created. |
|
PANWIN_UPDATED |
[1] Pan Window was updated/repainted. |
|
PANWIN_DESTROYED |
[2] Pan Window was destroyed. |
|
PANWIN_MOVED |
[3] Pan Window was moved. |
|
PANWIN_REPAINTED |
[4] Pan Window was repainted. |
prcPan |
Pointer to a RECT that contains the current coordinates of the Pan Rect in 1:1 zoom factor, when uFlag = PANWIN_UPDATED. Otherwise, this will be NULL. You must convert these coordinates to match your main window’s current zoom factor. |
|
pUserData |
A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of the calling function.) |
|
|
Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function. |
Returns
None
Comments
This function will be called when the Pan Window updates itself when responding to end-user input, or when the Pan Window repaints itself after being invalidated.
You can use this callback as a notification that the Pan Window has been updated by the end-user. You can also use this function to do your own custom painting in the Pan Window, for example render annotation objects to the Pan Window using the L_AnnDraw function.
You must set a PANWNDCALLBACK callback function when you create the Pan Window using the L_CreatePanWindow function in order to be notified of updates to the Pan Window.
See Also
Functions: |
Example
For an example, refer to L_CreatePanWindow.