Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


I dont understand why the cursor is hidden?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 Anddos   Members   -  Reputation: 515

Like
0Likes
Like

Posted 11 March 2013 - 11:23 AM

this is the source code name "NetworkGameSkeletonSource"

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


:)

Sponsor:

#2 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 11 March 2013 - 11:29 AM

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

#3 MrDaaark   Members   -  Reputation: 3555

Like
0Likes
Like

Posted 11 March 2013 - 11:33 AM

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;

#4 Anddos   Members   -  Reputation: 515

Like
0Likes
Like

Posted 11 March 2013 - 11:33 AM

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 );
 
}

:)

#5 MrDaaark   Members   -  Reputation: 3555

Like
0Likes
Like

Posted 11 March 2013 - 11:36 AM

It's native windows + D3D? Look for a function called SetCursor(false) and change it. Or WhateverD3DDeviceIsCalled->ShowCursor(false);

#6 Anddos   Members   -  Reputation: 515

Like
0Likes
Like

Posted 11 March 2013 - 11:43 AM

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;


Edited by Anddos, 11 March 2013 - 11:47 AM.

:)

#7 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 11 March 2013 - 12:25 PM

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


Perception is when one imagination clashes with another

#8 Anddos   Members   -  Reputation: 515

Like
0Likes
Like

Posted 11 March 2013 - 12:38 PM

  // 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 );

:)

#9 JordanOsborne   Members   -  Reputation: 131

Like
-1Likes
Like

Posted 11 March 2013 - 12:50 PM

Add this to your initialize method before base.initialize

 

this.IsMouseVisible = true;



#10 mhagain   Crossbones+   -  Reputation: 8269

Like
0Likes
Like

Posted 11 March 2013 - 01:35 PM

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.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#11 /Jeff/   Members   -  Reputation: 652

Like
0Likes
Like

Posted 11 March 2013 - 05:13 PM

It's most likely caused by this line:

 

FAILED( pMouse->SetCooperativeLevel( hWnd,
            DISCL_FOREGROUND|DISCL_EXCLUSIVE ) ) )

 

See the documentation on SetCooperativeLevel here: http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.idirectinputdevice8.idirectinputdevice8.setcooperativelevel(v=vs.85).aspx

 

If the system mouse is acquired in exclusive mode, the pointer is removed from the screen until the device is unacquired. This applies only to a mouse created by passing GUID_SysMouse to IDirectInput8::CreateDevice.


Edited by jrh2365, 11 March 2013 - 05:13 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS