first of all, dont tell me to use a resource editor, i like run time stuff okay?
second, here's the problem: i cant get accelerators to work when i add them at run time.
what i do is allocate memory for however many ACCEL structures i require. ie,
then i use LocalLock to obtain a pointer, put some data in:
and then create the table.
All throughout, i have been checking each function for error return values, but everything seems to be running perfectly.
then i add this to the message loop:
and put some capturing code in WM_COMMAND. by the way, there are no child windows in this program, so i dont need to subclass or anything to get the accelerator message.
while(GetMessage(&Msg, NULL, 0, 0) > 0)
if(!TranslateAccelerator(Msg.hwnd, accTable, &Msg))
something is not right, because spy++ shows that no message is being sent for the accelerator, just the usual bunch of keydown and keyup messages. how do i fix it?