本文整理汇总了C++中IShellBrowser::InsertMenusSB方法的典型用法代码示例。如果您正苦于以下问题:C++ IShellBrowser::InsertMenusSB方法的具体用法?C++ IShellBrowser::InsertMenusSB怎么用?C++ IShellBrowser::InsertMenusSB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IShellBrowser
的用法示例。
在下文中一共展示了IShellBrowser::InsertMenusSB方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PyCom_BuildPyException
// @pymethod <o PyOLEMENUGROUPWIDTHS>|PyIShellBrowser|InsertMenusSB|Updates a composite menu with container's options
PyObject *PyIShellBrowser::InsertMenusSB(PyObject *self, PyObject *args)
{
IShellBrowser *pISB = GetI(self);
if ( pISB == NULL )
return NULL;
OLEMENUGROUPWIDTHS menuWidths;
PyObject *obMenuWidths, *obhmenuShared;
HMENU hmenuShared;
if ( !PyArg_ParseTuple(args, "OO:InsertMenusSB",
&obhmenuShared, // @pyparm <o PyHANDLE>|hmenuShared||Newly created menu that contains no items
&obMenuWidths)) // @pyparm <o PyOLEMENUGROUPWIDTHS>|lpMenuWidths||Tuple of 6 ints. Items 0,2,and 4 are updated when the tuple is returned.
return NULL;
if (!PyWinObject_AsHANDLE(obhmenuShared, (HANDLE *)&hmenuShared))
return NULL;
if (!PyObject_AsOLEMENUGROUPWIDTHS( obMenuWidths, &menuWidths))
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pISB->InsertMenusSB( hmenuShared, &menuWidths );
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pISB, IID_IShellBrowser );
return PyObject_FromOLEMENUGROUPWIDTHS(&menuWidths);
}