Write code in C++

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

Write code in C++
 
putra n9




Posts: 18
Joined: 2010-11-23
hi,

I want to know how to write a code in C++.Before this i write a code in VB.Following are my code.

Public WithEvents instHtmlButton As mshtml.HTMLButtonElement

Private Function instHtmlButton_onclick() As Boolean Handles instHtmlButton.onclick
MessageBox.Show("OK")
End Function

Private Sub IEModule_DocumentComplete(ByVal pDisp As Object, ByVal url As String) Handles Me.DocumentComplete

Me.instHtmlButton = Nothing

If (Not IsNothing(Me.HTMLDocumentObj())) Then
Me.instHtmlButton = Me.HTMLDocument.getElementById("sampleButton")
End If
End Sub
Posted 24 Nov, 2010 21:24:19 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Putra,

Here is the raw sketch sample code:

private: System::Void adxieContextMenuCommandItem1_OnClick(System::Object^  sender, System::Object^  eventObject) {
	 System::Windows::Forms::MessageBox::Show("test");
}

private: System::Void IEModule_DownloadComplete() {				 
     if (HTMLDocument()!=nullptr)
     {
	 System::Object ^ obj =	this->HTMLDocument()->getElementById("sampleButton");
     }
}
.NET, Extended MAPI, Windows Phone & RT
Posted 25 Nov, 2010 05:55:37 Top
putra n9




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

I'm done, but a bit confuse, let say i put the code at IEModule.h,
on the IEModule.cpp how can i call it?

I'm try to learn something new.
Posted 25 Nov, 2010 21:40:41 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Putra,

Please have a look at the C++: The Most Powerful Language for .NET Framework Programming article in MSDN.
.NET, Extended MAPI, Windows Phone & RT
Posted 26 Nov, 2010 05:10:40 Top