Click here to Skip to main content
16,004,574 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I disable an accelerator item for a menu item that I have disabled?

What I have tried:

Google can't help. I have been thinking hard.
Posted
Updated 15-Jun-24 20:14pm
v5

1 solution

Depends how the accelerator key is programmed. It's it's done through the system then it'll behave as you want.
If you code it yourself in the windows message processing, then it's up to you to check.

Honestly, after 350+ questions you should be getting the hang of this by now ...
 
Share this answer
 
Comments
Gbenbam 16-Jun-24 0:34am    
How I used to go about it is to create an accelerator table in the resource and load accelerators table and ensure the message loop translates my accelerators. That all. I don't do any other thing. That's my understanding of handling accelerators. No extra programming. What will happen if an accelerator is activated for a menu item THAT I PROGRAMATICALLY DISABLED? I hope my question is clearer now. I am sorry, your solution is far from clear. I did not get the message or see the solution.
Gbenbam 16-Jun-24 2:24am    
This question has been superceeded by this question : https://www.codeproject.com/Questions/5383855/How-do-I-disable-an-accelerator-item-for-a-menu-it

Tha new question clearly shows the true intent, unfortunately it appears questions that already have answers cannot be modified.
Richard MacCutchan 16-Jun-24 3:56am    
You can easily modify an existing question by clicking the Improve question link below the exisating post.
OriginalGriff 16-Jun-24 4:25am    
After 350 questions, you'd have hoped he would have worked something for himself by now ... :sigh:
Richard MacCutchan 16-Jun-24 7:46am    
Hope springs eternal in the human breast ... only to be cruelly dashed on the rocks of ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900