Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
IOleWindow (Interfaces)
 
.

Summary:

This interface provides methods that allow an application to obtain the handle to the various windows that participate in in-place activation, and also to enter and exit context-sensitive help mode.

Several other in-place activation interfaces are derived from this interface. Containers and objects must implement and use these interfaces in order to support in-place activation.

C# Definition:

/// <summary>
/// Implemented and used by containers and objects to obtain window handles
/// and manage context-sensitive help.
/// </summary>
/// <remarks>
/// The IOleWindow interface provides methods that allow an application to obtain
/// the handle to the various windows that participate in in-place activation,
/// and also to enter and exit context-sensitive help mode.
/// </remarks>
[ComImport]
[Guid("00000114-0000-0000-C000-000000000046")]
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
public interface IOleWindow
{
    /// <summary>
    /// Returns the window handle to one of the windows participating in in-place activation
    /// (frame, document, parent, or in-place object window).
    /// </summary>
    /// <param name="phwnd">Pointer to where to return the window handle.</param>
    void GetWindow (out IntPtr phwnd) ;

    /// <summary>
    /// Determines whether context-sensitive help mode should be entered during an
    /// in-place activation session.
    /// </summary>
    /// <param name="fEnterMode"><c>true</c> if help mode should be entered;
    /// <c>false</c> if it should be exited.</param>
    void ContextSensitiveHelp ([In, MarshalAs(UnmanagedType.Bool)] bool fEnterMode) ;
}

VB Definition:

   ''' <summary>
   ''' Implemented and used by containers and objects to obtain window handles
   ''' and manage context-sensitive help.
   ''' </summary>
   ''' <remarks>
   ''' The IOleWindow interface provides methods that allow an application to obtain
   ''' the handle to the various windows that participate in in-place activation,
   ''' and also to enter and exit context-sensitive help mode.
   ''' </remarks>
   <ComImport(), Guid("00000114-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
   Public Interface IOleWindow
      ''' <summary>
      ''' Returns the window handle to one of the windows participating in in-place activation
      ''' (frame, document, parent, or in-place object window).
      ''' </summary>
      ''' <param name="phwnd">Pointer to where to return the window handle.</param>
      Sub GetWindow(<System.Runtime.InteropServices.Out()> ByRef phwnd As IntPtr)

      ''' <summary>
      ''' Determines whether context-sensitive help mode should be entered during an
      ''' in-place activation session.
      ''' </summary>
      ''' <param name="fEnterMode"><c>true</c> if help mode should be entered;
      ''' <c>false</c> if it should be exited.</param>
      Sub ContextSensitiveHelp(<[In](), MarshalAs(UnmanagedType.Bool)> ByVal fEnterMode As Boolean)
   End Interface

User-Defined Types:

None.

Notes:

IMPORTANT
The phwnd parameter for the VB Definition of GetWindow MUST be ByRef or else a 'protected memory' error will occur. - Andrew Powell 04.27.08
Documentation
IOleWindow on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions