WM_INPUT / RIM_INPUTSINK: Should we call DefWindowProc()?

2 weeks ago 21
ARTICLE AD BOX

I am writing a native Win32 app. The WndProc() looks like this:

static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { // ... case WM_INPUT: switch (GET_RAWINPUT_CODE_WPARAM(wParam)) { case RIM_INPUT: /* do stuff */ break; // according to docs case RIM_INPUTSINK: /* do stuff */ WHAT_TO_DO } break; // ... } return DefWindowProcW(hwnd, msg, wParam, lParam); }

In the WM_INPUT handler what to do in case of RIM_INPUTSINK?

break;, i.e. call DefWindowProcW(), or return 0;?

Does it matter, if /* do stuff */ includes SendMessageW(hwnd, WM_CLOSE, 0, 0);?

Read Entire Article