IOleInPlaceComponent::GetCntrMessage Method (UInt32, Guid, String^, String^, String^, String^, String^, String^, UInt32, array<OLEMSGBUTTON>^, array<OLEMSGDEFBUTTON>^, array<OLEMSGICON>^, Int32)
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.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int GetCntrMessage( unsigned int% pdwRole, Guid% pclsid, String^ pszTitleIn, String^ pszTextIn, String^ pszHelpFileIn, [OutAttribute] String^% ppszTitleOut, [OutAttribute] String^% ppszTextOut, [OutAttribute] String^% ppszHelpFileOut, unsigned int% pdwHelpContextID, array<OLEMSGBUTTON>^ pmsgbtn, array<OLEMSGDEFBUTTON>^ pmsgdefbtn, array<OLEMSGICON>^ pmsgicon, int% pfSysAlert )
Parameters
- pdwRole
-
Type:
System::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
-
Type:
System::Guid
[in] Specifies the class identifier (CLSID) of the in-place object requesting the message display.
- pszTitleIn
-
Type:
System::String^
[in] Points to the title of the message.
- pszTextIn
-
Type:
System::String^
[in] Points to the text of the message.
- pszHelpFileIn
-
Type:
System::String^
[in] Points to a help file containing the message.
- ppszTitleOut
-
Type:
System::String^
[out] Pointer to the title that was displayed.
- ppszTextOut
-
Type:
System::String^
[out] Pointer to the text that was displayed.
- ppszHelpFileOut
-
Type:
System::String^
[out] Pointer to the help file that was displayed.
- pdwHelpContextID
-
Type:
System::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
-
Type:
array<Microsoft.VisualStudio.Shell.Interop::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
-
Type:
array<Microsoft.VisualStudio.Shell.Interop::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
-
Type:
array<Microsoft.VisualStudio.Shell.Interop::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
-
Type:
System::Int32
[in][out] If true, this flag causes the MB_SYSTEMMODAL flag to be set when showing the message. If false, no system flag is set during the message display.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.