Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IOleInPlaceActiveObject::TranslateAccelerator method

Processes menu accelerator-key messages from the container's message queue. This method should only be used for objects created by a DLL object application.

Syntax


HRESULT TranslateAccelerator(
  [in]  LPMSG lpmsg
);

Parameters

lpmsg [in]

A pointer to an MSG structure for the message that might need to be translated.

Return value

This method returns S_OK on success. Other possible return values include the following.

Return codeDescription
S_FALSE

The message was not translated.

E_INVALIDARG

The specified parameter values are not valid.

E_OUTOFMEMORY

IThere is insufficient memory available for the operation.

E_UNEXPECTED

An unexpected error has occurred.

 

Remarks

Notes to Callers

Active in-place objects must always be given the first chance at translating accelerator keystrokes. You can provide this opportunity by calling IOleInPlaceActiveObject::TranslateAccelerator from your container's message loop before doing any other translation. You should apply your own translation only when this method returns S_FALSE.

If you call IOleInPlaceActiveObject::TranslateAccelerator for an object that is not created by a DLL object application, the default object handler returns S_FALSE.

Notes to Implementers

An object created by an EXE object application gets keystrokes from its own message pump, so the container does not get those messages.

If you need to implement this method, you can do so by simply wrapping the call to the TranslateAccelerator function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OleIdl.h

IDL

OleIdl.Idl

IID

IID_IOleInPlaceActiveObject is defined as 00000117-0000-0000-C000-000000000046

See also

IOleInPlaceActiveObject
OleTranslateAccelerator
TranslateAccelerator

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.