I think we need a little more context, e.g. what is wParam, how is this code called, ...

Ginsengelf

edit: also helpful might be what happens and why you think it's wrong...