Sign in to follow this  
Tipotas688

C++ GUI / Winforms

Recommended Posts

Hiya,

I wanted to integrate to an old program of mine that deals with photos a proper GUI.
My code is in C++ and the window to have the photo appear was HWND.
Now I was wondering whether to use Winforms or any other sort of GUI!

Share this post


Link to post
Share on other sites
WinForms is only for C# and not C++. Unless you are wanting to convert it to C++/CLR which I wouldn't advise. Have you looked in Gtk+,Gtkmm,wxWidgets,Qt? I wouldn't suggest going in to Win32 api unless you have legacy code though, those listed you could still get the window handle to have access to. Because win32 api is very slow at development while the others are quite rapid.

Share this post


Link to post
Share on other sites
Actually because this program is really light, I don't have any imports either if I remember well. And to be honest I want the fastest way to develop a GUI that's why I mentioned Winforms.

As obvious I've never done a GUI in C++ before and I want something nice and easy =)

At the moment even my button manipulations are "switch(uint_Message)" ,everything win32 so I would ask which one is the lighter GUI? Although at first I would implement the nice and easy version to get it out of the way...

EDIT:

is this acceptable:


case WM_CREATE:
{
CreateWindow(TEXT("button"), TEXT("Button1"),
WS_VISIBLE | WS_CHILD ,
20, 50, 80, 25,
hwnd, (HMENU) 1, NULL, NULL);

CreateWindow(TEXT("button"), TEXT("Button2"),
WS_VISIBLE | WS_CHILD ,
120, 50, 80, 25,
hwnd, (HMENU) 2, NULL, NULL);
break;
}



[Edited by - Tipotas688 on September 29, 2010 5:54:32 AM]

Share this post


Link to post
Share on other sites
If you want fast, win32 is not an option, go for the guis I mention. They will get it up and faster than win32. I don't know, I gave up on win32 many years ago.

Share this post


Link to post
Share on other sites
Quote:
Original post by SeaBourne
WinForms is only for C# and not C++.


Have you informed Microsoft? They have all these tutorials about creating Windows Forms in C++:

http://msdn.microsoft.com/en-us/library/ms235634(v=VS.100).aspx

Just kidding with you, I guess that is a common misconception. =)

But seriously, to the OP: Windows Forms is quite fast to develop in, theres a ton of great tutorials out there, and it is all integrated into Visual Studio.

Share this post


Link to post
Share on other sites
Quote:
Original post by EJH
Quote:
Original post by SeaBourne
WinForms is only for C# and not C++.


Have you informed Microsoft? They have all these tutorials about creating Windows Forms in C++:

http://msdn.microsoft.com/en-us/library/ms235634(v=VS.100).aspx

Just kidding with you, I guess that is a common misconception. =)

But seriously, to the OP: Windows Forms is quite fast to develop in, theres a ton of great tutorials out there, and it is all integrated into Visual Studio.


That is C++/CLR not native C++. There is a difference ;) *coughs*C++/CLR is a pita*coughs*

Share this post


Link to post
Share on other sites
Quote:
Original post by SeaBourne
Quote:
Original post by EJH
Quote:
Original post by SeaBourne
WinForms is only for C# and not C++.


Have you informed Microsoft? They have all these tutorials about creating Windows Forms in C++:

http://msdn.microsoft.com/en-us/library/ms235634(v=VS.100).aspx

Just kidding with you, I guess that is a common misconception. =)

But seriously, to the OP: Windows Forms is quite fast to develop in, theres a ton of great tutorials out there, and it is all integrated into Visual Studio.


That is C++/CLR not native C++. There is a difference ;) *coughs*C++/CLR is a pita*coughs*


Unless the program is heavily performance dependent, using C++/CLR is a great way to take native code and apply it to a modern graphical interface. Sure, you take a hit in performance, but his program doesn't sound like it's too performance intensive and the process is simplistic to do so.

Share this post


Link to post
Share on other sites
Quote:
Original post by SeaBourne
That is C++/CLR not native C++. There is a difference ;) *coughs*C++/CLR is a pita*coughs*


Ah ok wasn't aware of the distinction.

BTW, anyone know what API does MS do their GUIs with? Like all the widgets in Excel, Word, etc.

Share this post


Link to post
Share on other sites
Qt is very nice to work with. Used it in shipped product before and using it in a large project at the moment :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Christopher Loyd
Quote:
Original post by SeaBourne
Quote:
Original post by EJH
Quote:
Original post by SeaBourne
WinForms is only for C# and not C++.


Have you informed Microsoft? They have all these tutorials about creating Windows Forms in C++:

http://msdn.microsoft.com/en-us/library/ms235634(v=VS.100).aspx

Just kidding with you, I guess that is a common misconception. =)

But seriously, to the OP: Windows Forms is quite fast to develop in, theres a ton of great tutorials out there, and it is all integrated into Visual Studio.


That is C++/CLR not native C++. There is a difference ;) *coughs*C++/CLR is a pita*coughs*


Unless the program is heavily performance dependent, using C++/CLR is a great way to take native code and apply it to a modern graphical interface. Sure, you take a hit in performance, but his program doesn't sound like it's too performance intensive and the process is simplistic to do so.


I didn't mention what kind of program this is :P

Share this post


Link to post
Share on other sites

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

Sign in to follow this