Convert code from VB to C++

Add-in Express™ Support Service
That's what is more important than anything else

Convert code from VB to C++
i want to convert code program from VB to C++ 
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Putra.

You can use any of these declarations. Also you declare the variable as the mshtml.IHTMLButtonElement type.
Posted 18 Jan, 2011 05:36:49 Top
putra n9




Posts: 18
Joined: 2010-11-23
Hi Sergey,

I try to use mshtml.IHTMLButtonElement or mshtml.HTMLButtonElement to declare a variable but look like in C++ there is no declaration type of mshtml.IHTMLButtonElement or mshtml.HTMLButtonElement. But in VB i can use it completely.

Is there any suggestion for me?
Posted 19 Jan, 2011 08:52:17 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Putra.

I can use the mshtml::IHTMLButtonElement and mshtml::HTMLButtonElement types without any problems. Do you have the Microsoft.mshtml interop assembly included in your project?

mshtml::IHTMLButtonElement^ mybutton;
mshtml::HTMLButtonElement^ mybutton1;
Posted 20 Jan, 2011 07:21:42 Top
putra n9




Posts: 18
Joined: 2010-11-23
Yes, i have include the Microsoft.mshtml interop assembly in my project.

How to create their eventhandler for mshtml::IHTMLButtonElement^ mybutton?

Because i try to use the System::EventHandler, but an error occur.
Posted 23 Jan, 2011 12:50:42 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Putra.

You need to use the ADXIEHTMLDocEvents component to connect to events of HTML elements.
Posted 25 Jan, 2011 11:28:16 Top