共用方式為


COleControl::OnWindowlessMessage

Called by the framework in response to a container's IOleInPlaceObjectWindowless::OnWindowMessage request.

virtual BOOL OnWindowlessMessage(
   UINT msg,
      WPARAM wParam,
      LPARAM lParam,
      LRESULT* plResult 
);

Parameters

  • msg
    Message identifier as passed by Windows.

  • wParam
    As passed by Windows. Specifies additional message-specific information. The contents of this parameter depend on the value of the msg parameter.

  • lParam
    As passed by Windows. Specifies additional message-specific information. The contents of this parameter depend on the value of the msg parameter.

  • plResult
    Windows result code. Specifies the result of the message processing and depends on the message sent.

Return Value

Nonzero if successful; otherwise 0.

Remarks

Processes window messages for windowless controls. COleControl's OnWindowlessMessage should be used for window messages other than mouse messages and keyboard messages. COleControl provides SetCapture and SetFocus specifically to get mouse capture and keyboard focus for windowless OLE objects.

Because windowless objects do not have a window, they need a mechanism to let the container dispatch messages to them. A windowless OLE object gets messages from its container, through the OnWindowMessage method on the IOleInPlaceObjectWindowless interface (an extension of IOleInPlaceObject for windowless support). OnWindowMessage does not take an HWND parameter.

Requirements

Header: afxctl.h

See Also

Concepts

COleControl Class

COleControl Members

Hierarchy Chart

COleControl::SetCapture

COleControl::SetFocus

COleControl::GetWindowlessDropTarget