🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Advertisement

Latest winapi Activity

sarahm
December 05, 2021 05:45 PM

The way I register for raw input is

RAWINPUTDEVICE Rid[2];

//    //rawinputdevice for mouse
	Rid[0].usUsagePage = 0x01;
    Rid[0].usUsage = 0x02;
    Rid[0].dwFlags = RIDEV_NOLEGACY;
    Rid[0].hwndTarget = 0;
//
//    //rawinputdevice for keyboard
    Rid[1].usUsagePage = 0x01;
    Rid[1].usUsage…
10,530 views
Advertisement

@21st Century Moose This is the problem… I can't check the HRESULT from the Present() because the program stops WHILE making the Present (I checked this by putting the execution on Pause to see where the principal Thread stopped, and that's how I knew that it was the Present() that made all crash.)…

7,700 views
Airbatz
March 05, 2021 10:37 AM

@endurion 

Thanks for pointing that out. It has since been fixed.  ?

8,614 views
How did MS enumerate the product name for DeviceManager's container?

There are quite a few strings available. Perhaps you want HidD_GetPhysicalDescriptor()?

12,062 views
Show maximized window without hit taskbar

You can specify your exact window position and size when you call CreateWindow, and before that you can get your work area (screen size minus the taskbar wherever it is) using GetMonitorInfo/MONITORINFO.rcWork or SystemParametersInfo/SPI_GETWORKAREA.

5,905 views

Sounds like you are not handling the messages properly, how are your wndProcs looking?

4,868 views
aston2
April 13, 2020 07:27 AM

Thanks Airbatz…

Ok i will try first to translate this program in Oxygen Basic ,and if there work then should work in C too..i hope!

36,685 views

Sometimes there are messages send to windows only, not the process or any hooks so it is required to create the window already handling some of those messages by it's own. I use a message loop like this

WNDCLASSEXA wc;
wc.lpfnWndProc = WndProc;

RegisterClassExA(&wc);
…

LRESULT CALLBACK WndProc…
3,897 views

TL;DR; As I wrote above, I read from the MSDN stuff that you can have either use WMINPUT message but TranslateMessage/DispatchMessage will consume it and remove the QSRAWINPUT flag from the OS queue where the raw input data is stored or you can have GetRawInputBuffer to return try getting stuff fro…

8,072 views
Advertisement
Advertisement