TaskDialog with C++ |
Post Reply |
Author | |
AndreasM
Newbie Joined: 25 August 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 26 August 2008 at 10:36am |
Hi,
this topic is quite similar to may other topic (TaskDialog with JScript) as I get the same errors: I'm trying to use the ActiveX TaskDialog with C++ (code see below). creating the dispatch interface works but calling any method or setting any property throws a COleException with m_sc = -2147418113 Does anyone has examples how to use the TaskDialog ActiveX from C++? Yes, I know that there's an MFC-Version but we purchased the ActiveX version to use the control with different programming languages... Any sample code or tip is appreciated! Thanks, Andreas ___________________________________________________ CDTaskDialog TaskDlg; try { TaskDlg.CreateDispatch(L"Codejock.TaskDialog.12.0.1"); TaskDlg.SetWindowTitle(L"Test"); TaskDlg.ShowDialog(); } catch(CException* e) { if(e) { e->ReportError(); e->Delete(); } } } |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Please attach project to test. Maybe forgot AfxOleInit() or something...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
AndreasM
Newbie Joined: 25 August 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Hi,
I made a small C++ MFC sample with VC 2005 (Version 8.0.50727.762 SP.050727-7600), of course with AfxOleInit() You can find the source below. The effect is the same as with JScript: CreateDispatch works and loads the .ocx into the process, but the rest not... Maybe I forgot some other stuff? Some C++ samples would be very helpful here! Best regards, Andreas uploads/20080827_034412_ControlTest.zip |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Here sample project. It only use TaskDialog from 12.1 beta :( so you need change GUIDs.
Basic idea is to put TaskDialog to dialog as ActiveX and let VisualStudio generate headers.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
AndreasM
Newbie Joined: 25 August 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Hi Oleg,
basically this sounds good. But I still have some problems here (when I try it in a new project): - I insert an ActiveX Control to my dialog -> 'XTreme TaskDialog Control' -> Fine! - But then I want to add a dialog variable ('Add Variable...') to trigger the generation of the wrapper class -> VisualStudio reports an error 'The Extender Provider failed to return an Extender for this object' With other ActiveX Controls (e.g. Adobe PDF reader) I've got no problems here, the wrapper class gets generated! By the way, I posted another task to this forum: TaskDialog with JScript -> maybe you've some hints here, too?? Thank you very much for your assistance, Andreas |
|
AndreasM
Newbie Joined: 25 August 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Hi Oleg,
problem has gone as we gave back the ActiveX version and purchased the MFC-version.... Best regards, Andreas |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |