|
XOR isn't supported under GDI+, from what I can infer it was because XOR was used as a hack because of speed/memory constraints and the proper way now is to ensure that what you are drawing is visible (grey's around the 128 area don't show up well at all when black is xor'd on it).
James
Simplicity Rules!
|
|
|
|
|
|
Nish [BusterBoy] wrote:
C++ IJW - Any good intro?
Well, seeing that there didn't seem to be any basic intro to IJW, I have written my own intro article.
http://www.codeproject.com/useritems/nishijw01.asp
Nish
p.s. There's not much there, just the basics. I might write a part 2 which covers things in more depth.
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Hi Nish,
Not sure whether the link contains what you want, nevertheless thought it would be useful. I think they have a section on Interop.
http://samples.gotdotnet.com/quickstart/latebreaking/
Also, you can search for the user samples section in gotdotnet, its got lots of interesting samples.
regards
Kannan
|
|
|
|
|
What exactly are you looking for?
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Tom Archer wrote:
What exactly are you looking for?
I was looking for an elementary introduction to IJW. I badly wanted to avoid using P/Invoke.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Yeah. I saw your article after I posted my question
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Anyone have the Essential Guide To Managed Extensions For C++ book ? Is it worth ?
Cheers,
Joao Vaz
Frustrated TCL programmer,good c++ programmer wannabe
|
|
|
|
|
You're probably not surprised to know that I have this book also
Seriously, it's a good book and the authors are very knowledgable. However, I personally don't like the APress style of book writing. I much prefer the MS Press tutorial-style book on Managed Extensions. (Visual C++ .NET Step by Step).
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Tom Archer wrote:
You're probably not surprised to know that I have this book also
Nope, neither the smallest fraction of the atom ( a quark )
Tom Archer wrote:
Visual C++ .NET Step by Step
The book's content totally overlaps with Essential Guide to blah blah ?
Don't worry posting the response fast, after all this kind of book is ranked bellow your's and Christopher Duncan's book .
Cheers,
Joao Vaz
Frustrated TCL programmer,good c++ programmer wannabe
|
|
|
|
|
According to this
mc++ gotchas
The Visual .Net debugger cannot inspect the values of unmanaged pointers !!
Tell my friends that John Lam from Wintellect is wrong and that we can debug properly unmanaged pointers on a MC++ project , please , pretty please ?
Cheers,
Joao Vaz
Frustrated TCL programmer,good c++ programmer wannabe
|
|
|
|
|
Joao Vaz wrote:
Tell my friends that John Lam from Wintellect is wrong and that we can debug properly unmanaged pointers on a MC++ project , please , pretty please ?
Well.. I have no idea if John Lam is right or wrong. I'm only startig our with MC++ and I hope he is wrong as well
(-_-)
|
|
|
|
|
Well,
In the watch window unmanaged pointers don't show, you need to open a memory windows to inspected. At least is how I do it!
Al
|
|
|
|
|
Thanks Albert
I hope the MS guys fix this soon .
Cheers,
Joao Vaz
Frustrated TCL programmer,good c++ programmer wannabe
|
|
|
|
|
Looking at MSDN it appears that all I need to do to create a property is prefix the Property name with get_ or set_ and put the __property keyword before the method (f.e. __property int get_Size() { return m_size; } )
But when I do the same with my code, I get this error
C2327: 'ScreenSaverUtils::OptimizedBitmap::Graphics' : member from enclosing class is not a type name, static, or enumerator
Here is my code:
__property Graphics* get_Graphics()
{
if( graphics == NULL )
graphics = Graphics::FromHdc(hdc);
return graphics;
} Now if I just take out the __property keyword it compiles fine
TIA,
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
member from enclosing class is not a type name, static, or enumerator
I will venture to guess from my efforts to reproduce the error that you have an outter class and an inner class, both with the property name Graphics. If you fully qualify the property return type as System::Drawing::Graphics, it should resolve the issue.
Regards
|
|
|
|
|
Nope, just a single class; and returning the fully qualified name was the first thing I tried
I did rename the property from get_Graphics to get_Graphicsrrafsd and it works, even though I don't have a member named Graphics, so apparantly it doesn't like me having a property name the same as a class.
What I don't understand is why not? I don't see any mention of this, and the closest thing was that you had to be explicit with types in the case of name clashes.
James
Simplicity Rules!
|
|
|
|
|
Well, I don't know what your exact situation is then.
Except in the situation I mentioned, I was not able to reproduce your error. I had no problem having property named Graphics while the System::Drawing namespace was included.
Regards
|
|
|
|
|
James T. Johnson wrote:
so apparantly it doesn't like me having a property name the same as a class.
Isn't that the reason?
I think even in C# you can't have a property named same as the class.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Did you tried to change the name after get_ ?
You cannot use a name that resolves to the same name as another member of the class
That's the only thing I can think of!
Al
|
|
|
|
|
Thanks, it just doesn't like me naming the Property after another class; because I don't have another member named Graphics, just my private member graphics.
I've converted it from a property to a method because I want it to be clear that the returned graphics should be disposed; but I'm still curious why it didn't work.
James
Simplicity Rules!
|
|
|
|
|
Did you solve this yet? I've got properties all over my code without a problem.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Tom Archer wrote:
Did you solve this yet? I've got properties all over my code without a problem.
Tom,
I think we cannot have properties named after the class.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
You can have a property named after a class, just not the name of the class that contains it. This isn't my case, my class is named OptimizedBitmap.
Refer to PaintEventArgs, it has a property named Graphics of type Graphics
James
Simplicity Rules!
|
|
|
|
|