Character messages to windows
Posted on 1998-02-07
What am I doing wrong? I've got a windows app, but I can't get char messages through to it. I've tried using an accelerator table, but that doesn't work either. I'm using TranslateAccelerator and TranslateMessage, and both appear to be succeeding, but the WM_CHAR messages just don't get through.
This a standard Win32 application, using C, with a number of
dialog boxes as the front end. The app starts off (in WinMain):
accel.fVirt = FCONTROL;
accel.key = (int)'s';
accel.cmd = IDM_SWAP;
hAccel = CreateAcceleratorTable(&accel,
if (NULL != hAccel)
if (NULL != CreateDialogParam(StoreDLLInstanceHandle(NULL),
"CreateDialogParam failed due to a GetLastError of %d.\n",
I have in the dialog proc of every window:
"WM_CHAR received by DataCollectionSetupDlgProc, '%c' selected.\n",
None of them ever get invoked - the CHAR messages just aren't getting through.
If this isn't enough info, please let me know, I need this pretty desparately.