Advertisement

Showing the mouse cursor

Started by September 25, 2001 11:19 AM
12 comments, last by Eber Kain 23 years, 4 months ago
Now I have been codeing with OpenGL for some time, and ive only recently broke down and learned Win32 API stuff (been useing glut), My question is, how can I display the windows mouse cursor when I enter full screen, I replaced my own commands that had anything to do with the mouse with nehe''s, but the normal ShowCursor(true) dosent work. I could draw a cursor with gl, and use an ortho perspective the size of the window, but displaying the default cursor would have to run faster than makeing those state changes. I also thought of useing glDrawPixels(), but that might be even slower than rendering a single textured poly.
www.EberKain.comThere it is, Television, Look Listen Kneel Pray.
Sorry...

Thanks!
John William Blair


"The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of the darkness. For he is truly his brother''s keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee."


Advertisement
Sorry!!

Thanks!
John William Blair


"The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of the darkness. For he is truly his brother''s keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee."



http://members.home.com/chucklez/wtc/memorialsmall.gif
Stop it...

You know it is possible to delete your messages, just click the "Edit" link in the upper-right corner of a post and check the "delete this message" checkbox, then click the "modify" button.
???
www.EberKain.comThere it is, Television, Look Listen Kneel Pray.
turns off the mouse cursor
ShowCursor(FALSE);

and

turns on the mouse cursor
ShowCursor(TRUE);
-=[Megahertz]=-
Advertisement
Well, if you''re not getting a cursor when you send a call to ShowCursor(true), then you might want to check where you declare the WNDClass for your window. There should be a parameter that you set, hCursor (I believe), that stores a handle to the cursor to use for that window. If you''re setting that to NULL, then you''ll not get a cursor when you call ShowCursor(true). If you are already setting that to a cursor handle, then I''m not sure what''s going on. I''m not sure how to change the cursor afterwords either.

J.W.
Yeah, im doing this

wc.hCursor = LoadCursor(NULL,IDC_ARROW);

And yes i call the function ShowCursor(true);

and no, i dont see a cursor.
www.EberKain.comThere it is, Television, Look Listen Kneel Pray.
Oops, didnt read the part where you alredy tried that, sorry for suggesting something you already tried. =/

-=[ Megahertz ]=-
-=[Megahertz]=-
Ok... One last thing to check. According to MSDN ShowCursor() updates an internal display counter, which when >= 0 the cursor will be shown, and when < 0 the cursor won''t be shown. The current value of this display counter is the return value of ShowCursor(), so I would suggest checking that value, to see if it''s really trying to display the cursor. If that doesn''t shed any light on the situation, then I don''t know what to check from there.

Good luck,

j.w.

This topic is closed to new replies.

Advertisement