severino Posted April 21, 2007 Share Posted April 21, 2007 Hello,we develop software components in ActiveX and .NET format.One of our customers reported us that it cannot use our ActiveX controls within AutoIt because when he tries to call one of the control's methods (for example the AboutBox) he gets the following error:C:\temp\test.au3 (32) : ==> The requested action with this object has failed.: $oTest.AboutBox() $oTest.AboutBox()^ ERRORThe simple source code used is the following:#include <GUIConstants.au3>#include <Constants.au3>; ;Create reference to COM object; ;Create GUI$Main_Window = GUICreate ("My Window", 600, 600, 100, 100, $WS_POPUP)$oTest = ObjCreate ("TESTAX.TestAxCtrl.1")$AboutC = GUICtrlCreateButton('About',105,177,70,20)$GUIActiveX = GUICtrlCreateObj ($oTest, 100, 100, 10, 10)GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $AboutC $oTest.AboutBox() EndSelect WendGUIDelete ($Main_Window)$Recorder = 0Our controls are based upon the MFC framework and are actually compatible with most control containers available on the market: are you aware of any issue with ActiveX developed using the MFC framework? We have tried to develop a new basic control from scratch, simply having an AboutBox method inside, using Visual C++ 6 and we experienced exactly the same issue; on the other hand controls developed using Visual Basic 6 work as expected inside AutoIt: any help on this issue would be much appreciated.Thanks in advance and Kind RegardsSeverino DelaurentiMultiMedia Softhttp://www.multimediasoft.com Link to comment Share on other sites More sharing options...
lsakizada Posted April 21, 2007 Share Posted April 21, 2007 (edited) Hello,we develop software components in ActiveX and .NET format.One of our customers reported us that it cannot use our ActiveX controls within AutoIt because when he tries to call one of the control's methods (for example the AboutBox) he gets the following error:C:\temp\test.au3 (32) : ==> The requested action with this object has failed.: $oTest.AboutBox() $oTest.AboutBox()^ ERRORThe simple source code used is the following:I tested your code and it's worked on my XP system. EDIT: woops .... it did not worked for me since there is no TESTAX.TestAxCtrl.1 progid on my machine ... Edited April 21, 2007 by lsakizada Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
severino Posted April 21, 2007 Author Share Posted April 21, 2007 I tested your code and it's worked on my XP system. EDIT: woops .... it did not worked for me since there is no TESTAX.TestAxCtrl.1 progid on my machine ...Hello,you can download the mentioned test control from the following link:http://www.multimediasoft.com/temp/TestAx.zipit has no dependencies because MFCs are linked statically so you can copy the contained TestAx.ocx control wherever you want inside your system and register it using RegSvr32.exeThis code works perfectly with Visual Basic 6 generated controls but, as you will see, the same code will not work with MFC based controls: quite weird...Kind regardsSeverino DelaurentiMultiMedia Softhttp://www.multimediasoft.com Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now