cursors and icons...
Hello,
How can I define my own cursor with openGL?
How can I apply an icon to my window?(I think it''s perhaps not an openGL function...)
Thanks
ju
The icon and cursor can be done using the win32 api, not sure exactly how....
But the cursor can also be done in opengl using a textured quad. Bassicly you hide the windows cursor, then you read the mouse coordinates from the windows message loop and you dra your textured quad at that location.
But the cursor can also be done in opengl using a textured quad. Bassicly you hide the windows cursor, then you read the mouse coordinates from the windows message loop and you dra your textured quad at that location.
Its a win32 resource thing. Its not too hard to do, just mess around with MVC++''s resource thing-a-mah-jiggers (my command of the English language is sometime bewildering )
------------------------------
Trent (ShiningKnight)
E-mail me
"Whoso is a man, is a nonconformist"
--Ralph Waldo Emerson
------------------------------
Trent (ShiningKnight)
E-mail me
"Whoso is a man, is a nonconformist"
--Ralph Waldo Emerson
just create a cursor in Microangelo( or other cursor maker).
then jsut use this command....
HCURSOR mycursor=LoadCursorFromFile("mycursor.cur";
when you want to display it use..
SetCursor(mycursor)
when you want the arrow back do this...
SetCursor(IDC_ARROW);
it *CAN* be an animated cursor too.
then jsut use this command....
HCURSOR mycursor=LoadCursorFromFile("mycursor.cur";
when you want to display it use..
SetCursor(mycursor)
when you want the arrow back do this...
SetCursor(IDC_ARROW);
it *CAN* be an animated cursor too.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement