Sets the cursor for the specified tool type.
#include "ltwrappr.h"
virtual HCURSOR LBitmapWindow::SetCursor(hCursor, uToolType = TOOL_USERMODE)
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.
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. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Specify NULL to reset the cursor for all tool types to the default cursors.
Win32, x64.
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document