Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to make a GUI using Visual C++

Status
Not open for further replies.

sana khan 01

Junior Member level 2
Joined
Oct 26, 2011
Messages
22
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Islamabad, Pakistan
Activity points
1,418
hi i want to design graphical user interface (GUI) using visual c++, actually i want to take data from virtual com port and display in gui for doing my project

can anyone help me for doing this im new to visual c++ i take some tutorials how to draw a window, button etc.
 

Re: gui using visual c++

Might I suggest that you look at C# to use for your project.
You can download Visual Studio C# Express for free from Microsoft. It is a powerful and easy to use IDE that makes writing GUI software quite easy.
C# is a lot easier to use than C++, it is a modern language with a lot of the shortcomings and problems of C++ fixed.
It is the language of the Microsoft .NET framework.
There are lots of sample code on the Internet that you could use.

JUST MY OPINION:
C++ is a difficult, convoluted and ugly language that does not have a future.
It will be overtaken by more modern languages such as C#.
I think there will be more demand for C# programmers than there will be for C++ programmers.
 

Re: gui using visual c++

if you want to build a gui for your application in windows , either learn the win32 api or use a gui toolkit for windows.

it takes sometime to understand the internals of win32 api. if you can spend that time better learn win32 api and use visual c++ . you need not know c++ for building windows gui.

else , get a gui kit available for windows (both c and c++) , study and choose one which suits you best.

if you choose a toolkit , the time for development is reduced for small gui applications.
 

Re: gui using visual c++

you can download a simple gui ready made
that displays ascii from a rs232 port
try to look on planet source site online and even buy a few cd's etc iso's of premade code for this
royalty free and you can reuse it .. save some time and hassle for such simple stuff

its far better advice than having to learn c# and it has its issues for sure
c++ is far more mature and better debugged
anyway most later wintendo version has security issues with some compilers
and its harder to access the port without using a premade port file dump class
ive had this issue when vista came out {crap} win7 {crap}
so in XP i wrote my own ill email if needed

by crap i mean its not as programmer friendly in c++ even c# :p
 
Last edited:

Re: gui using visual c++

Oh Dear, the win32 api is yesterdays technology.
Software for Windows 7, whether you like it or not is built on the CLR, the Microsoft .NET framework.
Using Visual Studio 10 and C#, you could write your GUI in a couple of hours. There is a com port component you just drag and drop onto your form and its ready to go.
 

Re: gui using visual c++

Oh Dear, the win32 api is yesterdays technology.
Software for Windows 7, whether you like it or not is built on the CLR, the Microsoft .NET framework.
Using Visual Studio 10 and C#, you could write your GUI in a couple of hours. There is a com port component you just drag and drop onto your form and its ready to go.


at the end of the day i agree with c++ c# is just c++ in a wrapper with some bells and whistles

better to commit to some tested and well used sdk's

and not if your already using c to use c# before c++

its all very well for some experienced guys to recommend what they are using
but users of c and with little experience of wintendo programming
will find it far harder to climb into c# without at least a 6 month course on it

also c# is far more he he 'secure'
if you are logged in without admin rights c# classes are mostly blocked

because of vista and 7 security of the port's
if you have admin right fine

but for c# you need to back track to the start of time even half way down the c trees to completely get a grasp of it

i have had to do this as part of my masters degree so i know fully c# is a long hard road for oldies
a short part of a 2 or 3 year degree for the pup's
 
Last edited:

Re: gui using visual c++

If you know c, it is very easy to learn C#.
C# is not C++ in a wrapper with bells and whistles.

C# is a simple, safe, modern, object-oriented, Internet-centric, high performance language for .NET development.
C# is influenced by Java, C++, Visual Basic, Delphi and other languages. It takes the best from all, and leaves out the their shortcomings.

I think the guy is starting out learning a programming language. Much better to learn something that has a future, than something that is dying.

C++ is a nightmare of a language, plagued by memory leaks and almost impossible to debug. Write once, never understand again.
 

Re: gui using visual c++

C++ is a difficult, convoluted and ugly language that does not have a future.
It will be overtaken by more modern languages such as C#.
I think there will be more demand for C# programmers than there will be for C++ programmers.

Yes and no. I won't generally disagree if you refer to Windows application development. But there's a world beyond it.

The Windows Kernel is pure C++ code by the way, and so are Windows drivers. And we don't talk about embedded software at all.
 

Re: gui using visual c++

Rumor has it that Windows 8 is a complete clean slate rewrite of the code.
I doubt if C++ is a big feature.
 

Re: gui using visual c++

According to the preview information available at msdn, Windows 8 WDK is still based on C++.
 

Re: gui using visual c++

