Skip to main content
gamedev.net
🔒 Locked

C++ GUI / Winforms

Started by Tipotas688 9 replies 2.4k views
Original Post
Tipotas688
Tipotas688
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!
SeaBourne
SeaBourne
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.
Tipotas688
Tipotas688
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]
SeaBourne
SeaBourne
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.
EJH
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.

SeaBourne
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*
Christopher Loyd
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.
____________________________________________________________My Biggest Weakness: Too quick to judgeKnowing your own weaknesses is your biggest strength. What's your's? Quote: Everyday I wake up and look through the Forbes list of the richest people in America. If I'm not there, I go to work. -
EJH
EJH
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.

SeaBourne
SeaBourne
Properly MFC or WinForms.
_swx_
_swx_
Qt is very nice to work with. Used it in shipped product before and using it in a large project at the moment :)
Tipotas688
Tipotas688
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.