I want to use windows raw input to enable two mice input on one computer.
However, I failed to figure out how to get the WM_INPUT message. It seems to get the message, I need to do this:
MainWndProc (HWND hwnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
{
switch (nMsg)
{
...
case WM_INPUT:
{
GetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &dwSize,
sizeof(RAWINPUTHEADER));
.............
}
}
I think the OpenSceneGraph window should be a window's type,but how can I get the WM_INPUT message without using MainWndProc?
It seems I cannot get WM_INPUT message like this:
bool CallbackManager::handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
{
if(ea.getEventType() == WM_INPUT)
Then should I get the windows handle and how to?