Board index » cppbuilder » loading a custom cursor file

loading a custom cursor file


2006-03-06 06:53:45 PM
cppbuilder94
Hi there!!
I need to change mouse cursor with a custom "file.cur".
Can you help me?
Thanks a lot!!
Andrea
 
 

Re:loading a custom cursor file

"Bono" < XXXX@XXXXX.COM >wrote:
Quote
Hi there!!
I need to change mouse cursor with a custom "file.cur".
// Load the cursor
HCURSOR hCursor = ::LoadCursorFromFile ("file.cur");
// Use any positive number as a cursor id
const int crMyCursor = 1;
// add cursor to global cursor list
Screen->Cursors[crMyCursor] = hCursor;
// set cursor using the id
Screen->Cursor = crMyCursor;