Subj : Re: CTRL key To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Sat Jul 17 2004 08:33 pm mike wrote: >> Why not intercept WM_CHAR or WM_KEYDOWN? > >Because they only allow for a single key to be pressed. i wanted a >combination of 2 keys. CTRL-x > Place this code in your message loop: case WM_CHAR: { char msg[1024]; wsprintf( msg, "chCharCode = 0x%X\r\nlKeyData = 0x%x\r\n", wParam, lParam ); MessageBox( hWnd, msg, "WM_CHAR", MB_OK|MB_TOPMOST ); return 1; /* let windows process it too */ } For Ctrl-X ........ nVirtKey = 0x18 lKeyData = 0x2d0001 For Ctrl-A...... nVirtKey = 0x1 lKeyData = 0x1e0001 For Ctrl-S...... nVirtKey = 0x13 lKeyData = 0x1f0001 .