Hello,
I am developing an application in Win32, ( No MFC at all ). It is an MDI application, and I am using Keyboard accelerators. The Keys that I have assigned for accelerators are working properly, but when I press something that is not an accelerator, such as Ctrl + F ( which is not an accelerator in my program ), the application freezes. Also I am using the tab key to move between child windows in the MDI child documents, and these are also working properly.

Any idea why this can happen? The code is a bit lengthy so i will not post it. If you can give me any suggestion, that alone will help.

Thanks

It seems that the problem was with the use of IsDialogMessage( ) in the following loop.

while(GetMessage(&Msg, NULL, 0, 0) > 0)
	{
		if (!TranslateMDISysAccel(hwndClient, &Msg) && 
			!TranslateAccelerator (hwndFrame, hAccel, &Msg) &&
			!IsDialogMessage( hwndClient, &Msg ))
		{
			TranslateMessage(&Msg);
			DispatchMessage(&Msg);
		}
	}

After I commented it out, the problem with accelerators was gone. But then obviously, I cant move among the child windows of an MDI Child Window without the IsDialogMessage() function. Any recommendations on how to solve this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.