Jump to content
Tuts 4 You

Win32 GUI apps in VS2008


deepzero

Recommended Posts

Posted

Hi,

This is something that`s been bugging me for a long time.

I downloaded "Microsoft Visual C++ Express Edition", which works just fine for creating native console apps and .NET GUI apps.

I cant figure out how to create a native GUI app, though.

Choosing "Win32->Win32 project" is not a Win32 Form Project. Nor can i find how to create MFC projets... :verymad:

help? :woot:

:unsure:

Posted (edited)

Express Edition doesn't support MFC. You have to go pro for that. Uhm, I'm not sure why you are having a problem creating a GUI app though. Its similar to creating a console app, but you click the choice above it when you choose a Win32 project. Also you can check the setting under the linker options. Console App to Windows GUI.

Edited by What
Posted

Or just create a winmain entry point, register a class and use CreateWindow to create a window from code.

And if you are a student you can get the pro version of visual studio for free, and of course outside of

that you can get the pro version the 'internet' way but enough said.

Posted

not sure i understand you correctly, but microsoft does not have a native GUI app. Win32Project is what you would use to create a GUI app though. With C / C++ you have to create the window / windows you wish to see as a gui. You can do this one of two ways, you can build a dialog app from a *rc ( resource file )or you can build it from scratch by using the CreateWindow API for each control you want in your form. MFC is more of a dialog app with a resource builder for drag & drop creation, kinda like .net.

Posted

The only way you will be able to do a simple drag-and-drop method of an interface is to use a resource dialog. The Express edition of Visual Studio does not include it's own resource editor though, you will either need to create the resource file outside of the project or upgrade to pro. (Although I'm not 100% sure if Express even comes with rc.exe to compile the resource files.)

You can just use Win32 API though to create your Gui. It is a bit more work but it is how you do it in C++

Here a link that should help you out with getting started:
/>http://www.winprog.org/tutorial/start.html

I would suggest you avoid MFC if possible as you are going to confuse yourself more with it then you will by using native API. MFC overloads similar named functions which may impair your understanding of Win32 API and cause you to write things incorrectly for other projects. While it may make some things easier, in the end, MFC is nothing but Win32 API calls wrapped in classes to make things a bit more automated. You can do everything it does yourself.

Posted

no rc.exe, but it does compile resource files. I do not use MFC, but i do use resource based gui's and it compiles everything fine

Posted

You could use Resedit to create the resource file:
/>http://www.resedit.net/

Posted

Or use ViSG:

http://mrhx.ucoz.com/load/1
Visual and smart GUI builder. VISG is a unique and fully tunable visual GUI designer with ability to generate the program code in several programming languages. The created code uses only low-level API calls in order to make the executable program small.

Aka, it will create a snippet of code for you which creates the dialog you created in the editor.

Posted

Hi guys,

The only way you will be able to do a simple drag-and-drop method of an interface is to use a resource dialog. The Express edition of Visual Studio does not include it's own resource editor though, you will either need to create the resource file outside of the project or upgrade to pro. (Although I'm not 100% sure if Express even comes with rc.exe to compile the resource files.)

I used to work with Visual C++ 6.0 and there you can create the Form in the "designer". I`m missing that designer thing in VS2008.

I got my hands on the Pro version, same thing. :(

Posted

There's a dialog editor in the pro version, not sure what you're doing wrong.

Try creating a new resource file and add a dialog, double click and you should see it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...