Home » U++ Library support » U++ Widgets - General questions or Mixed problems » how to define hot-keys not associated with any menu?
Re: how to define hot-keys not associated with any menu? [message #19990 is a reply to message #19875] |
Sun, 08 February 2009 08:18 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
IMO you can start here:
dword Switch::GetAccessKeys() const
{
dword keys = 0;
for(int i = 0; i < cs.GetCount(); i++)
keys |= AccessKeyBit(cs[i].accesskey);
return keys;
}
void Switch::AssignAccessKeys(dword used)
{
for(int i = 0; i < cs.GetCount(); i++) {
Case& v = cs[i];
if(!v.accesskey) {
v.accesskey = ChooseAccessKey(v.label, used);
if(v.accesskey) Refresh();
used |= AccessKeyBit(v.accesskey);
}
}
Ctrl::AssignAccessKeys(used);
}
Note that U++ normally assigns hotkeys automatically, but you can override that using venerable "&" (ChooseAccessKey takes care about all of that).
Mirek
[Updated on: Sun, 08 February 2009 08:19] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 18 16:37:46 CEST 2024
Total time taken to generate the page: 0.02221 seconds
|