Archived

This topic is now archived and is closed to further replies.

tomwindcloud

How to show cursor When Fullscreen???

Recommended Posts

I know i can show cursor with m_bShowCursorWhenFullscreen is true(i use D3DApp framework ). But if i use mfc (eg, in the demo Mfcfog example), even if i set bShowCursorWhenFullscreen TRUE, i can''t display cursor when fullscreen, why?????? I think the reason is that i use MFC , but unfortunately i must use MFC, how to do it???

Share this post


Link to post
Share on other sites
The MFC Fog sample is coded incorrectly to make use of the D3D device cursor that the common source sample classes set up.

That''s because it uses its own fullscreen wndproc (FullScreenWndProc) to process msgs. This function does not pass the msgs to the inherited class''s MsgProc function, but directly to Window''s DefWndProc. So, the code in the CD3DApplication MsgProc that would get a D3D device cursor displayed is never called.

The easiest way to get a cursor in fullscreen mode, for this app, is to just comment out the "SetCursor( NULL );" line in the FullScreenWndProc function found in fog.cpp. This will be the hardware GDI cursor, not the D3D device cursor, but at least it''s a cursor .

Share this post


Link to post
Share on other sites