Custom Cursor?
I would like the cursor to show in my fullscreen DirectX 8 program. If possible, I would like to load the cursor from an external source (bmp, jpg, ect...). I would appreciate any information on this subject. Thank you for your time.
I do not own that book. Is there a way for my program to just use the default windows cursor?
Yep.
I haven''t tried it but m_pd3dDevice->ShowCursor( TRUE ), where m_pd3dDevice is a valid IDirect3DDevice9 interface should do the trick.
It''s all in the SDK documentation.
I haven''t tried it but m_pd3dDevice->ShowCursor( TRUE ), where m_pd3dDevice is a valid IDirect3DDevice9 interface should do the trick.
It''s all in the SDK documentation.
I''m using 8, but it should have the same function. I''ll try that. Thank you for your reply.
It doesn''t seem to be working... It should go in my Init code after I create the IDirect3DDevice8 object, right? Does it matter what WindowClass.hCursor is? Currently, I''ve set it to NULL.
Actually, I don''t think that putting it in init will do the job. You should put in the message loop in the handler of WM_SETCURSOR.
(from the SDK docs) :
(from the SDK docs) :
case WM_SETCURSOR: // Turn off window cursor SetCursor( NULL ); m_pd3dDevice->ShowCursor( TRUE ); return TRUE; // prevent Windows from setting cursor to window class cursorbreak;
Wow! That''s too easy! I remember making a surface for the cursor (2d sprite technique) and having to use directinput to handle it.. i guess Microsoft made a good wrapper for diectx since dx7
I think you still have to use directInput to capture the movement of the mouse and call SetCursorPosition.
Also, if you want a custom bitmap you still need to call SetCursorProperties and give it a pointer to a surface you created earlier.
The real question is :
why am I answering a question about something I know absolutely nothing about?
Also, if you want a custom bitmap you still need to call SetCursorProperties and give it a pointer to a surface you created earlier.
The real question is :
why am I answering a question about something I know absolutely nothing about?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement