本文整理汇总了C++中IShellBrowser::SendControlMsg方法的典型用法代码示例。如果您正苦于以下问题:C++ IShellBrowser::SendControlMsg方法的具体用法?C++ IShellBrowser::SendControlMsg怎么用?C++ IShellBrowser::SendControlMsg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IShellBrowser
的用法示例。
在下文中一共展示了IShellBrowser::SendControlMsg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PyCom_BuildPyException
// @pymethod int|PyIShellBrowser|SendControlMsg|Sends a control msg to browser's toolbar or status bar
PyObject *PyIShellBrowser::SendControlMsg(PyObject *self, PyObject *args)
{
IShellBrowser *pISB = GetI(self);
if ( pISB == NULL )
return NULL;
// @pyparm int|id||shellcon.FCW_TOOLBAR or FCW_STATUS
// @pyparm int|uMsg||The message to send
// @pyparm int|wParam||Value is dependent on the message
// @pyparm long|lParam||Value is dependent on the message
UINT id;
UINT uMsg;
PyObject *obwparam, *oblparam;
if ( !PyArg_ParseTuple(args, "IIOO:SendControlMsg", &id, &uMsg, &obwparam, &oblparam) )
return NULL;
WPARAM wParam;
LPARAM lParam;
if (!PyWinObject_AsPARAM(obwparam, &wParam))
return NULL;
// WPARAM and LPARAM are defined as UINT_PTR and LONG_PTR, so they can't be used interchangeably without a cast
if (!PyWinObject_AsPARAM(oblparam, (WPARAM *)&lParam))
return NULL;
HRESULT hr;
LRESULT ret;
PY_INTERFACE_PRECALL;
hr = pISB->SendControlMsg( id, uMsg, wParam, lParam, &ret );
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pISB, IID_IShellBrowser );
// LRESULT is defined as LONG_PTR. This should work for either 32 or 64 bit.
return PyLong_FromLongLong(ret);
}