DX11 Fullscreen and Mouse Issue

Started by
1 comment, last by Psychopathetica 4 years, 4 months ago

This is probably a basic issue that can easily by solved. But for me, it's been an issue for quite some time now. Anytime I make a fullscreen DX11 program, for some unknown reason, I can mouse hover over anything behind the fullscreen window. Like for example, I'll compile the program in Visual Studio and run it, it'll be fullscreen, but I get the mouse cursor icon changing when hovered over the Visual Studio code window behind it. To make matters worse, if I mouse click the fullscreen app, the entire program seems like it exited and brings up whatever was behind it. But in reality, it is still running in the background. And the only way I can exit the program is if I open up Taskmanager and end the task. It also doesn't appear in my Windows 10 bar at all down below like most other fullscreen applications do. Tried to do Directinput and even Raw input to control the mouse but it still does it. So I want to know three things:

1) How do I make my fullscreen directx11 applicaiton be a real physical window so I'm not clicking things behind it or accidently make it disappear and run in the background?

2) I know Directinput shouldn't be used anymore, and I should use raw input, but how to I take full control of the mouse using Raw Input correctly? Cause whatever I did, I did it wrong.

3) How do I make my fullscreen application end up in the hot bar down below in Windows 10? Only way it seems, is if it is in Windowed mode.

I probably don't need to show my code as the program is pretty hefty in size. Thanks in advance.

Advertisement

Nevermind. I managed to fix the entire program due to a lack of one line of code:

if (gamewindow.fullscreen_enabled == false)
    ShowWindow(game_window.hwnd, nCmdShow);

And since I was always in fullscreen mode, I just removed the if statement. And the fullscreen window actually became solid rather than just stuff drawn on top of other windows (which was why my mouse cursor was changing due to it hovering over certain windows behind my fullscreen application.) Thanks anyways guys.

This topic is closed to new replies.

Advertisement