| | |
Problem with Win32 Accelerators
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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
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.
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?
C Syntax (Toggle Plain Text)
while(GetMessage(&Msg, NULL, 0, 0) > 0) { if (!TranslateMDISysAccel(hwndClient, &Msg) && !TranslateAccelerator (hwndFrame, hAccel, &Msg) && !IsDialogMessage( hwndClient, &Msg )) { TranslateMessage(&Msg); DispatchMessage(&Msg); } }
![]() |
Similar Threads
- fstream Tutorial (C++)
- Help! error LNK2001 & error LNK (C++)
- TMT Pascal Input Console problem (Pascal and Delphi)
- Why program works in Dev-C++ and not in VC++ 2005? (C++)
- Will more RAM help? (Motherboards, CPUs and RAM)
- A problem with transparency in Win32 controls (C)
- Prog to list ASCII codes (beginners' stuff) (C)
Other Threads in the C Forum
- Previous Thread: My logic must be ALL wrong , help on Average.
- Next Thread: installing fonts into C graphics
| Thread Tools | Search this Thread |
#include adobe ansi api append array arrays asterisks binarysearch changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc csyntax database directory dynamic execv feet fgets file fork framework frequency function getlasterror givemetehcodez global grade gtkgcurlcompiling hacking hardware highest histogram include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list lists locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue number odf opensource overwrite owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scripting segmentationfault sequential socket socketprograming standard string systemcall testing threads turboc unix user voidmain() wab windows.h windowsapi






