コード例 #1
0
 /// <summary>Gets the menu information set by calling IShellMenu::SetMenu.</summary>
 /// <param name="phmenu">
 /// <para>Type: <c>HMENU*</c></para>
 /// <para>
 /// When this method returns, contains a pointer to an <c>HMENU</c> value that receives the hmenu value that you specified when
 /// you called IShellMenu::SetMenu. This value can be <c>NULL</c>.
 /// </para>
 /// </param>
 /// <param name="phwnd">
 /// <para>Type: <c>HWND*</c></para>
 /// <para>
 /// When this method returns, contains a pointer to an <c>HWND</c> value that receives the hwnd value that you specified when
 /// you called IShellMenu::SetMenu. This value can be <c>NULL</c>.
 /// </para>
 /// </param>
 /// <param name="pdwFlags">
 /// <para>Type: <c>DWORD*</c></para>
 /// <para>
 /// When this method returns, contains a pointer to a <c>DWORD</c> value that receives the dwFlags value that you specified when
 /// you called IShellMenu::SetMenu. This value can be <c>NULL</c>.
 /// </para>
 /// </param>
 /// <returns>
 /// <para>Type: <c>HRESULT</c></para>
 /// <para>If this method succeeds, it returns <c>S_OK</c>. Otherwise, it returns an <c>HRESULT</c> error code.</para>
 /// </returns>
 // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellmenu-getmenu HRESULT GetMenu( HMENU
 // *phmenu, HWND *phwnd, DWORD *pdwFlags );
 void GetMenu(out HMENU phmenu, out HWND phwnd, out SMSET pdwFlags);
コード例 #2
0
 /// <summary>Adds a menu to the menuband.</summary>
 /// <param name="punk">
 /// <para>Type: <c>IUnknown*</c></para>
 /// <para>A pointer to an object that supports <c>CLSID_MenuToolbarBase</c> in its QueryInterface method.</para>
 /// </param>
 /// <param name="dwFlags">
 /// <para>Type: <c>DWORD</c></para>
 /// <para>Flags that control how the menu operates.</para>
 /// <para>SMSET_TOP</para>
 /// <para>Bias this namespace to the top of the menu.</para>
 /// <para>SMSET_BOTTOM</para>
 /// <para>Bias this namespace to the bottom of the menu.</para>
 /// <para>SMSET_DONTOWN</para>
 /// <para>The Menuband does not own the non-ref counted object.</para>
 /// </param>
 // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellmenu-setmenutoolbar HRESULT
 // SetMenuToolbar( IUnknown *punk, DWORD dwFlags );
 void SetMenuToolbar([In, MarshalAs(UnmanagedType.IUnknown)] object punk, SMSET dwFlags);
コード例 #3
0
 /// <summary>Appends a static menu to the menu band.</summary>
 /// <param name="hmenu">
 /// <para>Type: <c>HMENU</c></para>
 /// <para>The handle of the static menu that is to be appended. This value can be <c>NULL</c>.</para>
 /// </param>
 /// <param name="hwnd">
 /// <para>Type: <c>HWND</c></para>
 /// <para>The <c>HWND</c> of the owner window. This value can be <c>NULL</c>.</para>
 /// </param>
 /// <param name="dwFlags">
 /// <para>Type: <c>DWORD</c></para>
 /// <para>Flags that specify how the menu operates.</para>
 /// <para>SMSET_BOTTOM</para>
 /// <para>Attach the menu to the bottom of the parent menu.</para>
 /// <para>SMSET_TOP</para>
 /// <para>Attach the menu to the top of the parent menu.</para>
 /// <para>SMSET_DONTOWN</para>
 /// <para>The menu band does not own the menu named in hwnd, so should that menu eventually be replaced, it should not be destroyed.</para>
 /// </param>
 // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellmenu-setmenu HRESULT SetMenu( HMENU
 // hmenu, HWND hwnd, DWORD dwFlags );
 void SetMenu([In, Optional] HMENU hmenu, [In, Optional] HWND hwnd, SMSET dwFlags);