Hi folks,
I have embedded an ActiveX control (Moving Map ActiveX Control by Global Majic Software Inc.) into my Qt (4.1.3) application successfully:
moving_map
->setControl
(QString::fromUtf8("{D5F63C24-B3D3-11D0-B8F0-0020AF344E0A}"));
QAxWidget *moving_map = new QAxWidget(map_frame);
moving_map->setControl(QString::fromUtf8("{D5F63C24-B3D3-11D0-B8F0-0020AF344E0A}"));
To copy to clipboard, switch view to plain text mode
and all of the following settings are working as expected:
moving_map->dynamicCall("SetObjects(1)");
moving_map->dynamicCall("SetZoomEnabled(true)");
moving_map->setProperty("ObjectHeadingLineRange", 50.0);
moving_map->dynamicCall("SetObjectHeadingLineColor(OLE_COLOR)", 0x00ff00);
moving_map->dynamicCall("SetObjects(1)");
moving_map->dynamicCall("SetZoomEnabled(true)");
moving_map->setProperty("ObjectHeadingLineRange", 50.0);
moving_map->dynamicCall("SetObjectHeadingLineColor(OLE_COLOR)", 0x00ff00);
To copy to clipboard, switch view to plain text mode
BUT: now I want to set a map-image to my control. The interface description offers this function:
void SetMapPicture(LPPICTUREDISP picture);
I tried it with this:
/*a:*/ moving_map->dynamicCall("SetMapPicture(IPictureDisp*)", map_image);
// or
/*b:*/ moving_map->setProperty("MapPicture", map_image);
QPixmap map_image("blabla.bmp");
/*a:*/ moving_map->dynamicCall("SetMapPicture(IPictureDisp*)", map_image);
// or
/*b:*/ moving_map->setProperty("MapPicture", map_image);
To copy to clipboard, switch view to plain text mode
It compiles well but at runtime I get the following messages all the time:
a: QAxBase: Error calling IDispatch member SetMapPicture: Type mismatch in parameter 0.
or
b: QAxBase: Error calling IDispatch member MapPicture: Type mismatch in parameter 0.
What am I doing wrong??? What will work????
I hope that anyone can help....
Kind regards,
Andreas
Bookmarks