Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For one of my static control named as pageNo(&1 to 300).Here my intention is I want to use 1 as short cut(Alt + 1)key.whenever user presses 1 the cursor will be in edit box corresponding to pageNo(&1 to 300) static box,but cursor is not coming.Tab control is fine.

please answer my question.

What I have tried:

C++
void CTest::onRadWrite()
{
  CString SetCaption = " ";
  Setcaption = "Page No(&1 to 300)";
 GetDlgItem(IDC_STC_ADDR)->SetWindowText(Setcaption);
}
Posted
Updated 2-Oct-16 22:55pm
v2
Comments
Richard MacCutchan 3-Oct-16 5:09am    
Have you set the details in your accelerator table?
manikanta3 4-Oct-16 9:39am    
Thanks to suvendu shekhar giri,I didn't understand why you added "&" in pageNo(&1 to 300),but I used "A" as one shortcut in button control.usually if you use same letter as a shortcut in more control's,cursor won't goes to either of them.but here if i press (Alt + a) cursor moving to pageNo edit box

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