   .NET question
  I'm using Visual C++ 2003 and when I add new classes to my project (Windows Form Application)I keep getting this error, it even happens when I use the Add Class by right-clicking the project in Solutions explorerCould not find type 'CTimer'.  Please make sure that the assembly that contains this type is referenced.  If this type is a part of your development project, make sure that the project has been successfully built.I've been programming in C++ for a while now, and am pretty confortable. But I've just decided to learn .NET and I'm having a lot of trouble with it, is there a good tutorial around for people like me that know C++ but not Managed C++?I'd like to turn the game I've been writing into Managed C++, and start using the .NET Windows Forms, because it's a pain setting up my GUI without a visual interface.Is the correct way to add classes (like my graphics engine class) to declare a pointer as a member of Form1, and then use the new operator inside InitializeComponent()?One last question, where in a .NET Windows Form Application would I find the message loop? Where I can put all the rendering and AI code for my game. I couldn't find anywhere that wasn't event driven.Thanks!   
  I personally would suggest getting a book if your having a lot of trouble there is not much info online seeing as .NET is rather new. With a check around on google, I found a few things.GotDotNetFunctionXQuote:Original post by Procyon LotorI'd like to turn the game I've been writing into Managed C++, and start using the .NET Windows Forms, because it's a pain setting up my GUI without a visual interface.You can use form designer in managed and unmanaged code. Most games use DirectX or OpenGL why would this be a concern?Quote:Original post by Procyon LotorOne last question, where in a .NET Windows Form Application would I find the message loop? Where I can put all the rendering and AI code for my game. I couldn't find anywhere that wasn't event driven.This is quite differen't in .NET that code is generally handled behind the scenes unlike unmanaged c++, as you can see:#include <windows.h>using namespace TestNetInCpp;int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR    lpCmdLine, int  nCmdShow){System::Threading::Thread::CurrentThread->ApartmentState = System::Threading::ApartmentState::STA;Application::Run(new Form1()); // Makes the message loop.return 0;}This is true for C# too, which is another language in .NET. Seeing as I have yet to use Managed C++ .NET, I can't really explain this, but if you have the DirectX SDK. Check out some of the C# examples and compare it to normal C# code and you will see what I mean by differen't.   ;  Thanks for the links, I'll check those out.I didn't know you could use the form designer with Unmanaged C++. How do I do that? The Windows Form Application says it's for Managed C++. My game does use DirectX, I'm mostly trying to avoid writing all the windows code my hand and repositioning all the buttons and stuff, because it takes a lot of time.   ;Quote:Original post by Procyon LotorI didn't know you could use the form designer with Unmanaged C++. How do I do that?Just add a form declare the resource id's for each button/gui object inside the form and change stuff in the windows code. You will still have to code things like pretty colors and what not, it is more limited in that sense. It doesn't let you change things as easily but it can all be done through code.Quote:Original post by Procyon Lotor My game does use DirectX, I'm mostly trying to avoid writing all the windows code by hand and repositioning all the buttons and stuff, because it takes a lot of time.Why would you have GUI based buttons inside a DirectX application? Definitely sounds like a bad idea to me.Really the technique that is used in c# at least really requires you to write your own code by hand, hence its different from normal c# code. I am quite sure it is the same for Managed c++. Considering both of them use the .NET framework and .NET langauges tend to be very similar.   ;  I have a window (maybe panel is the right word?) that DirectX renders to. And around that I have some edit boxes, buttons...etc for chatting and the like.Sorry, but what's a resource ID? Is it the same as a handle/pointer?   ;Quote:Original post by Procyon LotorI have a window (maybe panel is the right word?) that DirectX renders to. And around that I have some edit boxes, buttons...etc for chatting and the like.Why not use the way the DirectX SDK shows how to make a GUI system in DirectX?Quote:Original post by Procyon LotorSorry, but what's a resource ID? Is it the same as a handle/pointer?Resource Id's are just integers that are unique to each control with-in the form this way you know what is clicked. I usually keep them in a file called resouce.h if I am doing a win32 application using c++.#define IDD_MAIN_WND101 // main window resource id.#define IDC_MAINICON102 // main icon resource id.#define IDC_BROWSE  1007 // browse button resource id.;  the way managed c++ works is totally changed (and improved) in the new vs 2005, if you want to go that route, get the free version and start from there instead of learning something that is more or less discontinued.;  Ah ok thanks, I'll be sure to get the new version before I try and learn Managed C++. Is Managed C++ and/or .NET often used for game developement?   