I dont understand why the cursor is hidden?

Started by
9 comments, last by jrh2365 11 years, 1 month ago

this is the source code name "NetworkGameSkeletonSource"

ive compiled it fine and when it runs the cursor is not showing?

:)
Advertisement

Your source code didn't load, I'd be interested to see how you created your window.

Perception is when one imagination clashes with another
I googled it, and it looks like someone's example framework. Most likely, the author just told the program not to show the cursor. Do a search in the source code for the word cursor, and look for the line where they set the cursor visibility to be false.

In XNA GS the line would contain IsMouseVisible = false. Comment it out, or change it to = true;
HWND CreateFullscreenWindow( HINSTANCE hInstance, LPCSTR strClassName, LPCSTR strWindowTitle )
{
// Create the window
return CreateWindow( strClassName, strWindowTitle, WS_POPUP | WS_SYSMENU | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, GetSystemMetrics( SM_CXSCREEN ),
GetSystemMetrics( SM_CYSCREEN ), GetDesktopWindow(), NULL,
hInstance, NULL );
}
:)
It's native windows + D3D? Look for a function called SetCursor(false) and change it. Or WhateverD3DDeviceIsCalled->ShowCursor(false);

i did look for them also , i could not find them in the source , btw thx for the fast replys

should the cursor be hidden even tho this is set , d3dpp.Windowed = FALSE;

:)

When creating your WNDCLASSEX, have you setup this member? wClass.hCursor=LoadCursor(NULL,IDC_ARROW);

Perception is when one imagination clashes with another
// Register a standard window class
WNDCLASS wc = { 0, WndProc, 0, 0, hInstance,
LoadIcon( hInstance, MAKEINTRESOURCE(IDI_MAINICON) ),
LoadCursor( NULL, IDC_ARROW ),
(HBRUSH)GetStockObject(WHITE_BRUSH),
NULL, "wnd_ngsunseen" };
RegisterClass( &wc );
:)

Add this to your initialize method before base.initialize

this.IsMouseVisible = true;

Add this to your initialize method before base.initialize

this.IsMouseVisible = true;

Ummm - this is native Win32 code we're talking about here. There is no "base", no "base.initialize", etc.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement