Click here to Skip to main content
15,902,112 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: static constant string Pin
VizOne13-Feb-03 8:33
VizOne13-Feb-03 8:33 
GeneralentryPoint of a PE file Pin
blacksun_damn4-Feb-03 19:44
blacksun_damn4-Feb-03 19:44 
GeneralConverting byte[] to System::Byte[] and vice versa Pin
Martin Haesemeyer2-Feb-03 7:45
Martin Haesemeyer2-Feb-03 7:45 
GeneralRe: Converting byte[] to System::Byte[] and vice versa Pin
Paul Selormey2-Feb-03 19:21
Paul Selormey2-Feb-03 19:21 
GeneralRe: Converting byte[] to System::Byte[] and vice versa Pin
Martin Haesemeyer3-Feb-03 4:33
Martin Haesemeyer3-Feb-03 4:33 
GeneralRe: Converting byte[] to System::Byte[] and vice versa Pin
Paul Selormey3-Feb-03 13:29
Paul Selormey3-Feb-03 13:29 
GeneralOptimizing Event Implementation in MC++ Pin
Paul Selormey30-Jan-03 14:59
Paul Selormey30-Jan-03 14:59 
GeneralRe: Optimizing Event Implementation in MC++ Pin
Jeff J31-Jan-03 12:00
Jeff J31-Jan-03 12:00 
Hello Paul,

This stuff sure is in dark, poorly-charted waters! It wasn't easy to find, but this seems to be the MC++ translation:


private:
   static Object *ClickEvent = new Object();
            
public:

   __event void add_Click(EventHandler *pEH)
   {
      get_Events()->AddHandler(ClickEvent, pEH);
   }

   __event void remove_Click(EventHandler *pEH)
   {
      get_Events()->RemoveHandler(ClickEvent, pEH);
   }

protected:
   virtual void onclick(EventArgs *e)
   {
      EventHandler *clickEventDelegate = (EventHandler*)( get_Events()->get_Item(ClickEvent) );
      if (clickEventDelegate != null) {
         clickEventDelegate(this, e);
      }
   }



However, I am unsure about how to properly declare ClickEvent, since I cannot find an equivalent to C#'s readonly. Most of this stuff I found in MSDN under the "Managed Extensions for C++ Specification", section "10 Events" ("ms-help://MS.VSCC/MS.MSDNVS/vcmxspec/html/vcManagedExtensionsSpec_10.htm"), and pages on __event and __delegate. MC++ is not exactly well documented!

You are one of the few people on this site who seem interested in delving deeper into MC++. Part of it is probably due to so little attention in documenting MC++ like C# is, as you mentioned. I sure hope this gets more coverage after VS.NET 2003 is released (HINT, HINT, any VS.NET team people out there)...

Cheers
GeneralRe: Optimizing Event Implementation in MC++ Pin
Paul Selormey31-Jan-03 23:59
Paul Selormey31-Jan-03 23:59 
GeneralSerial Communication threw .NET C++ Pin
megadith28-Jan-03 3:50
megadith28-Jan-03 3:50 
QuestionHow to call the ::MessageBox ? Pin
roy_a24-Jan-03 23:13
roy_a24-Jan-03 23:13 
AnswerRe: How to call the ::MessageBox ? Pin
Jeff J25-Jan-03 10:29
Jeff J25-Jan-03 10:29 
GeneralManaged C++ to PDA Pin
pjm31323-Jan-03 6:30
pjm31323-Jan-03 6:30 
GeneralRe: Managed C++ to PDA Pin
Jeff J25-Jan-03 10:08
Jeff J25-Jan-03 10:08 
Generalvisual designing of the forms Pin
suka23-Jan-03 5:19
suka23-Jan-03 5:19 
GeneralRe: visual designing of the forms Pin
Jeff J25-Jan-03 9:55
Jeff J25-Jan-03 9:55 
GeneralCrystal Report Pin
Exceter20-Jan-03 18:58
Exceter20-Jan-03 18:58 
GeneralCursors in .NET Assembly DLL Pin
Paul Selormey19-Jan-03 13:19
Paul Selormey19-Jan-03 13:19 
Generalarm animation Pin
Anonymous17-Jan-03 14:58
Anonymous17-Jan-03 14:58 
GeneralNo output from << operator in console app Pin
malmi17-Jan-03 10:51
malmi17-Jan-03 10:51 
GeneralRe: No output from << operator in console app - code correction Pin
malmi17-Jan-03 11:08
malmi17-Jan-03 11:08 
GeneralRe: No output from << operator in console app - code correction Pin
Jeff J18-Jan-03 0:17
Jeff J18-Jan-03 0:17 
GeneralRe: No output from << operator in console app - code correction Pin
malmi18-Jan-03 6:02
malmi18-Jan-03 6:02 
GeneralStupid question about VC6 to VC.Net migration reason Pin
Member 13901616-Jan-03 0:23
Member 13901616-Jan-03 0:23 
GeneralSystem::String/StringBuilder as out parameter Pin
Paul Selormey14-Jan-03 22:23
Paul Selormey14-Jan-03 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.