Hey all,
I wanted to ask if there is anyway to change my cursor to a custom one i made?
Thanks
Cursor
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
You will need to add these lines to your WinMain function:
then you create a new resource script file in your project and add the cursor to it and then a resource.h file and add it to the project. This works in MS VC++6, if you're using Dev C++ then I don't know what to do.
Code: Select all
WNDCLASS wcex;
wcex.hCursor = LoadCursor(NULL, "YOUR_CURSOR_FILE_NAME.cur");
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
BTW, you do the same thing to add an icon to your project that will show up on the executable file. Except you do a
Code: Select all
wcex.hIcon = LoadIcon(NULL, "YOUR_ICON_FILE_NAME.ico");
It is already an option in 0.41.
Tutorial 6 has more info on 2D graphics and has a good way of making an animated cursor.
Code: Select all
//do this once
device->getCursorControl()->setVisible(false);
video::ITexture* myCursorPic= driver->getTexture("../../media/2ddemo.bmp");
core::rect<s32> cursorRect(1,1,32,32);
//do this in your draw loop - psuedocode used for locations
driver->draw2DImage(myCursorPic, core::position2d<s32>(CursorLoc.X,CursorLoc.Z), cursorRect, 0, video::SColor(255,255,255,255), true);
Crud, how do I do this again?