The event object "e" is passed as a managed reference (MouseEventArgs^). To get at its members means you use the stabbity -> operator, just as if it were a native pointer (SomeType*). The . operator is for local stack type instances (native or managed) or things passed as a native reference (SomeType&) or CLR tracking reference (ManagedType%).
Name:
Anonymous2008-12-12 2:38
>>I've tried the MSDN site, using examples directly from it, but no surprise at all when the shit didn't work.
Every MSDN example is buggy to some extent. I don't know if it's that they don't test any of it, or want to stop copypasta coding or what.
Name:
Anonymous2008-12-12 7:26
>>1
Why are you using that horrible abomination called C++/CLI? If you want to use the .NET framework just use C#.
Name:
Anonymous2008-12-12 8:17
>>6
C# can be pretty terrible at interop at times. Though it's not as bad as F#, I guess.
Name:
Anonymous2008-12-12 12:35
Even Microsoft don't expect people to use Sepples/CLI for more than glue layers between new and legacy code.
Just put your interop there, and then for the rest of the code you can choose java-on-steroids, lol OCaml sorta, FIOC or slow as fuck.
error C2039: 'Left' : is not a member of System::Windows::Forms::Control::MouseButtons'
error C2039: 'set' : is not a member of 'System::Windows::Forms::MouseEventArgs::Button'
I should probably just go back to Delphi. =/
Name:
Anonymous2008-12-12 15:25
>>9
use c#; it's crap, but still way better than sepples or borland.
Name:
Anonymous2008-12-12 15:39
>>9
I just took this piece of code out of the MouseButtons Enumeration MSDN, pasted it into a brand new WinForms C++ project in VS2008, and it built for me with
if ( e->Button == System::Windows::Forms::MouseButtons::Left )
so it's hard to tell from just the snippet what's up.
Name:
Anonymous2008-12-12 15:43
>>11
Well, that worked. Why the fuck are there different pages for the same things? The page that I found had the snippet that I started this topic with.
Thanks.
Name:
Anonymous2008-12-12 17:04
>>9
Add a reference to the System.Windows.Forms assembly to resolve the missing symbols