Raw Input: how use it?

i'm trying understand the Raw Input for testing what devices are connected.
1 - i must regist for use the WM_INPUT and WM_INPUT_DEVICE_CHANGE messages...
1
2
3
4
5
6
7
8
9
RAWINPUTDEVICE rid;

                    rid.usUsagePage = 1 ;
                    rid.usUsage     = 4; // Joystick
                    rid.dwFlags     = 0x00002000;
                    rid.hwndTarget  = inst->hwnd;

                    if(!RegisterRawInputDevices(&rid, 1, sizeof(RAWINPUTDEVICE)))
                        SetWindowText(inst->hwnd,"error");

i have 1 question: why only joystick? ... the devices list is big.
confused: the WM_INPUT and WM_INPUT_DEVICE_CHANGE messages are, only, activated when the device is connected\desconnected or ,too, when i use the device?
Last edited on
Topic archived. No new replies allowed.