Thanks! I had the same problem and the solution of VictorN worked for me:

I simply added:

MESSAGE_HANDLER(WM_GETDLGCODE, OnGetDlgCode)

and

LRESULT OnGetDlgCode( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
{
return DLGC_WANTALLKEYS;
}