41 #define QT_NO_CAST_TO_ASCII 43 #ifndef QT_NO_WIN_ACTIVEQT 64 #include <private/qcoreapplication_p.h> 70 #include "../shared/qaxtypes.h" 77 #define ULONG_PTR DWORD 129 # if (__W32API_MAJOR_VERSION < 2 || (__W32API_MAJOR_VERSION == 2 && __W32API_MINOR_VERSION < 5)) 135 public IOleInPlaceObject,
136 public IOleInPlaceActiveObject,
137 public IProvideClassInfo2,
138 public IConnectionPointContainer,
139 public IPersistStream,
140 public IPersistStreamInit,
141 public IPersistStorage,
142 public IPersistPropertyBag,
158 HWND
create(HWND hWndParent, RECT& rcPos);
159 HMENU createPopup(
QMenu *popup, HMENU oldMenu = 0);
163 static LRESULT
QT_WIN_CALLBACK ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
166 void registerActiveObject(IUnknown *
object);
167 void revokeActiveObject();
173 return m_outerUnknown->AddRef();
175 EnterCriticalSection(&refCountSection);
176 unsigned long r = ++ref;
177 LeaveCriticalSection(&refCountSection);
184 return m_outerUnknown->Release();
186 EnterCriticalSection(&refCountSection);
187 unsigned long r = --ref;
188 LeaveCriticalSection(&refCountSection);
196 HRESULT WINAPI QueryInterface(REFIID iid,
void **iface);
197 HRESULT InternalQueryInterface(REFIID iid,
void **iface);
202 return m_spClientSite;
205 void emitPropertyChanged(
const char*);
206 bool emitRequestPropertyChange(
const char*);
211 void ensureMetaData();
212 bool isPropertyExposed(
int index);
222 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo);
223 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo);
224 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid);
225 STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid,
226 LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult,
227 EXCEPINFO* pexcepinfo, UINT* puArgErr);
230 STDMETHOD(GetClassInfo)(ITypeInfo** pptinfo);
233 STDMETHOD(GetGUID)(DWORD dwGuidKind,
GUID* pGUID);
236 STDMETHOD(Advise)(IAdviseSink* pAdvSink, DWORD* pdwConnection);
237 STDMETHOD(Close)(DWORD dwSaveOption);
238 STDMETHOD(DoVerb)(LONG iVerb, LPMSG lpmsg, IOleClientSite* pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect);
239 STDMETHOD(EnumAdvise)(IEnumSTATDATA** ppenumAdvise);
240 STDMETHOD(EnumVerbs)(IEnumOLEVERB** ppEnumOleVerb);
241 STDMETHOD(GetClientSite)(IOleClientSite** ppClientSite);
242 STDMETHOD(GetClipboardData)(DWORD dwReserved, IDataObject** ppDataObject);
243 STDMETHOD(GetExtent)(DWORD dwDrawAspect, SIZEL* psizel);
244 STDMETHOD(GetMiscStatus)(DWORD dwAspect, DWORD *pdwStatus);
245 STDMETHOD(GetMoniker)(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker** ppmk);
246 STDMETHOD(GetUserClassID)(CLSID* pClsid);
247 STDMETHOD(GetUserType)(DWORD dwFormOfType, LPOLESTR *pszUserType);
248 STDMETHOD(InitFromData)(IDataObject* pDataObject, BOOL fCreation, DWORD dwReserved);
249 STDMETHOD(IsUpToDate)();
250 STDMETHOD(SetClientSite)(IOleClientSite* pClientSite);
251 STDMETHOD(SetColorScheme)(LOGPALETTE* pLogPal);
252 STDMETHOD(SetExtent)(DWORD dwDrawAspect, SIZEL* psizel);
253 STDMETHOD(SetHostNames)(LPCOLESTR szContainerApp, LPCOLESTR szContainerObj);
254 STDMETHOD(SetMoniker)(DWORD dwWhichMoniker, IMoniker* ppmk);
255 STDMETHOD(Unadvise)(DWORD dwConnection);
259 STDMETHOD(Draw)(DWORD dwAspect, LONG lIndex,
void *pvAspect, DVTARGETDEVICE *ptd,
260 HDC hicTargetDevice, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds,
262 STDMETHOD(GetColorSet)(DWORD dwDrawAspect, LONG lindex,
void *pvAspect, DVTARGETDEVICE *ptd,
263 HDC hicTargetDev, LOGPALETTE **ppColorSet);
264 STDMETHOD(Freeze)(DWORD dwAspect, LONG lindex,
void *pvAspect, DWORD *pdwFreeze);
265 STDMETHOD(Unfreeze)(DWORD dwFreeze);
266 STDMETHOD(SetAdvise)(DWORD aspects, DWORD advf, IAdviseSink *pAdvSink);
267 STDMETHOD(GetAdvise)(DWORD *aspects, DWORD *advf, IAdviseSink **pAdvSink);
270 STDMETHOD(GetExtent)(DWORD dwAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel);
273 STDMETHOD(FreezeEvents)(BOOL);
274 STDMETHOD(GetControlInfo)(LPCONTROLINFO);
275 STDMETHOD(OnAmbientPropertyChange)(DISPID);
276 STDMETHOD(OnMnemonic)(LPMSG);
279 STDMETHOD(GetWindow)(HWND *pHwnd);
280 STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);
283 STDMETHOD(InPlaceDeactivate)();
284 STDMETHOD(UIDeactivate)();
285 STDMETHOD(SetObjectRects)(LPCRECT lprcPosRect, LPCRECT lprcClipRect);
286 STDMETHOD(ReactivateAndUndo)();
289 STDMETHOD(TranslateAcceleratorW)(
MSG *pMsg);
290 STDMETHOD(TranslateAcceleratorA)(
MSG *pMsg);
291 STDMETHOD(OnFrameWindowActivate)(BOOL);
292 STDMETHOD(OnDocWindowActivate)(BOOL fActivate);
293 STDMETHOD(ResizeBorder)(LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow);
294 STDMETHOD(EnableModeless)(BOOL);
297 STDMETHOD(EnumConnectionPoints)(IEnumConnectionPoints**);
298 STDMETHOD(FindConnectionPoint)(REFIID, IConnectionPoint**);
301 STDMETHOD(GetClassID)(
GUID*clsid)
308 STDMETHOD(InitNew)(VOID);
309 STDMETHOD(IsDirty)();
310 STDMETHOD(Load)(IStream *pStm);
311 STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty);
312 STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize);
315 STDMETHOD(Load)(IPropertyBag *, IErrorLog *);
316 STDMETHOD(Save)(IPropertyBag *, BOOL, BOOL);
319 STDMETHOD(InitNew)(IStorage *pStg);
320 STDMETHOD(Load)(IStorage *pStg);
321 STDMETHOD(Save)(IStorage *pStg, BOOL fSameAsLoad);
322 STDMETHOD(SaveCompleted)(IStorage *pStgNew);
323 STDMETHOD(HandsOffStorage)();
326 STDMETHOD(SaveCompleted)(LPCOLESTR
fileName);
327 STDMETHOD(GetCurFile)(LPOLESTR *currentFile);
328 STDMETHOD(Load)(LPCOLESTR
fileName, DWORD mode);
329 STDMETHOD(Save)(LPCOLESTR
fileName, BOOL fRemember);
337 STDMETHOD(EnumFormatEtc)(DWORD , IEnumFORMATETC** );
338 STDMETHOD(DAdvise)(
FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);
339 STDMETHOD(DUnadvise)(DWORD dwConnection);
340 STDMETHOD(EnumDAdvise)(IEnumSTATDATA **ppenumAdvise);
348 void resize(
const QSize &newSize);
349 void updateGeometry();
351 bool internalCreate();
353 void internalConnect();
357 friend class QAxPropertyPage;
419 : m_outerUnknown(outerUnknown), ref(0)
422 object->registerActiveObject(
this);
424 InitializeCriticalSection(&refCountSection);
425 InitializeCriticalSection(&createWindowSection);
429 DeleteCriticalSection(&refCountSection);
430 DeleteCriticalSection(&createWindowSection);
438 EnterCriticalSection(&refCountSection);
439 unsigned long r = ++ref;
440 LeaveCriticalSection(&refCountSection);
446 EnterCriticalSection(&refCountSection);
447 unsigned long r = --ref;
448 LeaveCriticalSection(&refCountSection);
461 if (iid == IID_IUnknown) {
462 *iface = (IUnknown*)
this;
466 return object->InternalQueryInterface(iid, iface);
498 : cpoints(points.
values())
502 InitializeCriticalSection(&refCountSection);
503 const int count = cpoints.count();
504 for (
int i = 0; i < count; ++i)
505 cpoints.at(i)->AddRef();
508 : cpoints(old.cpoints)
509 , current(old.current)
511 InitializeCriticalSection(&refCountSection);
513 const int count = cpoints.count();
514 for (
int i = 0; i < count; ++i)
515 cpoints.at(i)->AddRef();
519 const int count = cpoints.count();
520 for (
int i = 0; i < count; ++i)
521 cpoints.at(i)->Release();
523 DeleteCriticalSection(&refCountSection);
528 EnterCriticalSection(&refCountSection);
529 unsigned long r = ++ref;
530 LeaveCriticalSection(&refCountSection);
535 EnterCriticalSection(&refCountSection);
536 unsigned long r = --ref;
537 LeaveCriticalSection(&refCountSection);
545 STDMETHOD(QueryInterface)(REFIID iid,
void **iface)
550 if (iid == IID_IUnknown)
552 else if (iid == IID_IEnumConnectionPoints)
555 return E_NOINTERFACE;
560 STDMETHOD(Next)(ULONG cConnections, IConnectionPoint **cpoint, ULONG *pcFetched)
565 if (!pcFetched && cConnections > 1)
568 const int count = cpoints.count();
570 for (i = 0; i < cConnections; i++) {
573 IConnectionPoint *cp = cpoints.at(current);
580 return i == cConnections ? S_OK : S_FALSE;
582 STDMETHOD(Skip)(ULONG cConnections)
584 const int count = cpoints.count();
585 while (cConnections) {
586 if (current == count)
598 STDMETHOD(Clone)(IEnumConnectionPoints **ppEnum)
621 public IEnumConnections
628 : that(parent), iid(uuid), current(0), ref(1)
630 InitializeCriticalSection(&refCountSection);
633 : current(old.current)
635 InitializeCriticalSection(&refCountSection);
641 while (it != connections.
end()) {
642 CONNECTDATA connection = *
it;
644 connection.pUnk->AddRef();
649 DeleteCriticalSection(&refCountSection);
654 EnterCriticalSection(&refCountSection);
655 unsigned long r = ++ref;
656 LeaveCriticalSection(&refCountSection);
661 EnterCriticalSection(&refCountSection);
662 unsigned long r = --ref;
663 LeaveCriticalSection(&refCountSection);
671 STDMETHOD(QueryInterface)(REFIID iid,
void **iface)
676 if (iid == IID_IUnknown)
677 *iface = (IConnectionPoint*)
this;
678 else if (iid == IID_IConnectionPoint)
680 else if (iid == IID_IEnumConnections)
683 return E_NOINTERFACE;
688 STDMETHOD(GetConnectionInterface)(IID *pIID)
693 STDMETHOD(GetConnectionPointContainer)(IConnectionPointContainer **ppCPC)
695 return that->QueryInterface(IID_IConnectionPointContainer, (
void**)ppCPC);
697 STDMETHOD(Advise)(IUnknown*pUnk, DWORD *pdwCookie)
699 if (!pUnk || !pdwCookie)
703 IDispatch *checkImpl = 0;
704 pUnk->QueryInterface(iid, (
void**)&checkImpl);
706 return CONNECT_E_CANNOTCONNECT;
707 checkImpl->Release();
711 cd.dwCookie = connections.count()+1;
714 connections.append(cd);
715 *pdwCookie = cd.dwCookie;
718 STDMETHOD(Unadvise)(DWORD dwCookie)
720 const int count = connections.count();
721 for (
int i = 0; i < count; ++i) {
722 if (connections.at(i).dwCookie == dwCookie) {
723 connections.removeAt(i);
724 if (current >= i && current != 0)
729 return CONNECT_E_NOCONNECTION;
731 STDMETHOD(EnumConnections)(IEnumConnections **ppEnum)
740 STDMETHOD(Next)(ULONG cConnections, CONNECTDATA *cd, ULONG *pcFetched)
745 if (!pcFetched && cConnections > 1)
748 const int count = connections.count();
751 for (i = 0; i < cConnections; i++) {
752 if (current == count)
754 cd[i] = connections.at(current);
755 cd[i].pUnk->AddRef();
760 return i == cConnections ? S_OK : S_FALSE;
762 STDMETHOD(Skip)(ULONG cConnections)
764 const int count = connections.count();
765 while (cConnections) {
766 if (current == count)
778 STDMETHOD(Clone)(IEnumConnections **ppEnum)
802 qApp->sendPostedEvents();
804 return CallNextHookEx(
qax_hhook, nCode, wParam, lParam);
811 MSG *pMsg = (
MSG*)message;
812 if (pMsg->message < WM_KEYFIRST || pMsg->message > WM_KEYLAST)
820 HWND baseHwnd = ::GetParent(aqt->
winId());
822 while (!axbase && baseHwnd) {
824 axbase = (
QAxServerBase*)GetWindowLongPtr(baseHwnd, GWLP_USERDATA);
826 axbase = (
QAxServerBase*)GetWindowLong(baseHwnd, GWL_USERDATA);
829 baseHwnd = ::GetParent(baseHwnd);
834 HRESULT hres = axbase->TranslateAcceleratorW(pMsg);
846 : ref(0), licensed(false)
848 InitializeCriticalSection(&refCountSection);
862 licensed = !classKey.isEmpty();
868 DeleteCriticalSection(&refCountSection);
874 EnterCriticalSection(&refCountSection);
875 unsigned long r = ++ref;
876 LeaveCriticalSection(&refCountSection);
881 EnterCriticalSection(&refCountSection);
882 unsigned long r = --ref;
883 LeaveCriticalSection(&refCountSection);
894 if (iid == IID_IUnknown)
895 *iface = (IUnknown*)
this;
896 else if (iid == IID_IClassFactory)
897 *iface = (IClassFactory*)
this;
898 else if (iid == IID_IClassFactory2 && licensed)
899 *iface = (IClassFactory2*)
this;
901 return E_NOINTERFACE;
910 if (iid != IID_IUnknown)
911 return CLASS_E_NOAGGREGATION;
914 return CLASS_E_NOAGGREGATION;
924 qApp->setQuitOnLastWindowClosed(
false);
959 return CLASS_E_NOTLICENSED;
961 return CreateInstanceHelper(pUnkOuter, iid, ppObject);
982 return CLASS_E_NOTLICENSED;
992 pLicInfo->cbLicInfo =
sizeof(LICINFO);
997 pLicInfo->fRuntimeKeyAvail = key && key[0];
1009 return CLASS_E_NOTLICENSED;
1010 return CreateInstanceHelper(pUnkOuter, iid, ppObject);
1027 return E_OUTOFMEMORY;
1030 return E_NOINTERFACE;
1047 : aggregatedObject(0), ref(0), ole_ref(0), class_name(classname),
1048 m_hWnd(0), hmenuShared(0), hwndMenuOwner(0),
1049 m_outerUnknown(outerUnknown)
1138 qt.object->disconnect(
this);
1185 RevokeActiveObject(
ole_ref, 0);
1204 if (iid == IID_IUnknown) {
1205 *iface = (IUnknown*)(IDispatch*)
this;
1216 *iface = (IDispatch*)
this;
1217 if (iid == IID_IDispatch)
1218 *iface = (IDispatch*)
this;
1221 else if (iid == IID_IOleObject)
1222 *iface = (IOleObject*)
this;
1223 else if (iid == IID_IConnectionPointContainer)
1224 *iface = (IConnectionPointContainer*)
this;
1225 else if (iid == IID_IProvideClassInfo)
1226 *iface = (IProvideClassInfo*)
this;
1227 else if (iid == IID_IProvideClassInfo2)
1228 *iface = (IProvideClassInfo2*)
this;
1229 else if (iid == IID_IPersist)
1230 *iface = (IPersist*)(IPersistStream*)
this;
1231 else if (iid == IID_IPersistStream)
1232 *iface = (IPersistStream*)
this;
1233 else if (iid == IID_IPersistStreamInit)
1234 *iface = (IPersistStreamInit*)
this;
1235 else if (iid == IID_IPersistStorage)
1236 *iface = (IPersistStorage*)
this;
1237 else if (iid == IID_IPersistPropertyBag)
1238 *iface = (IPersistPropertyBag*)
this;
1239 else if (iid == IID_IPersistFile &&
1241 *iface = (IPersistFile*)
this;
1242 else if (iid == IID_IViewObject)
1243 *iface = (IViewObject*)
this;
1244 else if (iid == IID_IViewObject2)
1245 *iface = (IViewObject2*)
this;
1247 if (iid == IID_IOleControl)
1248 *iface = (IOleControl*)
this;
1249 else if (iid == IID_IOleWindow)
1250 *iface = (IOleWindow*)(IOleInPlaceObject*)
this;
1251 else if (iid == IID_IOleInPlaceObject)
1252 *iface = (IOleInPlaceObject*)
this;
1253 else if (iid == IID_IOleInPlaceActiveObject)
1254 *iface = (IOleInPlaceActiveObject*)
this;
1255 else if (iid == IID_IDataObject)
1256 *iface = (IDataObject*)
this;
1260 return E_NOINTERFACE;
1290 if (!eventsID.
isNull()) {
1296 for (
int isignal = mo->
methodCount()-1; isignal >= 0; --isignal) {
1330 ::SetWindowLong(
qt.widget->winId(), GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
1333 qt.widget->move(0, 0);
1347 qt.object->installEventFilter(
this);
1350 while (it != children.
constEnd()) {
1351 (*it)->installEventFilter(
this);
1387 if (uMsg == WM_CREATE) {
1388 CREATESTRUCT *cs = (CREATESTRUCT*)lParam;
1391 #ifdef GWLP_USERDATA
1392 SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)that);
1394 SetWindowLong(hWnd, GWL_USERDATA, (LONG)that);
1397 that->m_hWnd = hWnd;
1399 return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
1404 #ifdef GWLP_USERDATA 1405 that = (
QAxServerBase*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
1413 RECT rcPos = {0, 0, width + 1, height + 1};
1420 case WM_QUERYENDSESSION:
1448 that->
resize(
QSize(LOWORD(lParam), HIWORD(lParam)));
1455 IOleControlSite *spSite = 0;
1456 that->
m_spClientSite->QueryInterface(IID_IOleControlSite, (
void**)&spSite);
1458 spSite->OnFocus(
true);
1464 if (candidate == that->
qt.
widget) {
1472 if (::GetKeyState(VK_SHIFT) < 0)
1481 IOleControlSite *spSite = 0;
1482 that->
m_spClientSite->QueryInterface(IID_IOleControlSite, (
void**)&spSite);
1484 if (!::IsChild(that->
m_hWnd, ::GetFocus()))
1485 spSite->OnFocus(
false);
1491 case WM_MOUSEACTIVATE:
1495 case WM_INITMENUPOPUP:
1519 bool menuClosed =
false;
1521 if (uMsg == WM_COMMAND) {
1523 }
else if (!lParam) {
1534 if (uMsg == WM_COMMAND)
1536 else if (menuClosed)
1545 if (menuClosed || uMsg == WM_COMMAND)
1557 return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
1567 static ATOM atom = 0;
1574 wcTemp.style = CS_DBLCLKS;
1575 wcTemp.cbClsExtra = 0;
1576 wcTemp.cbWndExtra = 0;
1577 wcTemp.hbrBackground = 0;
1580 wcTemp.hInstance = hInst;
1581 wcTemp.lpszClassName = (
wchar_t*)cn.
utf16();
1582 wcTemp.lpszMenuName = 0;
1585 atom = RegisterClass(&wcTemp);
1588 if (!atom && GetLastError() != ERROR_CLASS_ALREADY_EXISTS)
1592 HWND hWnd = ::CreateWindow((
wchar_t*)cn.
utf16(), 0,
1593 WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
1594 rcPos.left, rcPos.top, rcPos.right - rcPos.left,
1595 rcPos.bottom - rcPos.top, hWndParent, 0, hInst,
this);
1600 EnableWindow(
m_hWnd,
qt.widget->isEnabled());
1610 HMENU popupMenu = oldMenu ? oldMenu : CreatePopupMenu();
1613 if (oldMenu)
while (GetMenuItemCount(oldMenu)) {
1614 DeleteMenu(oldMenu, 0, MF_BYPOSITION);
1618 for (
int i = 0; i < actions.
count(); ++i) {
1623 flags |= MF_SEPARATOR;
1624 else if (action->
menu())
1629 flags |= MF_CHECKED;
1632 if (flags & MF_POPUP) {
1633 itemId =
static_cast<ushort>(
1637 itemId =
static_cast<ushort>(
reinterpret_cast<quintptr>(action));
1641 AppendMenu(popupMenu, flags, itemId, (
const wchar_t *)action->
text().
utf16());
1660 for (
int i = 0; i < actions.
count(); ++i) {
1665 flags |= MF_SEPARATOR;
1666 else if (action->
menu())
1679 if (flags & MF_POPUP) {
1680 itemId =
static_cast<ushort>(
1684 itemId =
static_cast<ushort>(
reinterpret_cast<quintptr>(action));
1690 OLEMENUGROUPWIDTHS menuWidths = {0,edit,0,
object,0,help};
1705 OleDestroyMenuDescriptor(
holemenu);
1753 bool result =
false;
1765 GetIDsOfNames(IID_NULL, (BSTR*)&bstrNames, 1, LOCALE_USER_DEFAULT, &dispId);
1766 result = dispId != DISPID_UNKNOWN;
1767 SysFreeString(bstrNames);
1784 ::InvalidateRect(
m_hWnd, 0,
true);
1790 adviseSinks.
at(i).pAdvSink->OnViewChange(DVASPECT_CONTENT, -1);
1803 QSize oldSize =
qt.widget->size();
1804 qt.widget->resize(size);
1805 QSize newSize =
qt.widget->size();
1807 if (!
m_hWnd && !
qt.widget->isVisible() && newSize != oldSize) {
1809 #ifndef QT_DLL // import from static library 1830 const QSize sizeHint =
qt.widget->sizeHint();
1831 const QSize size =
qt.widget->size();
1833 QSize newSize = size;
1866 if (!
isWidget || !
qt.widget ||
qt.widget->mask().isEmpty())
1870 HRGN hrgn = rgn.
handle();
1873 HRGN wr = CreateRectRgn(0,0,0,0);
1874 CombineRgn(wr, hrgn, 0, RGN_COPY);
1875 SetWindowRgn(
m_hWnd, wr,
true);
1880 const char *
name = 0;
1884 case DISP_E_BADPARAMCOUNT:
1885 #if defined(QT_CHECK_STATE) 1886 qWarning(
"QAxBase: Error calling IDispatch member %s: Bad parameter count", name);
1889 case DISP_E_BADVARTYPE:
1890 #if defined(QT_CHECK_STATE) 1891 qWarning(
"QAxBase: Error calling IDispatch member %s: Bad variant type", name);
1894 case DISP_E_EXCEPTION:
1895 #if defined(QT_CHECK_STATE) 1896 qWarning(
"QAxBase: Error calling IDispatch member %s: Exception thrown by server", name);
1899 case DISP_E_MEMBERNOTFOUND:
1900 #if defined(QT_CHECK_STATE) 1901 qWarning(
"QAxBase: Error calling IDispatch member %s: Member not found", name);
1904 case DISP_E_NONAMEDARGS:
1905 #if defined(QT_CHECK_STATE) 1906 qWarning(
"QAxBase: Error calling IDispatch member %s: No named arguments", name);
1909 case DISP_E_OVERFLOW:
1910 #if defined(QT_CHECK_STATE) 1911 qWarning(
"QAxBase: Error calling IDispatch member %s: Overflow", name);
1914 case DISP_E_PARAMNOTFOUND:
1915 #if defined(QT_CHECK_STATE) 1916 qWarning(
"QAxBase: Error calling IDispatch member %s: Parameter not found", name);
1919 case DISP_E_TYPEMISMATCH:
1920 #if defined(QT_CHECK_STATE) 1921 qWarning(
"QAxBase: Error calling IDispatch member %s: Type mismatch", name);
1924 case DISP_E_UNKNOWNINTERFACE:
1925 #if defined(QT_CHECK_STATE) 1926 qWarning(
"QAxBase: Error calling IDispatch member %s: Unknown interface", name);
1929 case DISP_E_UNKNOWNLCID:
1930 #if defined(QT_CHECK_STATE) 1931 qWarning(
"QAxBase: Error calling IDispatch member %s: Unknown locale ID", name);
1934 case DISP_E_PARAMNOTOPTIONAL:
1935 #if defined(QT_CHECK_STATE) 1936 qWarning(
"QAxBase: Error calling IDispatch member %s: Non-optional parameter missing", name);
1940 #if defined(QT_CHECK_STATE) 1941 qWarning(
"QAxBase: Error calling IDispatch member %s: Unknown error", name);
1990 DISPID eventId =
index;
1996 case DISPID_KEYDOWN:
1999 ptypes <<
"int&" <<
"int";
2001 case DISPID_KEYPRESS:
2005 case DISPID_MOUSEDOWN:
2006 case DISPID_MOUSEMOVE:
2007 case DISPID_MOUSEUP:
2009 ptypes <<
"int" <<
"int" <<
"int" <<
"int";
2014 case DISPID_DBLCLICK:
2019 signal = mo->
method(index);
2024 name.truncate(name.indexOf(
'('));
2027 if (eventId == -1) {
2028 ITypeInfo *eventInfo = 0;
2032 const OLECHAR *olename =
reinterpret_cast<const OLECHAR *
>(uni_name.
utf16());
2033 eventInfo->GetIDsOfNames((OLECHAR**)&olename, 1, &eventId);
2034 eventInfo->Release();
2038 signature = signature.mid(name.length() + 1);
2039 signature.truncate(signature.length() - 1);
2041 if (!signature.isEmpty())
2042 ptypes = signature.split(
',');
2044 pcount = ptypes.
count();
2048 if (pcount && !argv) {
2049 qWarning(
"QAxServerBase::qt_metacall: Missing %d arguments", pcount);
2056 IConnectionPoint *cpoint = 0;
2060 IEnumConnections *clist = 0;
2061 cpoint->EnumConnections(&clist);
2066 clist->Next(cc, (CONNECTDATA*)&c, &cc);
2069 unsigned int argErr = 0;
2070 DISPPARAMS dispParams;
2071 dispParams.cArgs = pcount;
2072 dispParams.cNamedArgs = 0;
2073 dispParams.rgdispidNamedArgs = 0;
2074 dispParams.rgvarg = 0;
2077 dispParams.rgvarg = (VARIANTARG*)malloc(pcount *
sizeof(VARIANTARG));
2079 for (p = 0; p < pcount; ++p) {
2080 VARIANT *arg = dispParams.rgvarg + (pcount - p - 1);
2088 variant =
QVariant(*reinterpret_cast<int *>(argv[p+1]));
2100 variant =
QVariant(vt, argv[p + 1]);
2108 VariantInit(&retval);
2109 VARIANT *pretval = 0;
2116 IDispatch *disp = 0;
2117 c->pUnk->QueryInterface(IID_QAxEvents, (
void**)&disp);
2119 disp->Invoke(eventId, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &dispParams, pretval, 0, &argErr);
2123 for (p = 0; p < pcount; ++p) {
2136 clist->Next(cc, (CONNECTDATA*)&c, &cc);
2140 for (p = 0; p < pcount; ++p)
2142 free(dispParams.rgvarg);
2160 IConnectionPoint *cpoint = 0;
2163 IEnumConnections *clist = 0;
2164 cpoint->EnumConnections(&clist);
2169 clist->Next(cc, (CONNECTDATA*)&c, &cc);
2173 GetIDsOfNames(IID_NULL, &bstr, 1, LOCALE_USER_DEFAULT, &dispId);
2174 SysFreeString(bstr);
2176 if (dispId != -1)
while (cc) {
2178 IPropertyNotifySink *sink = 0;
2179 c->pUnk->QueryInterface(IID_IPropertyNotifySink, (
void**)&sink);
2180 bool disallows = sink && sink->OnRequestEdit(dispId) == S_FALSE;
2189 clist->Next(cc, (CONNECTDATA*)&c, &cc);
2208 IConnectionPoint *cpoint = 0;
2211 IEnumConnections *clist = 0;
2212 cpoint->EnumConnections(&clist);
2217 clist->Next(cc, (CONNECTDATA*)&c, &cc);
2221 GetIDsOfNames(IID_NULL, &bstr, 1, LOCALE_USER_DEFAULT, &dispId);
2222 SysFreeString(bstr);
2224 if (dispId != -1)
while (cc) {
2226 IPropertyNotifySink *sink = 0;
2227 c->pUnk->QueryInterface(IID_IPropertyNotifySink, (
void**)&sink);
2229 sink->OnChanged(dispId);
2234 clist->Next(cc, (CONNECTDATA*)&c, &cc);
2255 return DISP_E_BADINDEX;
2269 if (dwGuidKind == GUIDKIND_DEFAULT_SOURCE_DISP_IID) {
2299 return DISP_E_BADINDEX;
2304 (*pptinfo)->AddRef();
2313 LCID , DISPID* rgdispid)
2315 if (!rgszNames || !rgdispid)
2319 return DISP_E_UNKNOWNNAME;
2323 return DISP_E_UNKNOWNNAME;
2325 return m_spTypeInfo->GetIDsOfNames(rgszNames, cNames, rgdispid);
2332 LCID , WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pvarResult,
2333 EXCEPINFO* pexcepinfo, UINT* puArgErr)
2335 if (riid != IID_NULL)
2336 return DISP_E_UNKNOWNINTERFACE;
2338 return E_UNEXPECTED;
2340 HRESULT res = DISP_E_MEMBERNOTFOUND;
2342 bool uniqueIndex = wFlags == DISPATCH_PROPERTYGET || wFlags == DISPATCH_PROPERTYPUT || wFlags == DISPATCH_METHOD;
2351 if (dispidMember == DISPID_VALUE && (wFlags == DISPATCH_PROPERTYGET || wFlags == DISPATCH_PROPERTYPUT)) {
2362 m_spTypeInfo->GetNames(dispidMember, &bname, 1, &cname);
2367 SysFreeString(bname);
2374 oldSizeHint =
qt.widget->sizeHint();
2377 case DISPATCH_PROPERTYGET|DISPATCH_METHOD:
2378 case DISPATCH_PROPERTYGET:
2382 if (index == -1 && wFlags == DISPATCH_PROPERTYGET)
2387 if (index < mo->propertyCount())
2392 return DISP_E_PARAMNOTOPTIONAL;
2393 if (pDispParams->cArgs ||
2394 pDispParams->cNamedArgs)
2395 return DISP_E_BADPARAMCOUNT;
2399 res = DISP_E_MEMBERNOTFOUND;
2401 res = DISP_E_TYPEMISMATCH;
2405 }
else if (wFlags == DISPATCH_PROPERTYGET) {
2410 case DISPATCH_METHOD:
2414 nameLength = name.
length();
2417 if (!pDispParams->cArgs)
2433 int overload = regexp.
cap(1).
toInt() + 1;
2435 for (
int s = 0; s <
qt.object->metaObject()->methodCount(); ++s) {
2451 int lookupIndex =
index;
2457 name = slot.signature();
2458 nameLength = name.
indexOf(
'(');
2463 ptypes = prototype.
split(
',');
2464 int pcount = ptypes.
count();
2467 if (pcount > pDispParams->cArgs) {
2470 while (index < mo->methodCount()) {
2472 slot = mo->
method(index);
2477 if (pcount <= pDispParams->cArgs)
2481 if (pcount > pDispParams->cArgs)
2482 return DISP_E_PARAMNOTOPTIONAL;
2483 }
else if (pcount < pDispParams->cArgs) {
2484 return DISP_E_BADPARAMCOUNT;
2493 int totalParam = pcount;
2494 if (!type.isEmpty())
2498 void **argv_pointer = 0;
2504 argv_pointer = static_argv_pointer;
2507 argv =
new void*[pcount + 1];
2508 argv_pointer =
new void*[pcount + 1];
2512 argv_pointer[0] = 0;
2515 for (
int p = 0; p < pcount; ++p) {
2520 argv_pointer[p + 1] = 0;
2521 if (varp[p + 1].isValid()) {
2523 argv[p + 1] = varp[p + 1].data();
2524 }
else if (ptype ==
"QVariant") {
2525 argv[p + 1] = varp + p + 1;
2527 argv[p + 1] =
const_cast<void*
>(varp[p + 1].constData());
2529 argv_pointer[p + 1] = argv[p + 1];
2530 argv[p + 1] = argv_pointer + p + 1;
2533 }
else if (ptype ==
"QVariant") {
2534 argv[p + 1] = varp + p + 1;
2537 *puArgErr = pcount-p-1;
2543 if (!type.isEmpty()) {
2552 if (type ==
"QVariant")
2557 argv[0] =
const_cast<void*
>(varp[0].
constData());
2559 if (type.endsWith(
'*')) {
2560 argv_pointer[0] = argv[0];
2561 argv[0] = argv_pointer;
2573 for (
int p = 0; p < pcount; ++p) {
2577 if (!
QVariantToVARIANT(varp[p + 1], pDispParams->rgvarg[pcount - p - 1], ptype, out))
2581 if (!type.isEmpty() && pvarResult) {
2582 if (!varp[0].isValid() && type !=
"QVariant")
2588 if (argv && argv != static_argv) {
2590 delete []argv_pointer;
2594 res = ok ? S_OK : DISP_E_TYPEMISMATCH;
2597 index = lookupIndex;
2600 case DISPATCH_PROPERTYPUT:
2601 case DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF:
2610 if (index < mo->propertyCount())
2613 return DISP_E_MEMBERNOTFOUND;
2614 if (!pDispParams->cArgs)
2615 return DISP_E_PARAMNOTOPTIONAL;
2616 if (pDispParams->cArgs != 1 ||
2617 pDispParams->cNamedArgs != 1 ||
2618 *pDispParams->rgdispidNamedArgs != DISPID_PROPERTYPUT)
2619 return DISP_E_BADPARAMCOUNT;
2625 return DISP_E_BADVARTYPE;
2627 if (!
qt.object->setProperty(property.
name(), var)) {
2630 return DISP_E_TYPEMISMATCH;
2643 case DISPATCH_METHOD:
2644 case DISPATCH_PROPERTYPUT:
2645 case DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF:
2650 fmt.dwAspect = DVASPECT_CONTENT;
2652 fmt.tymed = TYMED_NULL;
2655 stg.tymed = TYMED_NULL;
2656 stg.pUnkForRelease = 0;
2674 if (index != -1 && uniqueIndex)
2679 memset(pexcepinfo, 0,
sizeof(EXCEPINFO));
2691 context = context.
mid(br+1);
2692 context = context.
left(context.
length() - 1);
2693 contextID = context.
toInt();
2696 context = context.
left(br-1);
2699 pexcepinfo->dwHelpContext = contextID;
2704 return DISP_E_EXCEPTION;
2706 QSize sizeHint =
qt.widget->sizeHint();
2707 if (oldSizeHint != sizeHint) {
2710 RECT rect = {0, 0, sizeHint.
width(), sizeHint.
height()};
2729 (*epoints)->AddRef();
2741 IConnectionPoint *cp =
points[iid];
2747 return CONNECT_E_NOCONNECTION;
2764 HRESULT hres = pStm->Stat(&stat, STATFLAG_DEFAULT);
2765 bool openAsText =
false;
2769 CoTaskMemFree(stat.pwcsName);
2771 if (stat.cbSize.HighPart)
2774 qtarray.
resize(stat.cbSize.LowPart);
2776 pStm->Read(qtarray.
data(), stat.cbSize.LowPart, &read);
2777 }
else if (hres == E_NOTIMPL) {
2779 while (hres != S_FALSE) {
2782 hres = pStm->Read(arrayRead.
data(), arrayRead.
size(), &read);
2783 if (hres != S_OK && hres != S_FALSE) {
2786 }
else if (read == 0)
2788 qtarray.
append(arrayRead);
2807 qtstream >> version;
2812 while (!qtbuffer.
atEnd() && more) {
2815 qtstream >> propname;
2816 if (propname.isEmpty())
2824 qt.object->setProperty(propname.toLatin1(), value);
2838 saved = axb && axb->
writeData(&qtbuffer);
2845 qtstream << qtstream.
version();
2855 if (qvar.isValid()) {
2869 ULARGE_INTEGER newsize;
2870 newsize.HighPart = 0;
2871 newsize.LowPart = qtarray.
size();
2872 pStm->SetSize(newsize);
2873 pStm->Write(data, qtarray.
size(), &written);
2874 pStm->Commit(STGC_ONLYIFCURRENT);
2886 pcbSize->HighPart = 0;
2887 pcbSize->LowPart = np * 50;
2897 return CO_E_ALREADYINITIALIZED;
2911 return CO_E_ALREADYINITIALIZED;
2913 IStream *spStream = 0;
2922 pStg->OpenStream((
const wchar_t *)streamName.
utf16(), 0, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &spStream);
2924 pStg->OpenStream(L
"SomeStreamName", 0, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &spStream);
2929 spStream->Release();
2936 IStream *spStream = 0;
2945 pStg->CreateStream((
const wchar_t *)streamName.
utf16(), STGM_CREATE | STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &spStream);
2949 Save(spStream,
true);
2951 spStream->Release();
2981 return CO_E_ALREADYINITIALIZED;
2997 return E_UNEXPECTED;
3005 const char* pname =
property.
name();
3009 HRESULT res = bag->Read(bstr, &var, 0);
3010 if (
property.isWritable() && var.vt != VT_EMPTY) {
3014 SysFreeString(bstr);
3047 bag->Write(bstr, &var);
3048 SysFreeString(bstr);
3058 if (
qt.object->metaObject()->indexOfClassInfo(
"MIME") == -1)
3067 if (
qt.object->metaObject()->indexOfClassInfo(
"MIME") == -1)
3074 IMalloc *malloc = 0;
3075 CoGetMalloc(1, &malloc);
3077 return E_OUTOFMEMORY;
3090 if (mimeIndex == -1)
3095 qWarning() <<
class_name <<
": No QAxBindable implementation for mime-type handling";
3101 QFile file(loadFileName);
3105 for (
int m = 0; m < mimeTypes.count(); ++m) {
3119 if (mimeExtension != fileExtension)
3122 if (axb->
readData(&file, mimeType)) {
3135 if (mimeIndex == -1)
3140 qWarning() <<
class_name <<
": No QAxBindable implementation for mime-type handling";
3146 QFile file(saveFileName);
3150 for (
int m = 0; m < mimeTypes.count(); ++m) {
3163 if (mimeExtension != fileExtension)
3179 HDC hicTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL ,
3183 return E_INVALIDARG;
3190 case DVASPECT_CONTENT:
3191 case DVASPECT_OPAQUE:
3192 case DVASPECT_TRANSPARENT:
3195 return DV_E_DVASPECT;
3200 bool bDeleteDC =
false;
3201 if (!hicTargetDev) {
3202 hicTargetDev = ::CreateDC(L
"DISPLAY", NULL, NULL, NULL);
3203 bDeleteDC = (hicTargetDev != hdcDraw);
3206 RECTL rc = *lprcBounds;
3207 bool bMetaFile = GetDeviceCaps(hdcDraw, TECHNOLOGY) == DT_METAFILE;
3209 ::LPtoDP(hicTargetDev, (LPPOINT)&rc, 2);
3213 HDC hdc = CreateCompatibleDC(0);
3214 SelectObject(hdc, hbm);
3215 ::StretchBlt(hdcDraw, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hdc, 0, 0,pm.
width(), pm.
height(), SRCCOPY);
3220 DeleteDC(hicTargetDev);
3229 HDC hicTargetDev, LOGPALETTE **ppColorSet)
3272 (*ppAdvSink)->AddRef();
3327 IDispatch *disp = 0;
3334 DISPPARAMS params = { 0, 0, 0, 0 };
3335 disp->Invoke(dispID, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, ¶ms, &var, 0, 0);
3340 case DISPID_AMBIENT_APPEARANCE:
3342 case DISPID_AMBIENT_AUTOCLIP:
3344 case DISPID_AMBIENT_BACKCOLOR:
3345 case DISPID_AMBIENT_FORECOLOR:
3348 if (var.vt == VT_UI4)
3350 else if (var.vt == VT_I4)
3357 qt.widget->setPalette(pal);
3360 case DISPID_AMBIENT_DISPLAYASDEFAULT:
3362 case DISPID_AMBIENT_DISPLAYNAME:
3363 if (var.vt != VT_BSTR || !
isWidget)
3367 case DISPID_AMBIENT_FONT:
3368 if (var.vt != VT_DISPATCH || !
isWidget)
3373 qt.widget->setFont(qfont);
3376 case DISPID_AMBIENT_LOCALEID:
3378 case DISPID_AMBIENT_MESSAGEREFLECT:
3379 if (var.vt != VT_BOOL)
3382 qt.widget->installEventFilter(
this);
3384 qt.widget->removeEventFilter(
this);
3386 case DISPID_AMBIENT_PALETTE:
3388 case DISPID_AMBIENT_SCALEUNITS:
3390 case DISPID_AMBIENT_SHOWGRABHANDLES:
3392 case DISPID_AMBIENT_SHOWHATCHING:
3394 case DISPID_AMBIENT_SUPPORTSMNEMONICS:
3396 case DISPID_AMBIENT_TEXTALIGN:
3398 case DISPID_AMBIENT_UIDEAD:
3399 if (var.vt != VT_BOOL || !
isWidget)
3401 qt.widget->setEnabled(!var.boolVal);
3403 case DISPID_AMBIENT_USERMODE:
3404 if (var.vt != VT_BOOL)
3408 case DISPID_AMBIENT_RIGHTTOLEFT:
3409 if (var.vt != VT_BOOL)
3483 IOleInPlaceUIWindow *spInPlaceUIWindow = 0;
3485 OLEINPLACEFRAMEINFO frameInfo;
3486 frameInfo.cb =
sizeof(OLEINPLACEFRAMEINFO);
3489 if (spInPlaceUIWindow) {
3490 spInPlaceUIWindow->SetActiveObject(0, 0);
3491 spInPlaceUIWindow->Release();
3522 if (prcPos == 0 || prcClip == 0)
3528 BOOL b = IntersectRect(&rcIXect, prcPos, prcClip);
3530 if (b && !EqualRect(&rcIXect, prcPos)) {
3531 OffsetRect(&rcIXect, -(prcPos->left), -(prcPos->top));
3532 tempRgn = CreateRectRgnIndirect(&rcIXect);
3535 ::SetWindowRgn(
m_hWnd, tempRgn,
true);
3536 ::SetWindowPos(
m_hWnd, 0, prcPos->left, prcPos->top,
3537 prcPos->right - prcPos->left, prcPos->bottom - prcPos->top,
3538 SWP_NOZORDER | SWP_NOACTIVATE);
3562 if (pMsg->message != WM_KEYDOWN || !
isWidget)
3566 if (::GetKeyState(VK_SHIFT) < 0)
3568 if (::GetKeyState(VK_CONTROL) < 0)
3570 if (::GetKeyState(VK_MENU) < 0)
3573 switch (LOWORD(pMsg->wParam)) {
3576 bool shift = ::GetKeyState(VK_SHIFT) < 0;
3578 QWidget *curFocus =
qt.widget->focusWidget();
3585 while (nextFocus != curFocus) {
3587 prevFocus = nextFocus;
3589 }
else if (nextFocus->
isWindow()) {
3590 topLevel = nextFocus;
3602 QWidget *nextFocus = curFocus;
3617 HWND hwnd = ::GetParent(
m_hWnd);
3644 int key = pMsg->wParam;
3645 if (!(key >=
'A' && key <=
'Z') && !(key >=
'0' && key <=
'9'))
3651 if (
override.isAccepted())
3660 IOleControlSite *controlSite = 0;
3661 m_spClientSite->QueryInterface(IID_IOleControlSite, (
void**)&controlSite);
3664 bool resetUserData =
false;
3666 #ifdef GWLP_USERDATA 3673 #ifdef GWLP_USERDATA 3674 LONG_PTR oldData = SetWindowLongPtr(pMsg->hwnd, GWLP_USERDATA, serverType);
3676 LONG oldData = SetWindowLong(pMsg->hwnd, GWL_USERDATA, serverType);
3678 HRESULT hres = controlSite->TranslateAcceleratorW(pMsg, dwKeyMod);
3679 controlSite->Release();
3681 #ifdef GWLP_USERDATA 3682 SetWindowLongPtr(pMsg->hwnd, GWLP_USERDATA, oldData);
3684 SetWindowLong(pMsg->hwnd, GWL_USERDATA, oldData);
3720 EnableWindow(
qt.widget->winId(), fEnable);
3728 LPOLESTR olestr = (
wchar_t*)CoTaskMemAlloc(qstring.
length()*2+2);
3730 olestr[qstring.
length()] = 0;
3744 switch (dwFormOfType) {
3745 case USERCLASSTYPE_FULL:
3748 case USERCLASSTYPE_SHORT:
3749 if (!
qt.widget || !
isWidget ||
qt.widget->windowTitle().isEmpty())
3754 case USERCLASSTYPE_APPNAME:
3776 STATDATA
data = { {0, 0, DVASPECT_CONTENT, -1, TYMED_NULL} , 0, pAdvSink, *pdwConnection };
3825 if (!m_spInPlaceSite)
3830 BOOL bNoRedraw =
false;
3831 hr = m_spInPlaceSite->CanInPlaceActivate();
3836 m_spInPlaceSite->OnInPlaceActivate();
3843 IOleInPlaceUIWindow *spInPlaceUIWindow = 0;
3845 if (m_spInPlaceSite->GetWindow(&hwndParent) == S_OK) {
3850 OLEINPLACEFRAMEINFO frameInfo;
3851 frameInfo.cb =
sizeof(OLEINPLACEFRAMEINFO);
3852 m_spInPlaceSite->GetWindowContext(&
m_spInPlaceFrame, &spInPlaceUIWindow, &rcPos, &rcClip, &frameInfo);
3854 ::ShowWindow(
m_hWnd, SW_SHOW);
3858 create(hwndParent, rcPos);
3866 for (
int w = 0; w < widgets.
count(); ++w) {
3875 hr = m_spInPlaceSite->OnUIActivate();
3879 if (spInPlaceUIWindow) spInPlaceUIWindow->Release();
3884 if (!::IsChild(
m_hWnd, ::GetFocus()))
3906 if (spInPlaceUIWindow) {
3908 spInPlaceUIWindow->SetBorderSpace(0);
3911 if (spInPlaceUIWindow) spInPlaceUIWindow->Release();
3935 case OLEIVERB_PRIMARY:
3936 case OLEIVERB_INPLACEACTIVATE:
3938 if (SUCCEEDED(hr)) {
3944 case OLEIVERB_UIACTIVATE:
3955 ::ShowWindow(
m_hWnd, SW_HIDE);
3992 (*ppClientSite)->AddRef();
4009 if (dwDrawAspect != DVASPECT_CONTENT || !
isWidget || !
qt.widget)
4084 #ifdef QT_DLL // avoid conflict with symbol in static lib 4096 if (dwDrawAspect != DVASPECT_CONTENT)
4097 return DV_E_DVASPECT;
4108 if (
qt.widget->minimumSize() ==
qt.widget->maximumSize() &&
qt.widget->minimumSize() != proposedSize)
4141 if (entry.dwConnection == dwConnection) {
4142 entry.pAdvSink->Release();
4147 return OLE_E_NOCONNECTION;
4166 if ((pformatetcIn->tymed & TYMED_MFPICT) == 0)
4167 return DATA_E_FORMATETC;
4171 return E_UNEXPECTED;
4175 IOleInPlaceUIWindow *spInPlaceUIWindow = 0;
4177 OLEINPLACEFRAMEINFO frameInfo;
4178 frameInfo.cb =
sizeof(OLEINPLACEFRAMEINFO);
4182 QSize size(rcPos.right - rcPos.left, rcPos.bottom - rcPos.top);
4185 qt.widget->adjustSize();
4187 if (spInPlaceUIWindow) spInPlaceUIWindow->Release();
4190 int width =
qt.widget->width();
4191 int height =
qt.widget->height();
4192 RECTL rectl = {0, 0, width, height};
4194 HDC hdc = CreateMetaFile(0);
4197 SetWindowExtEx(hdc, rectl.right, rectl.bottom, 0);
4199 Draw(pformatetcIn->dwAspect, pformatetcIn->lindex, 0, pformatetcIn->ptd, 0, hdc, &rectl, &rectl, 0, 0);
4202 HMETAFILE hMF = CloseMetaFile(hdc);
4204 return E_UNEXPECTED;
4206 HGLOBAL hMem = GlobalAlloc(GMEM_SHARE |
GMEM_MOVEABLE,
sizeof(METAFILEPICT));
4208 DeleteMetaFile(hMF);
4209 return ResultFromScode(STG_E_MEDIUMFULL);
4212 LPMETAFILEPICT pMF = (LPMETAFILEPICT)GlobalLock(hMem);
4220 pmedium->tymed = TYMED_MFPICT;
4221 pmedium->hGlobal = hMem;
4222 pmedium->pUnkForRelease = 0;
4231 IAdviseSink *pAdvSink, DWORD *pdwConnection)
4233 if (pformatetc->dwAspect != DVASPECT_CONTENT)
4238 {pformatetc->cfFormat,pformatetc->ptd,pformatetc->dwAspect,pformatetc->lindex,pformatetc->tymed},
4239 advf, pAdvSink, *pdwConnection
4337 RECT rect = {0, 0,
qt.widget->sizeHint().width(),
qt.widget->sizeHint().height()};
4341 switch (e->
type()) {
4343 static_cast<QChildEvent*
>(e)->child()->installEventFilter(
this);
4346 static_cast<QChildEvent*
>(e)->child()->removeEventFilter(
this);
4396 int button = me->
button();
4422 int button = me->
button();
4438 ShowWindow(
m_hWnd, SW_SHOW);
4443 ShowWindow(
m_hWnd, SW_HIDE);
4448 EnableWindow(
m_hWnd,
qt.widget->isEnabled());
4466 if (PeekMessage(&msg, 0, WM_USER+3078, WM_USER+3078, PM_REMOVE)) {
4467 TranslateMessage(&msg);
4468 DispatchMessage(&msg);
4488 #endif // QT_NO_WIN_ACTIVEQT static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVariant class acts like a union for the most common Qt data types.
static QString fromWCharArray(const wchar_t *, int size=-1)
Returns a copy of the string, where the encoding of string depends on the size of wchar...
bool isSeparator() const
Returns true if this action is a separator action; otherwise it returns false.
STDMETHOD() InitNew(VOID)
QAxFactory * qAxFactory()
HRESULT WINAPI QueryInterface(REFIID iid, void **iface)
union QAxServerBase::@0 qt
The QApplication class manages the GUI application's control flow and main settings.
void clearVARIANT(VARIANT *var)
static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qreal threshold)
The QKeyEvent class describes a key event.
unsigned long qAxUnlock()
IUnknown * m_outerUnknown
STDMETHOD() ContextSensitiveHelp(BOOL fEnterMode)
void truncate(int pos)
Truncates the byte array at index position pos.
unsigned long WINAPI Release()
QIntegerForSizeof< void * >::Unsigned quintptr
#define QAX_OUTPROC_SERVER
STDMETHOD() OnFrameWindowActivate(BOOL)
unsigned long __stdcall Release()
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
#define QT_END_NAMESPACE
This macro expands to.
CRITICAL_SECTION refCountSection
CRITICAL_SECTION createWindowSection
int width() const
Returns the width of the pixmap.
int lastIndexIn(const QString &str, int offset=-1, CaretMode caretMode=CaretAtZero) const
Attempts to find a match backwards in str from position offset.
char * data()
Returns a pointer to the data stored in the byte array.
STDMETHOD() SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
The QAxBindable class provides an interface between a QWidget and an ActiveX client.
The QRegExp class provides pattern matching using regular expressions.
STDMETHOD() GetAdvise(DWORD *aspects, DWORD *advf, IAdviseSink **pAdvSink)
STDMETHOD() GetSizeMax(ULARGE_INTEGER *pcbSize)
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
QClassFactory(CLSID clsid)
#define it(className, varName)
bool qax_winEventFilter(void *message)
QByteArray & append(char c)
Appends the character ch to this byte array.
HRESULT internalActivate()
QList< CONNECTDATA >::Iterator Iterator
Q_GUI_EXPORT int qt_translateKeyCode(int)
static QAbstractEventDispatcher * instance(QThread *thread=0)
Returns a pointer to the event dispatcher object for the specified thread.
STDMETHOD() GetExtent(DWORD dwDrawAspect, SIZEL *psizel)
bool open(OpenMode openMode)
Reimplemented Function
QAxConnection(const QAxConnection &old)
QMap< UINT, QAction * > actionMap
QString & replace(int i, int len, QChar after)
STDMETHOD() GetTypeInfoCount(UINT *pctinfo)
The QByteArray class provides an array of bytes.
CRITICAL_SECTION refCountSection
STDMETHOD() GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium)
bool emitRequestPropertyChange(const char *)
Call IPropertyNotifySink of connected clients.
#define MAP_LOGHIM_TO_PIX(x, ppli)
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
Policy horizontalPolicy() const
int length() const
Returns the number of characters in this string.
STDMETHOD() OnAmbientPropertyChange(DISPID)
void close()
Reimplemented Function
HRESULT InternalQueryInterface(REFIID iid, void **iface)
QString text
the action's descriptive text
STDMETHOD() FreezeEvents(BOOL)
int qt_metacall(QMetaObject::Call, int index, void **argv)
Catches all signals emitted by the Qt widget and fires the respective COM event.
STDMETHOD() Load(IStream *pStm)
STDMETHOD() Unadvise(DWORD dwConnection)
void removeEventFilter(QObject *)
Removes an event filter object obj from this object.
STDMETHOD() Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
void createMenu(QMenuBar *menuBar)
Creates a Win32 menubar.
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
QPointer< QStatusBar > statusBar
void updateMask()
Updates the mask of the widget parent.
The QAxFactory class defines a factory for the creation of COM components.
HRESULT WINAPI CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppObject)
IOleClientSite * m_spClientSite
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
HRESULT WINAPI RequestLicKey(DWORD, BSTR *pKey)
int count(const T &t) const
Returns the number of occurrences of value in the list.
STDMETHOD() ReactivateAndUndo()
struct tagFORMATETC FORMATETC
The QBuffer class provides a QIODevice interface for a QByteArray.
virtual bool writeData(QIODevice *sink)
If the COM object supports a MIME type then this function is called to store the COM object into sink...
STDMETHOD() SetHostNames(LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
The QString class provides a Unicode character string.
void setHeight(int h)
Sets the height to the given height.
QColor OLEColorToQColor(uint col)
STDMETHOD() Draw(DWORD dwAspect, LONG lIndex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDevice, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL(__stdcall *pfnContinue)(ULONG_PTR), ULONG_PTR dwContinue)
#define SetWindowOrgEx(a, b, c, d)
The QObject class is the base class of all Qt objects.
ITypeLib * qAxTypeLibrary
IOleInPlaceFrame * m_spInPlaceFrame
QtMsgType
This enum describes the messages that can be sent to a message handler (QtMsgHandler).
STDMETHOD() FindConnectionPoint(REFIID, IConnectionPoint **)
STDMETHOD() Unfreeze(DWORD dwFreeze)
virtual QStringList featureList() const =0
Reimplement this function to return a list of the widgets (class names) supported by this factory...
STDMETHOD() GetCurFile(LPOLESTR *currentFile)
QPointer< QObject > theObject
const T value(const Key &key) const
Returns the value associated with the key.
STDMETHOD() DUnadvise(DWORD dwConnection)
QObject * qObject() const
HMENU createPopup(QMenu *popup, HMENU oldMenu=0)
static int mapModifiers(int state)
bool isNull() const
Returns true if this is the null UUID {00000000-0000-0000-0000-000000000000}; otherwise returns false...
iterator Iterator
Qt-style synonym for QList::iterator.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
static QString translate(const char *context, const char *key, const char *disambiguation=0, Encoding encoding=CodecForTr)
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
void setVersion(int)
Sets the version number of the data serialization format to v.
STDMETHOD() EnumConnectionPoints(IEnumConnectionPoints **)
The QStatusBar class provides a horizontal bar suitable for presenting status information.
HRESULT WINAPI QueryInterface(REFIID iid, void **iface)
STDMETHOD() Advise(IAdviseSink *pAdvSink, DWORD *pdwConnection)
void setWidth(int w)
Sets the width to the given width.
QAxSignalVec(const QAxServerBase::ConnectionPoints &points)
STDMETHOD() OnDocWindowActivate(BOOL fActivate)
The QAxAggregated class is an abstract base class for implementations of additional COM interfaces...
void internalConnect()
Connects object signals to event dispatcher.
STDMETHOD() TranslateAcceleratorW(MSG *pMsg)
unsigned long qaxserverbase_instance_count
QAxServerBase(const QString &classname, IUnknown *outerUnknown)
Constructs a QAxServerBase object wrapping the QWidget classname into an ActiveX control.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
int key() const
Returns the code of the key that was pressed or released.
STDMETHOD() DAdvise(FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
void updateGeometry()
Updates the internal size values.
STDMETHOD() InPlaceDeactivate()
int width() const
Returns the width.
static QWidget * activeModalWidget()
Returns the active modal widget.
virtual QAxAggregated * createAggregate()
Reimplement this function when you want to implement additional COM interfaces in the ActiveX control...
void append(const T &t)
Inserts value at the end of the list.
QPointer< QMenu > currentPopup
bool atEnd() const
Reimplemented Function
#define QT_BEGIN_NAMESPACE
This macro expands to.
QAxAggregated * aggregatedObject
CRITICAL_SECTION refCountSection
STDMETHOD() SetColorScheme(LOGPALETTE *pLogPal)
QAxExceptInfo(int c, const QString &s, const QString &d, const QString &x)
STDMETHOD() EnableModeless(BOOL)
void qWinMsgHandler(QtMsgType t, const char *str)
IAdviseSink * m_spAdviseSink
STDMETHOD() ResizeBorder(LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
STDMETHOD() Freeze(DWORD dwAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
CRITICAL_SECTION refCountSection
void init()
Initializes data members.
void registerActiveObject(IUnknown *object)
STDMETHOD() GetUserClassID(CLSID *pClsid)
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
STDMETHOD() GetControlInfo(LPCONTROLINFO)
const QChar * unicode() const
Returns a '\0'-terminated Unicode representation of the string.
QByteArray & buffer()
Returns a reference to the QBuffer's internal buffer.
virtual bool hasStockEvents(const QString &key) const
Reimplement this function to return true if the ActiveX control key should support the standard Activ...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QList< STATDATA > adviseSinks
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
const T value(const Key &key) const
Returns the value associated with the key key.
unsigned long WINAPI Release()
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
void revokeActiveObject()
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event)
The QResizeEvent class contains event parameters for resize events.
bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &typeName, bool out)
Q_CORE_EXPORT void qWarning(const char *,...)
STDMETHOD() EnumAdvise(IEnumSTATDATA **ppenumAdvise)
static const char * data(const QByteArray &arr)
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
STDMETHOD() DoVerb(LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
Type
This enum type defines the types of variable that a QVariant can contain.
#define FALSE
Synonym for false.
STDMETHOD() InitFromData(IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved)
HRESULT WINAPI CreateInstanceHelper(IUnknown *pUnkOuter, REFIID iid, void **ppObject)
struct tagSTGMEDIUM STGMEDIUM
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
STDMETHOD() OnMnemonic(LPMSG)
HRESULT WINAPI CreateInstanceLic(IUnknown *pUnkOuter, IUnknown *pUnkReserved, REFIID iid, BSTR bKey, PVOID *ppObject)
The QRegion class specifies a clip region for a painter.
#define MAP_PIX_TO_LOGHIM(x, ppli)
virtual bool readData(QIODevice *source, const QString &format)
If the COM object supports a MIME type then this function is called to initialize the COM object from...
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
STDMETHOD() UIDeactivate()
QByteArray left(int len) const
Returns a byte array that contains the leftmost len bytes of this byte array.
STDMETHOD() GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid)
virtual bool createObjectWrapper(QObject *object, IDispatch **wrapper)
Reimplement this function to provide the COM object for object in wrapper.
QByteArray mid(int index, int len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos...
virtual bool stayTopLevel(const QString &key) const
Reimplement this function to return true if the ActiveX control key should be a top level window...
virtual QUuid eventsID(const QString &key) const
Reimplement this function to return the identifier of the event interface for each key returned by th...
const char * typeName() const
Returns the name of the type stored in the variant.
int indexOf(char c, int from=0) const
Returns the index position of the first occurrence of the character ch in the byte array...
STDMETHOD() SetMoniker(DWORD dwWhichMoniker, IMoniker *ppmk)
unsigned long WINAPI AddRef()
Qt::MouseButton button() const
Returns the button that caused the event.
QAxSignalVec(const QAxSignalVec &old)
STDMETHOD() GetClassInfo(ITypeInfo **pptinfo)
STDMETHOD() SaveCompleted(IStorage *pStgNew)
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
QMap< QUuid, IConnectionPoint * >::Iterator ConnectionPointsIterator
The QMouseEvent class contains parameters that describe a mouse event.
iterator begin()
Returns an STL-style iterator pointing to the first item in the map.
#define TRUE
Synonym for true.
int version() const
Returns the version number of the data serialization format.
int length() const
Same as size().
bool QVariantToVoidStar(const QVariant &var, void *data, const QByteArray &typeName, uint type)
Copies the data in var into data.
The QChildEvent class contains event parameters for child object events.
bool eventFilter(QObject *o, QEvent *e)
Filters events if this object has been installed as an event filter for the watched object...
STDMETHOD() HandsOffStorage()
bool ignoreSlots(const char *test)
const char * constData() const
Returns a pointer to the data stored in the byte array.
CRITICAL_SECTION refCountSection
bool isNull() const
Returns true if this string is null; otherwise returns false.
static QByteArray prototype(const QList< QByteArray > ¶meterTypes, const QList< QByteArray > ¶meterNames, bool *ok)
STDMETHOD() GetDataHere(FORMATETC *, STGMEDIUM *)
int remove(const Key &key)
Removes all the items that have the key key from the map.
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
QAxServerAggregate(const QString &className, IUnknown *outerUnknown)
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays...
void ensureMetaData()
Makes sure the type info is loaded.
void update()
Updates the view, or asks the client site to do so.
HRESULT WINAPI QueryInterface(REFIID iid, LPVOID *iface)
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
QMenu * menu() const
Returns the menu contained by this action.
QMap< HMENU, QMenu * > menuMap
bool ignoreProps(const char *test)
IUnknown * m_outerUnknown
Qt::MouseButtons buttons() const
Returns the button state when the event was generated.
STDMETHOD() SetAdvise(DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
STDMETHOD() GetMiscStatus(DWORD dwAspect, DWORD *pdwStatus)
The QFile class provides an interface for reading from and writing to files.
STDMETHOD() GetUserType(DWORD dwFormOfType, LPOLESTR *pszUserType)
HBITMAP toWinHBITMAP(HBitmapFormat format=NoAlpha) const
It is the caller's responsibility to free the HBITMAP data after use.
The QMap::iterator class provides an STL-style non-const iterator for QMap and QMultiMap.
unsigned long WINAPI AddRef()
LRESULT QT_WIN_CALLBACK axs_FilterProc(int nCode, WPARAM wParam, LPARAM lParam)
unsigned long WINAPI Release()
STDMETHOD() GetCanonicalFormatEtc(FORMATETC *, FORMATETC *)
virtual bool validateLicenseKey(const QString &key, const QString &licenseKey) const
Reimplement this function to return true if licenseKey is a valid license for the class key...
The QFont class specifies a font used for drawing text.
static QCoreApplication * instance()
Returns a pointer to the application's QCoreApplication (or QApplication) instance.
QtMsgHandler qInstallMsgHandler(QtMsgHandler h)
HRESULT WINAPI LockServer(BOOL fLock)
QString text() const
Returns the Unicode text that this key generated.
void removeMenu()
Remove the Win32 menubar.
IUnknown * controlling_unknown
STDMETHOD() GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the map...
static QByteArray paramType(const QByteArray &ptype, bool *out)
HRESULT WINAPI GetLicInfo(LICINFO *pLicInfo)
int lastIndexOf(QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
int y() const
Returns the y position of the mouse cursor, relative to the widget that received the event...
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
EventFilter setEventFilter(EventFilter filter)
Replaces the event filter function for this QAbstractEventDispatcher with filter and returns the repl...
CRITICAL_SECTION createWindowSection
HRESULT GetClassObject(REFIID clsid, REFIID iid, void **ppUnk)
bool qt_sendSpontaneousEvent(QObject *, QEvent *)
static LRESULT QT_WIN_CALLBACK ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
const void * constData() const
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
Q_DECL_CONSTEXPR const T & qBound(const T &min, const T &val, const T &max)
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
static BSTR QStringToBSTR(const QString &str)
void resize(const QSize &newSize)
Resizes the control, faking a QResizeEvent if required.
void resize(int size)
Sets the size of the byte array to size bytes.
unsigned long __stdcall Release()
QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint type)
Returns arg as a QVariant of type type.
int & rheight()
Returns a reference to the height.
STDMETHOD() SetExtent(DWORD dwDrawAspect, SIZEL *psizel)
Policy verticalPolicy() const
bool internalCreate()
Creates the QWidget for the classname passed to the c'tor.
int height() const
Returns the height.
if(void) toggleToolbarShown
QList< IConnectionPoint * > cpoints
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
STDMETHOD() GetGUID(DWORD dwGuidKind, GUID *pGUID)
STDMETHOD() SetClientSite(IOleClientSite *pClientSite)
bool isPropertyExposed(int index)
Returns true if the property index is exposed to COM and should be saved/loaded.
const QObjectList & children() const
Returns a list of child objects.
T qvariant_cast(const QVariant &)
int size() const
Returns the number of bytes in this byte array.
void reportError(int code, const QString &src, const QString &desc, const QString &context)
virtual long queryInterface(const QUuid &iid, void **iface)=0
Reimplement this pure virtual function to support additional COM interfaces.
QList< CONNECTDATA > Connections
QAxExceptInfo * exception
QVariant property(const char *name) const
Returns the value of the object's name property.
The QPixmap class is an off-screen image representation that can be used as a paint device...
int height() const
Returns the height of the pixmap.
HWND create(HWND hWndParent, RECT &rcPos)
Creates the window hosting the QWidget.
STDMETHOD() GetClipboardData(DWORD dwReserved, IDataObject **ppDataObject)
STDMETHOD() GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo **pptinfo)
STDMETHOD() SetData(FORMATETC *, STGMEDIUM *, BOOL)
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
The QSize class defines the size of a two-dimensional object using integer point precision.
QHash< int, DISPID > signalCache
unsigned long __stdcall AddRef()
STDMETHOD() GetColorSet(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
IUnknown * clientSite() const
The QDataStream class provides serialization of binary data to a QIODevice.
STDMETHOD() EnumDAdvise(IEnumSTATDATA **ppenumAdvise)
STDMETHOD() GetWindow(HWND *pHwnd)
void setSizeGripEnabled(bool)
STDMETHOD() TranslateAcceleratorA(MSG *pMsg)
unsigned long __stdcall AddRef()
void emitPropertyChanged(const char *)
Call IPropertyNotifySink of connected clients.
STDMETHOD() Save(IStream *pStm, BOOL fClearDirty)
virtual const QMetaObject * metaObject(const QString &key) const =0
Reimplement this function to return the QMetaObject corresponding to key, or 0 if this factory doesn'...
static LPOLESTR QStringToOLESTR(const QString &qstring)
Q_CORE_EXPORT int qstricmp(const char *, const char *)
QHash< long, int > indexCache
void internalBind()
Detects and initilaizes implementation of QAxBindable in objects.
virtual QObject * createObject(const QString &key)=0
Reimplement this function to return a new object for key, or 0 if this factory doesn't support the va...
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
static Type nameToType(const char *name)
Converts the string representation of the storage type given in name, to its enum representation...
QPointer< QMenuBar > menuBar
QAxConnection(QAxServerBase *parent, const QUuid &uuid)
QMap< QUuid, IConnectionPoint * > ConnectionPoints
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
STDMETHOD() EnumFormatEtc(DWORD, IEnumFORMATETC **)
#define QAX_INPROC_SERVER
static QString fileName(const QString &fileUrl)
~QAxServerBase()
Destroys the QAxServerBase object, releasing all allocated resources and interfaces.
unsigned long WINAPI AddRef()
STDMETHOD() Close(DWORD dwSaveOption)
bool qax_disable_inplaceframe
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static QPixmap grabWidget(QWidget *widget, const QRect &rect)
Creates a pixmap and paints the given widget, restricted by the given rectangle, in it...
void clear()
Removes all items from the map.
The QAction class provides an abstract user interface action that can be inserted into widgets...
STDMETHOD() QueryGetData(FORMATETC *)
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
The QUuid class stores a Universally Unique Identifier (UUID).
static void enterWhatsThisMode()
This function switches the user interface into "What's This?" mode.
static void leaveWhatsThisMode()
If the user interface is in "What's This?" mode, this function switches back to normal mode; otherwis...
Handle handle() const
Returns a platform-specific region handle.
virtual QUuid classID(const QString &key) const
Reimplement this function to return the class identifier for each key returned by the featureList() i...
int & rwidth()
Returns a reference to the width.
bool endsWith(const QByteArray &a) const
Returns true if this byte array ends with byte array ba; otherwise returns false. ...
IOleInPlaceSiteWindowless * m_spInPlaceSite
int x() const
Returns the x position of the mouse cursor, relative to the widget that received the event...
STDMETHOD() EnumVerbs(IEnumOLEVERB **ppEnumOleVerb)
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
STDMETHOD() GetClientSite(IOleClientSite **ppClientSite)
const ushort * utf16() const
Returns the QString as a '\0\'-terminated array of unsigned shorts.
static bool checkHRESULT(HRESULT hres)
The QPalette class contains color groups for each widget state.
void removeAt(int i)
Removes the item at index position i.