• Advertisement
Sign in to follow this  

Directx 9 cursor and menus

This topic is 4419 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been working on a little 3D game with Directx 9 and now I want to add custom cursors and menus to it; Now how would I achieve this? Directx 9 doesn't support 2D anymore so how would I draw my menus or cursor without resorting to DirectDraw?

Share this post


Link to post
Share on other sites
Advertisement
Direct3D supports 2D, you can still draw polygons in 2D screen coordinates, you just do it with textured quads rather than actually drawing images directly to the screen. Look up ID3DXSprite.

Share this post


Link to post
Share on other sites
You can still use good old custom cursors the usual way. Just because it is a DirectX app does not mean you can't.

I am using several I created in a MFC DirectX application. I create it like this:

HCURSOR g_hHandDragCursor = AfxGetApp()->LoadCursor(IDC_CURSOR3);

or in a WIN32 app like so:

HCURSOR g_hHandDragCursor = LoadCursor(hInst, MAKEINTRESOURCE(IDC_CURSOR2));

Then just do:

SetCursor(g_hHandDragCursor);

to change it to one I want.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement