home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

GUI programming for VC++

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2807
Discussions: 200,970, Posts: 2,379,701, Members: 246,334
Old December 15th, 2005, 01:33 PM   Digg it!   #1 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: New Hampshire, USA
Posts: 641
Arrow
GUI programming for VC++

I know how to do LI programming in Microsoft Visual C++ 6.0, but would like to learn how to create a GUI to drive C++ events. Does anyone have a good tutorial to teach me how to create a form and add controls?

As an asside, I have been doing VB event driven GUI programming for some time but the VC++ development environment is a little too different for me to figure out where to begin.

Any help would be appreciated.
ctaylor is offline   Reply With Quote
Old December 15th, 2005, 01:38 PM     #2 (permalink)
I am a banana!
 
originel's Avatar
 
Join Date: Jun 2002
Location: Texas Tech
Posts: 3,921
Send a message via AIM to originel
It's much much different than you think.

There are two methods to programming a GUI in C/C++ for windows: directly using the Win32 API (which is straight C) and using MFC (which is C++ and is a wrapper class around the API).

I would recommend starting with the Win32 API. It's very difficult to use, but it forms the basis for MFC and MFC is quite confusing if you don't understand the Win32 API.

Be prepared, this is not like programming in VB. It took me about a month just to understand the API. As an example, to create a basic notepad like program (without any of the menu options...just being able to type) takes about 100 lines of code. Also, be prepared to use LOTS of pointers in both the API and MFC and using things like multiple inheritence and deriving one class from another in MFC (i.e. advanced class stuff).

My best advice is to do a google search for "win32 api tutorial".

EDIT: if you want, I can give you the first real win32 api program I wrote, a program for controlling a serial based LCD, so that you can see what the code looks like. This method didn't use a form, although you can use forms. It doesn't really make things that much easier IMO unless you're doing a really complicated interface.

Last edited by originel : December 15th, 2005 at 01:41 PM.
originel is offline   Reply With Quote
Old December 15th, 2005, 02:16 PM     #3 (permalink)
ILC
Senior Member
 
ILC's Avatar
 
Join Date: Oct 2001
Location: Eastern Shore
Posts: 701
I first attempted MFC but quickly realized how much more difficult it was without an understanding of the Win32 API. So I am currently learning that before moving onto MFC.

I highly recommend Windows Programming by Charles Petzold to learn about the API. Very in-depth but excellently written, making it easy to understand. I originally tried the online tutorial route and found them far too vague to be of any real use.

When I get to MFC (learning this stuff in my spare time), I will probably use Programming Windows with MFC by Jeff Prosise. I have heard excellent reviews on that book also. Both are published by Microsoft Press.

ILC
ILC is offline   Reply With Quote
Old December 17th, 2005, 11:53 AM     #4 (permalink)
Junior Member
 
Join Date: Dec 2005
Posts: 1
Quote:
Originally Posted by ILC
..................
..........................
I highly recommend Windows Programming by Charles Petzold to learn about the API. Very in-depth but excellently written, making it easy to understand. I originally tried the online tutorial route and found them far too vague to be of any real use.

When I get to MFC (learning this stuff in my spare time), I will probably use Programming Windows with MFC by Jeff Prosise. I have heard excellent reviews on that book also. Both are published by Microsoft Press.

ILC

That are The Bibles in the Windows Programming !
plamenti is offline   Reply With Quote
Old December 18th, 2005, 10:06 AM     #5 (permalink)
Senior Member
 
Join Date: May 2003
Location: Aus, Gold Coast :)
Posts: 802
Send a message via ICQ to exally
MFC is your friend....

depends at what depth u want to get into, if u want the basic drop down menus etc etc like a standard program MFC is fine, but as they said to understand it alot better look at thew win api, when using MFC remember

UpdateData(true);
.
.
.
UpdateData(false);

is your bestest buddy
exally is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bah...no GUI SpaceSquad Linux and Unix 7 July 2nd, 2005 01:15 AM
HELP cant get GUI on debian. cMoAyRoItOe Linux and Unix 7 February 10th, 2004 05:27 PM
Gui in VC++ or C++ amtrac24 Webmastering and Programming 1 October 3rd, 2003 04:06 PM
Bugging me... GUI vass0922 Webmastering and Programming 29 September 17th, 2002 02:45 AM
know any books that teach GUI C++ programming? LinuxNewbie General Tech Discussion 3 September 16th, 2002 08:01 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3033)
Forty-six years ago today (12)
The disrespect of Obama by Russian .. (47)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
windows vista security holes (17)
Internet Lost (5)
windows 7 problem (7)
Is the PSU I received dead? (13)
Point and Shoot Camera Suggestions. (6)
radeon x850xt platinum & shader.. (6)
HIS HD5770 graphic card question (15)
Recent Discussions
Nvidia GTX 260 problem (3)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)
Delete an OS (9)
Linksys WMP54GS wireless card problem.. (5)
windows vista security holes (17)
Help getting around port 80 for camer.. (5)
Skillsoft Network+ Study Software Que.. (10)
Browsers wont load websites (3)
help me pls laptop just stopped worki.. (0)
Open With ..... Win7 (3)
Laptop with wireless problem. (12)
Internet Lost (5)
virus blocking exe. files (1)
Point and Shoot Camera Suggestions. (6)
CPU fan stops spinning randomly (11)
Modern Warfare 2: Who Bought It? (65)
Is the PSU I received dead? (13)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
webcam (0)
upgrade for hp a6101 (0)
tv not turn on-makes clicking sound (2)
EVGA 9800 gtx help with finding a goo.. (11)


All times are GMT -4. The time now is 05:36 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28