M_CalcRect

#include "BIDISP.H"

 

VOID CALLBACK M_CalcRect( int               X,
int               Y,
LPRECT     lpScale,
LPRECT     lpOut)

Description

This function should be called in response to the WM_MOUSEMOVE message or whenever one wants to update the magnifying window. This function calling sequence should be:

1, M_CalcRect() calculate area of bitmap to be displayed.

2, M_StretchBitmap() stretch the bitmap into a background bitmap.

3, M_CopyBitmap() copy the bitmap into a magnifying window.

Having three separate function calls for displaying the magnified bitmap will enable us to build custom and more elaborate magnifying windows in the future.

Parameters

int

X

The magnifying window top left X coordinate in screen coordinate.

int

Y

The magnifying window top left Y coordinate in screen coordinate.

LPRECT

lpScale

Scaling factor for magnification. For more details on how scaling is computed, see DisplayDIBStart().

LPRECT

lpOut

The newly calculated bitmap area. Use this output value as width and height in M_StretchBitmap() function.

Return values

None.

Requirements

Header :     Declared in BIDisp.h; include BIDisp.h.

Library :    Use BIDisp.lib.

DLLs :       BIDisp.dll.