Click here to Skip to main content
16,004,529 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Why creating my accelerator table resource in visual studio was I choose ascii character as the primary character, the prefix part of the table gives me only ALT option. Also, wanted to use CTRL + P for printing, but the table will not give me a CTRL option when I choose letter p as the primary key. I ended up using mostly function keys. How can I remedy this?

What I have tried:

I tried hard to figure out the problem by reading documentation onlone.
Posted
Comments
Gbenbam 9-Jul-24 6:35am    
@RichardMacCutchan, I saw a mail that you commented on this question,but I can't see the comment here.
Richard MacCutchan 9-Jul-24 15:44pm    
Sorry, I tried it earlier by selecting <CTRL> first, and then selecting the letter P, and ASCII. It appears to work, but /i did not test it myself. Maybe I'll get time tomorrow.
Gbenbam 9-Jul-24 7:51am    
@RichardMacCutchan, I was able to add CTRL to P only when I specified it
as a VIRTUAL key. I have always believed that letters of the English alphabets should be stated as ASCII keys. Is that not the case?

Help us help you. What OS, version of OS, and version of Visual Studio?
 
Share this answer
 
Comments
Gbenbam 9-Jul-24 7:40am    
Wndows 11, visual. studio 2022.
All keys that are defined as combinations with modifier keys must be declared as virtual keys (VIRTKEY). Virtual keys are an abstraction of the physical keys on a keyboard and are represented by a unique numeric ID such as ID_FILE_PRINT. The entry in the resource file could look like this:
"^p", ID_FILE_PRINT, VIRTKEY, CONTROL
 
Share this answer
 
Comments
Gbenbam 9-Jul-24 18:25pm    
Why ^p and not P ?

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