Also a quick warning before I forget, you shouldn't just handle WM_KEYDOWN and WM_KEYUP, but also WM_SYSKEYDOWN and WM_SYSKEYUP (you can treat those latter two the same way as the former two, really). The main difference is that the latter trigger when you press F10 or Alt with another key (i.e. the shortcuts that would trigger the menubar). Make sure you're handling all four events, not just the first two.
EDIT: also that's what I get for not paying attention, thought the two posts were from the same user =P (which happens quite often too...)