after trying this code from semen which was nicely formatted and
commented by josé
http://www.powerbasic.com/support/pb...ad.php?t=24977
i was wondering if it might be possible to also supply the hotkey,
and maybe have it return a value if it couldn't assign the hotkey
(because maybe the hotkey was already in use?)
i had a look at the windowsapi help and it shows this:
[now supported on windows nt]
sets a hot key for a shell link object.
hresult stdmethodcalltype sethotkey(
ishelllink far *pshllnk,
word whotkey
);
parameters
pshllnk
pointer to the ishelllink interface. in c++, this parameter is implicit.
whotkey
hot key. the virtual-key code is in the low-order byte, and the modifier flags are in the high-order byte. the modifier flags can be a combination of the values specified in the description of the ishelllink::gethotkey method.
return values
returns noerror if successful or an ole-defined error value otherwise.
setting a hot key allows the user to activate the object by pressing a particular combination of keys.
see also
ishelllink, ishelllink::gethotkey
but i'm not sure how to incorporate that into the code.
can anyone help?
lastly, is this routine compatible with all versions of windows?
what about users not logged on as admin on nt and xp ?
cheers
ian
commented by josé
http://www.powerbasic.com/support/pb...ad.php?t=24977
i was wondering if it might be possible to also supply the hotkey,
and maybe have it return a value if it couldn't assign the hotkey
(because maybe the hotkey was already in use?)
i had a look at the windowsapi help and it shows this:
[now supported on windows nt]
sets a hot key for a shell link object.
hresult stdmethodcalltype sethotkey(
ishelllink far *pshllnk,
word whotkey
);
parameters
pshllnk
pointer to the ishelllink interface. in c++, this parameter is implicit.
whotkey
hot key. the virtual-key code is in the low-order byte, and the modifier flags are in the high-order byte. the modifier flags can be a combination of the values specified in the description of the ishelllink::gethotkey method.
return values
returns noerror if successful or an ole-defined error value otherwise.
setting a hot key allows the user to activate the object by pressing a particular combination of keys.
see also
ishelllink, ishelllink::gethotkey
but i'm not sure how to incorporate that into the code.
can anyone help?
lastly, is this routine compatible with all versions of windows?
what about users not logged on as admin on nt and xp ?
cheers
ian
Comment