Languages - DevSource
DevSource: Microsoft Developer Resource DevSource Home Sponsored by Microsoft Home Add Ons Architecture Languages Techniques Using VS Forums
Home arrow Languages arrow Top Tip: Best way to write a GUI for C++?
Top Tip: Best way to write a GUI for C++?
By DevSource

Rate This Article: Add This Article To:

What is the best way to write a GUI for C++. I am using Dev-C++ as an IDE. Would something like MS Visual C++ help for GUIs?

Tips used for Top Tips come from the ExtremeTech forum and are written by our community.

Question from cmmig
"What is the best way to write a GUI for C++. I am using Dev-C++ as an IDE. Would something like MS Visual C++ help for GUIs?"

Answer from DeadeyeFlint
"Nope. The best way to write a GUI for windows-only app is to use the win32 API, or if you don't like to code the GUI too much, use Visual Basic.

ADVERTISEMENT

Personally, I prefer win32 coz I like to get my hands dirty, so to speak. BUT it takes some time to get the hang of it. If you just want a quick (I wanted to say "and clean", but I'm not so sure how clean it is...) way to just make a GUI with no regards for performance (generally its not noticeable anyways) and the need to install VB run-time on user computer, then just use Visual Basic."

Answer from solutn_searchr
"So long as you are not writing a game, your best bet is to use Visual Basic to develop the GUI and Visual C++ for the engine.

Visual Basic will let you create a GUI quickly. It isn't super fast, so if your application requires a lot of calculations, you'll need C++. Also, VB GUIs are stable and responsive without all the effort needed when doing it exclusively through the Win API. The GUIs are plenty fast enough to be interactive, but if you are trying to find the 10 trillionth digit of PI, you'd let someone enter the desired precision and then click a VB button that calls a C++ Dll function to do the computation.

The C++ component can be a Dll or a COM component.

The Win API should be a last resort. It is complicated. That's why MS developed VB, to make it palatable to people who aren't into self torture if they don't have to."

Got a better answer? Post it in the discussion that generated this tip.

This article was first published on ExtremeTech.com.




Discuss Top Tip: Best way to write a GUI for C++?
 
>>> Be the FIRST to comment on this article!
 

 
 
>>> More Languages Articles          >>> More By DevSource
 



Microsoft's Future: A Chat With Their CTO, Barry Briggs

Play Video >

All Videos >

Julia explores the Robotics Studio!

Read now >

Messages to Bill Gates!

Read now >

View Now
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.