LBitmapWindow::MagGlassCallBack

Summary

Handles the WM_LBUTTONDOWN, WM_LBUTTONUP and WM_MOUSEMOVE messages received by the window to which the Magnifying Glass is attached.

Syntax

#include "ltwrappr.h"

virtual L_INT LBitmapWindow::MagGlassCallBack(hWnd, nMaskPlaneStart, nMaskPlaneEnd, pMaskPlane, nMaskPlaneSize)

Parameters

HWND hWnd

Handle of the window to which the Magnifying Glass is attached.

L_INT nMaskPlaneStart

The start position of the mask plane array.

L_INT nMaskPlaneEnd

The end position of the mask plane array.

L_UCHAR *pMaskPlane

An array of bit flags which represents a mask plane. This array works as a plane for the parts of the bitmap that are not yet updated.

L_SIZE_T nMaskPlaneSize

The size of the bit flags array in bytes.

Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This is an optional callback function is called for each WM_LBUTTONDOWN, WM_MOUSEMOVE and WM_LBUTTONUP message received by the window to which the magnifying glass is attached.

In order to use this callback function, you must call LBitmapWindow::SetToolType, and also you must override [LBitmapWindow:MagGlassCallBack. Once that is done, information about the non-updated parts of the bitmap can be obtained from this callback function, in the pMaskPlane parameter. This callback function receives information when the left mouse button is pressed or released and when the mouse is moved while the left mouse button is pressed.

The information received by this function can be passed to the LEADTOOLS Internet functions to get pixel values of the non-updated parts of the bitmap.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

/*<struct>*/ 
#if defined(MyAnnStamp) 
class MyBitmapWindow : public LBitmapWindow 
{ 
public:  
   L_INT MagGlassCallback (HWND hWnd, L_INT nMaskPlaneStart, L_INT nMaskPlaneEnd, L_UCHAR  *pMaskPlane, L_INT nMaskPlaneSize);  
}; 
#endif 
/*</struct>*/ 
 
L_INT MyBitmapWindow::MagGlassCallback (HWND hWnd, L_INT nMaskPlaneStart, L_INT nMaskPlaneEnd, L_UCHAR  *pMaskPlane, L_INT nMaskPlaneSize)  
{ 
   UNREFERENCED_PARAMETER(pMaskPlane); 
   UNREFERENCED_PARAMETER(nMaskPlaneEnd); 
   UNREFERENCED_PARAMETER(nMaskPlaneSize); 
   UNREFERENCED_PARAMETER(nMaskPlaneStart); 
   UNREFERENCED_PARAMETER(hWnd); 
 
   // .. Write your code here.  
   return SUCCESS;  
} 
 
 
L_INT LBitmapWindow__MagGlassCallBackExample(MyBitmapWindow *LeadBWnd )  
{ 
 
   LeadBWnd->EnableCallBack(TRUE);  
   LeadBWnd->LBitmapWindow::SetToolType(TOOL_MAGGLASS) ;  
    
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.