views:

54

answers:

1

i wrote a console application in visual c++, and now i want to add a GUI to it using windows form. I am new to Windows form. and i have following questions

  1. I dont know how to include classes from other .h files in windows form.
  2. is library like #include <stdio.h>, #include <stdlib.h>, #include <iostream> in my original project still can be used in windows form project?
  3. is it better to convert my original project to .dll and use it in windows form?
+1  A: 

You have a great article from Microsoft about this subject, http://msdn.microsoft.com/en-us/library/aa290064(VS.71).aspx.

1) I did not understand your question here, but i'm pretty sure you will find the answer in the article above.

2) I don't see why you can't use your original project, so it should probably not be a problem.

3) It depends on the project. DLL files are quite nifty if you want to share the program-code with other applications. But if your program is quite large, then probably no.

Burbas
for the 1st question. i mean in c i can just use #include "blabla.h"but when i tried in windows form. i got error C2143: syntax error : missing ';' before 'namespace'for the line "#include "TDMS.h"namespace TDMSplotting {...}"
Grey
@Grey, that generally means you messed up something in the class header, like forgot a trailing ; at the end of the class declaration. #include works the same in any kind of app.
Joe
you are quite right. i forget ; at the end. when i change my main.c to clas.
Grey