Partilhar via


IOleInPlaceComponent.GetCntrMessage Method

Definition

Allows an in-place VSPackage object assuming the main component role to override a message belonging to an object assuming the subcomponent or component control role.

public:
 int GetCntrMessage([Runtime::InteropServices::Out] System::UInt32 % pdwRole, [Runtime::InteropServices::Out] Guid % pclsid, System::String ^ pszTitleIn, System::String ^ pszTextIn, System::String ^ pszHelpFileIn, [Runtime::InteropServices::Out] System::String ^ % ppszTitleOut, [Runtime::InteropServices::Out] System::String ^ % ppszTextOut, [Runtime::InteropServices::Out] System::String ^ % ppszHelpFileOut, [Runtime::InteropServices::Out] System::UInt32 % pdwHelpContextID, cli::array <Microsoft::VisualStudio::Shell::Interop::OLEMSGBUTTON> ^ pmsgbtn, cli::array <Microsoft::VisualStudio::Shell::Interop::OLEMSGDEFBUTTON> ^ pmsgdefbtn, cli::array <Microsoft::VisualStudio::Shell::Interop::OLEMSGICON> ^ pmsgicon, [Runtime::InteropServices::Out] int % pfSysAlert);
public int GetCntrMessage (out uint pdwRole, out Guid pclsid, string pszTitleIn, string pszTextIn, string pszHelpFileIn, out string ppszTitleOut, out string ppszTextOut, out string ppszHelpFileOut, out uint pdwHelpContextID, Microsoft.VisualStudio.Shell.Interop.OLEMSGBUTTON[] pmsgbtn, Microsoft.VisualStudio.Shell.Interop.OLEMSGDEFBUTTON[] pmsgdefbtn, Microsoft.VisualStudio.Shell.Interop.OLEMSGICON[] pmsgicon, out int pfSysAlert);
abstract member GetCntrMessage : uint32 * Guid * string * string * string * string * string * string * uint32 * Microsoft.VisualStudio.Shell.Interop.OLEMSGBUTTON[] * Microsoft.VisualStudio.Shell.Interop.OLEMSGDEFBUTTON[] * Microsoft.VisualStudio.Shell.Interop.OLEMSGICON[] * int -> int
Public Function GetCntrMessage (ByRef pdwRole As UInteger, ByRef pclsid As Guid, pszTitleIn As String, pszTextIn As String, pszHelpFileIn As String, ByRef ppszTitleOut As String, ByRef ppszTextOut As String, ByRef ppszHelpFileOut As String, ByRef pdwHelpContextID As UInteger, pmsgbtn As OLEMSGBUTTON(), pmsgdefbtn As OLEMSGDEFBUTTON(), pmsgicon As OLEMSGICON(), ByRef pfSysAlert As Integer) As Integer

Parameters

pdwRole
UInt32

[in][out] On input, pointer to the role of the in-place object requesting the message display. On output, the pdwRole parameter is the pointer to the role of the in-place object responsible for the message display. For a list of valid pdwRole values, see OLEROLE.

pclsid
Guid

[in] Specifies the class identifier (CLSID) of the in-place object requesting the message display.

pszTitleIn
String

[in] Points to the title of the message.

pszTextIn
String

[in] Points to the text of the message.

pszHelpFileIn
String

[in] Points to a help file containing the message.

ppszTitleOut
String

[out] Pointer to the title that was displayed.

ppszTextOut
String

[out] Pointer to the text that was displayed.

ppszHelpFileOut
String

[out] Pointer to the help file that was displayed.

pdwHelpContextID
UInt32

[in][out] On input, pointer to the requested help context identifier. On output, the pdwHelpContextId parameter is a pointer to the help context identifier used for the message display.

pmsgbtn
OLEMSGBUTTON[]

[in][out] On input, pointer to the type of buttons to be displayed with the message. On output, the pmsgbtn parameter is a pointer to the type buttons actually displayed with the message. For a list of valid pmsgbtn values, see OLEMSGBUTTON.

pmsgdefbtn
OLEMSGDEFBUTTON[]

[in][out] On input, pointer to the requested position of the default button in the message's button group. On output, the pmsgdefbtn parameter is a pointer to the actual position of the default button. For a list of valid pmsgdefbtn values, see OLEMSGDEFBUTTON.

pmsgicon
OLEMSGICON[]

[in][out] On input, pointer to the type of message to be displayed. On output, the pmsgicon parameter is a pointer to the type of message that was displayed. For a list of valid pmsgicon values, see OLEMSGICON.

pfSysAlert
Int32

[in][out] If true, this flag causes the MB_SYSTEMMODALflag to be set when showing the message. If false, no system flag is set during the message display.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From oleipc.idl:

HRESULT IOleInPlaceComponent::GetCntrMessage(  
   [in][out] DWORD *pdwRole,  
   [in][out] CLSID *pclsid,  
   [in] LPOLESTR pszTitleIn,  
   [in] LPOLESTR pszTextIn,  
   [in] LPOLESTR pszHelpFileIn,  
   [out] LPOLESTR *ppszTitleOut,  
   [out] LPOLESTR *ppszTextOut,  
   [out] LPOLESTR *ppszHelpFileOut,  
   [in][out] DWORD *pdwHelpContextID,  
   [in][out] OLEMSGBUTTON *pmsgbtn,  
   [in][out] OLEMSGDEFBUTTON *pmsgdefbtn,  
   [in][out] OLEMSGICON *pmsgicon,  
   [in][out] BOOL *pfSysAlert  
);  

An in-place object assuming the role of main component is given a chance to override any aspect of a message provided by a subcomponent or component control, including the help file name, message text, and message type. If the main component wants to override the message text or the help file name, it must allocate strings using the active IMalloc allocator supplied by OLE. The environment will free these strings using IMalloc.

Applies to