If thats the case, then I suppose we will still be cursing Bill Gates and Microsoft when our systems freeze up and crash for no reason in Windows 8.
 

Re: gui using visual c++

so the best language is that one the user/programmer is comfortable with and can develop the task in hand with ease ia shorter time.



"Claiming 'one language is easier and THE solution for all' than 'a second language' is like saying that K2 is shorter than Everest."

---with due apologies to:
Larry O'Brien (editor, Software Development)
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Re: gui using visual c++

If you are targeting software to run on Windows, then it is reccomended to use the Microsoft Net framework.
The CLR, Common Language Runtime, as it's name suggests, supports a lot of different programming languages, which you can mix and match when compiling your code.
You can choose the language that best suits the task you wish to perform, even using several different languages for one program.

Compilers available that target the CLR are

Ada,APL,CamL,C#,C++,COBOL,Eiffel,F#,Forth,Fortran,Haskell,Iron Python,Iron Ruby,Lexico,LISP,LOGO,Lua,Mercury,ML,Mondrian,
Oberon,Pascal,Perl,Php,Prolog,RPG,Ruby,Scheme,Smalltalk,TCL/Tk,Visual Basic

and I'm sure others exist.

The Microsoft .Net framework and the CLR are not only Windows specific, but can run on other platforms.

To write a windows form based GUI, Visual Studio and C# is the easiest language to use for the task.
 

Re: gui using visual c++

so the best language is that one the user/programmer is comfortable with and can develop the task in hand with ease ia shorter time.
I basically agree. There's however a difference in abstraction level involved with different languages (or more exactly with the complete distributed compiler framework often designated as "the language", as btbass did above for some C# features).

The abstraction of the object oriented compiler frameworks can increase coding efficiency a lot, and also avoid popular faults that are only accessible with low level programming, e.g. classical C pointer issues. But it's also an abstraction from real hardware and it's properties. So it's quite understandable that hardware related tasks are using the good old C++ tools for the time being.
 

Re: gui using visual c++

thanks for discussion
so what would u suggest which language i can use visual c++, c# or any other language and im gud in c language.

im making an usb based oscilloscope ,i take data from virtual com port after doing digital to analog conversion analog (DAC) signal will display on gui thats window application.
i ll also do DAC in thats language in which im making window app.
 

Well good luck with that as that is quite a hard project.
What Bandwidth do you want to achieve with your scope?
You will have to sample the waveform at twice that frequency.
A high speed 8-bit A/D and a large buffer to store the samples.
Just my opinion, I would use C for the scope hardware.

I would suggest you download Visual Studio 10 C# Express from Microsoft.
It is a free download.
Have a play with it to see if you like it. If you know C, C# will be a breeze to pick up.

If you dont like it, then carry on with your Visual C++.
 
Last edited:

knowing c is an advantage and a stepping stone understanding other language.

with c , you can pickup c++ principles. but the level will only be good for writing console mode c++ program. very difficult to write c++ gui , for a newbie as you should already have some experience on win32 structure..

but c# will not that difficult for a gui compared to c++.
you must spend some time in understanding c# with the MSoft kit for gui development.
 

Hello!

so what would u suggest which language i can use visual c++, c# or any other language and im gud in c language.
im making an usb based oscilloscope ...

That's exactly what I am doing right now. Well, not really a scope, but beside this it's the same: I'm catching
a stream of data from Zigbee and displaying it (with recording capability).
I'm quite used to Windows API right now, but I started with tutorial like this:

**broken link removed**

Don't be afraid! The hardest problem at first is to accept to write 100 lines of code only to display your first window.
I have hidden all this crap outside of the main program so I can have something cleaner. I now bypass the typical
(and useless) windows definitions (like WORD, DWORD, PSTR, LPSTR, etc...) and work with regular and standard
types (char, int, long int, etc...).
By the way I use Code::Blocks. They release a new version every 2 years or so. The last version was released
in 2010, so the next will probably show up soon. Totally free, and you don't have to leave your email address to
be permitted to download.

Now you may choose to use a toolkit to ease the GUI development, but in this case, be careful with the license,
especially if you want to sell your product.
I have just discovered Win32++ which is MIT license and therefore allows you to make commercial products.
I looks very easy to use, has a good tutorial. Too late to use it in my current project, but I will have a test run
in the coming months. See below.
C++ Win32 Framework for Beginners

Dora.
 

now which Microsoft kit which i use for gui development like MS visual studio or any other.

and plz suggest some c# tutorial for gui development find alot of tutorials......suggest something better

---------- Post added at 22:32 ---------- Previous post was at 22:29 ----------

im using pic18f4550 for hardware it contains built in usb........
bandwidth it may be nearly 500KHz, if this goal acheived
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top