According to WM_KEYDOWN Message you need to set bit 30 of the LParam to indicate that the previous key is still down.
Try this.
PostMessage(hWnd, WM_KEYDOWN, VK_ALT, 0);
PostMessage(hWnd, WM_KEYDOWN, VK_F, 0x40000000);
nick.crane
Nearly a Posting Virtuoso
1,230 posts since Feb 2010
Reputation Points: 375
Solved Threads: 187