Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The cleanest way to handle a repacked message is to revise your code so that it extracts needed information and stores it in local variables. This localizes message-packing issues to a few lines of your code.
For example, you can use the following code to handle the WM_COMMAND message:
case WM_COMMAND:
id = LOWORD(wParam);
hwndChild = (HWND)(UINT)lParam;
cmd = HIWORD(wParam);