VC++ 2005: IDE Tips and Tricks
- Posted: Jul 07, 2006 at 5:37 PM
- 40,820 Views
- 13 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
You guys should put up some kind of cheat sheet with the most usefull keyboard commands somewhere.
Wonderful interview. VERY interesting stuff here guys. I really learnt a trick or two.
If a VS VC++ team member drops by this thread, I would like to know if there is any information, good or bad, about support for VC++ being added to the VS Class Designer (as supported for C#, VB.net etc).
Sounds like a great use of the C9 Wiki.
ILoveJackDaniels.com is developing a VB.NET cheat-sheet. Their previous sheets are excellent.
Maybe the next interview should be eye-level
Other than that, this is an awesome interview.
justAnExample would only select Example and the next tab on the left key would select AnExample. It's also useful with ctrl+backspace as I hardly ever use the backspace one single time, it's usually quicker to delete the entire word and retype it
Trackerball, I was definitely not trying to skirt the issue, it's more that I was not always expecting those questions
The short answer to your question is this:
- a managed class (ref class A {}) can only hold pointers to native types
- a native class (class B {}) can not hold a managed handle directly, instead you should use gcroot<T> as follows:
#include <vcclr.h>
using namespace System;
class B {
public:
gcroot<String^> str; // can use str as if it were String^
B() {}
};
int main() {
B b;
b.str = gcnew String("hello");
Console::WriteLine( b.str ); // no cast required
}
I hope that answers the question. If you want to learn more, I gave a talk about interop at Tech-Ed and I have some posts about it over at http://blogs.msdn.com/borisj.
-- Boris
Just hit Windows Key + D to peek, and again to continue coding. In less than a week I had learnt many of them.
Chances are you also use VC#, so here's my two bits:
http://users.telenet.be/stefaan.meeuws/mykeysquickref2.htm
Stefaan
Remove this comment
Remove this thread
close