mikle081198
asked on
How to get CHotKeyCtrl text?
I want to show in my app title hotkey text (for example "Ctrl+F12") but could not obtain it from CHotKeyCtrl. How can i do this?
ASKER
Unfortunately neither GetWindowText nor DetDlgItemText does not work. :(
If GetWindowText doesn't work, then probably you can't get the text from it (HotKey is probably using an internal variable to store the text rather then the window text). But what you can do is get the virtual key code using GetHotKey and interpret it yourself to generate the caption text.
ASKER
Yes i can do it but i'm searching more direct method, without interpreting hotkey value.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As I see there is no direct way to get this text so I have to accept this answer.
to get the text from a hot key control using the GetWindowText member
CString strText ;
m_hotKey.GetWindowText( strText ) ;
CHotKeyCtrl derives off CWnd, so all the CWnd members exist for it too...(such as GetWindowText)