944,192 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2816
  • C RSS
Jun 22nd, 2005
0

Problem with Win32 Accelerators

Expand Post »
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
Similar Threads
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005
Jun 22nd, 2005
0

Re: Problem with Win32 Accelerators

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

  1. while(GetMessage(&Msg, NULL, 0, 0) > 0)
  2. {
  3. if (!TranslateMDISysAccel(hwndClient, &Msg) &&
  4. !TranslateAccelerator (hwndFrame, hAccel, &Msg) &&
  5. !IsDialogMessage( hwndClient, &Msg ))
  6. {
  7. TranslateMessage(&Msg);
  8. DispatchMessage(&Msg);
  9. }
  10. }
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?
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: My logic must be ALL wrong , help on Average.
Next Thread in C Forum Timeline: installing fonts into C graphics





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC