LBitmapWindow::SetCursor

#include "ltwrappr.h"

virtual HCURSOR LBitmapWindow::SetCursor(hCursor, uToolType = TOOL_USERMODE)

HCURSOR hCursor;

handle to the new cursor

L_UINT uToolType;

tool type

Sets the cursor for the specified tool type.

Parameter Description
hCursor Handle to the cursor to be used for the specified tool type. This HCURSOR must remain valid until it is no longer needed. No copy is made. Specify NULL to reset the cursor for all tool types to the default cursors.
uToolType Flag that indicates the tool type for which the new cursor will be used. Possible values are:
  Value Meaning
  TOOL_PANIMAGE Set the cursor for the Pan tool.
  TOOL_ZOOMRECT Set the cursor for the Zoom To Rect tool.
  TOOL_ZOOM_ON_MOUSECLICK Set the cursor for the Zoom On Mouse Click tool.
  TOOL_REGION Set the cursor for the Region tool.
  0 Set the cursor for the window.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Specify NULL to reset the cursor for all tool types to the default cursors.

Required DLLs and Libraries

LTKRN

LTWVC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

LBitmapWindow::SetToolType, Class Members

Example

class MyTestBitmapWindow : public LBitmapWindow { 
protected: 
   virtual L_BOOL OnSetCursor(HWND /*hWnd*/, L_UINT /*nHitTest*/, L_UINT /*message*/) 
   { 
      return L_TRUE; 
   } 
}; 
 
L_INT LBitmapWindow__SetCursorExample(HWND hWndParent) 
{ 
   L_INT nRet; 
   MyTestBitmapWindow LeadBitmapWnd ; 
 
   nRet = LeadBitmapWnd.Load(MAKE_IMAGE_PATH(TEXT("IMAGE1.CMP"))); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   if (LeadBitmapWnd.CreateWnd(hWndParent, TRUE, 0, 0, 100, 100) == NULL) 
      return FAILURE; 
 
   LeadBitmapWnd.EnableCallBack(L_TRUE); 
 
   HCURSOR hCursor; 
   hCursor = LeadBitmapWnd.SetCursor(LoadCursor(NULL, IDC_ARROW), TOOL_MAGGLASS); 
 
   return SUCCESS; 
} 
Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help