Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I would like to load the cursor's from comctl32.dll i don't know that resource Id.

I am able to load the cursor from comctl32.dll .

But it's creating the new cursor object. Not loading standard or already loaded system cursors.

C++
HMODULE hmod = LoadLibrary (_T("comctl32.dll")) ;
 
HCURSOR current_cursor = ::LoadCursor ( hmod , MAKEINTRESOURCE(102) ) ;
 
ICONINFO current_cursor_icon_info ;
GetIconInfo ( ( HICON ) current_cursor , & current_cursor_icon_info ) ;
 
if ( current_cursor == current_cursor_icon_info.hCursor )
{
//Not succeeding even that cursor is the same.
}
Posted
Updated 31-Jul-14 23:39pm
v3

1 solution

I would prefer the standard way of loading the cursor. It is not a real loading, because the reosurce is cached, you only get the system handle.

Comparing HCURSOR handles is nonsense. The GetcursorInfo function provides info about it.

Else you can open the dll as resource and fetch the id of the cursor. But it may change.

At last you can make own resource in your projecz and load it :-O
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900