IoleinplaceFrame :: TranslateAccelerator
When an object is activated, it is intentionally to translate the accelerator.
HRESULT TRANSLATEACCELERATOR (lpmsg lpmsg, // pointing to the structure Word WID // command identification value);
parameter
LPMSG
Include key information
MSG structure pointer
WID
The command identifies the value corresponding to the accelerator table provided by the container. The container should use this value to re-translate.
return value
This method supports standard return value E_INVALIDARG and E_UNEXPECTED, also supports the following:
S_ok
The key is used.
S_false
The key is not used.
Comment
Caller
When the accelerator is intentionally received, the IoleInplaceFrame :: TranslateAccelerator method is indirectly called through OletranslateAccelerator.
Realize attention
The container application should execute it usually accelerated, or use the WID directly, and then return to whether the acceleration key is processed. If the window is an MDI application, Windows's TranslateAccelerator call failed, the window can call the Windows TranslateMdisysAccel function, the same as the general message processing.
A chance should be given in the in-place object in the translation acceleration message. However, because objects cannot have their own message processing mechanisms through the DLL object application, they receive their messages from the messages of the container. To ensure that the subject has a chance in the translation message, a container should always call ioleinplaceactiveObject :: TranslateAccelerator before it is in its own accelerated translation. Instead, an executable object application should call OletranslateAccelerator after calling TranslateAccelerator, TranslateMessage, and DispatchMessage failure.
Note that you should define an acceleration table for the container so they will work properly, use object applications to do their own acceleration key translation. The form should be as defined as the following:
"char", wid, virtkey, control
This has more public methods to describe the key acceleration. This is the most common way to describe the acceleration key. During the IN-PLANE session, if this method fails, it will be launched or sent to the error object.
Quick information
Windows NT: 3.1 or higher. Windows: Windows 95 or higher. Windows CE: does not support. HEADER: Oleidl.h.
See
OletranslateAccelerator, IoleinplaceACectiveObject :: TranslateAccelerator
TranslateAccelerator, TranslateMessage, DispatchMessage, TranslateMdisysAccel in Win32