Object Oriented C++

Brian23

Banned
Dec 28, 1999
1,655
1
0
I've been learning C++ for about 5 months now. Until recently, I only programed console applications. I want to learn to do the visual part now, but I can't find a place that explains it well. I want to actually implement visual objects like buttons with code. All of the tutorials I've found want you to use the MS Foundation Classes, but I want more control over the program than MFC gives you. How do I put buttons and other objects into a window WITHOUT using MFC?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Why in the hell would you want to avoid libraries made to make your life easire (well MFC is so convluted easier is subjective =))?
 

GeSuN

Senior member
Feb 4, 2002
317
0
0
Why in the hell would you want to avoid libraries made to make your life easire

Doing stuff by yourself is the best way to learn...

only programed console applications

Sorry, still at that level...
 

MGMorden

Diamond Member
Jul 4, 2000
3,348
0
76
One of my better CS professors had a saying about programming: "Don't reinvent the wheel when you don't have to.". This is very good advice. Do something your own way once so you know how it works, then just use the provided stuff. We didn't get where we are nowdays by everybody sitting down and writing every program from scratch did we? Afterall reuseability is one of the prime concerns when writing code.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Petzold's Programming Windows is C not OO C++ but it gives you the actual Win32 API calls to use. You can then play with writing C++ wrapper classes. You'll end up with classes a lot like MFC's control classes (CEdit for edit control etc.) but it will be a good learning experience.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Doing stuff by yourself is the best way to learn...

Yea, but who needs to know the Win32 GUI APIs that intimately?
 

javathehut

Senior member
Oct 23, 2000
318
0
0
you should have enough control with ur program using mfc. anything you do with the base win32 api, you can do with mfc, its pretty much an object-oriented method of dealing with the nasty c-oriented win32 api. besides, you can always call base functions outside of the mfc namespace at any time with the :: operator.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,591
5
0
Follow DaveSimmons advice.

I learned Windows programming for NT when it was still in Beta by using the API and then graduated to Petzolds. I still keep his Programming 95 and another book around for reference.

Have the info for API reference is also great if you need to program for Windows using a non-Windows IDE system or language.

ONce you go through both of the referenced books, you will have a much stonger understanding on how the internals of Windows operates and then can proceed along your chosen direction with your head held high and not be just a programmer but consider yourself a developer.
 

GeSuN

Senior member
Feb 4, 2002
317
0
0
Yea, but who needs to know the Win32 GUI APIs that intimately?

Well, I wouldn't do this but maybe Brian23 wants to...
 

GeSuN

Senior member
Feb 4, 2002
317
0
0
I learned Windows programming for NT when it was still in Beta by using the API and then graduated to Petzolds. I still keep his Programming 95 and another book around for reference.

Have the info for API reference is also great if you need to program for Windows using a non-Windows IDE system or language.

ONce you go through both of the referenced books, you will have a much stonger understanding on how the internals of Windows operates and then can proceed along your chosen direction with your head held high and not be just a programmer but consider yourself a developer


10/10 for the answer

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Well, I wouldn't do this but maybe Brian23 wants to...

He obviously doesn't realize what he's getting himself into then =)
 

GeSuN

Senior member
Feb 4, 2002
317
0
0
He obviously doesn't realize what he's getting himself into then =)


I know, but if he succeds in his "Quest" hehehe he'll be a damn good programmer (or developper... sorry bout that EagleKeeper )
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< Yea, but who needs to know the Win32 GUI APIs that intimately? >>



It's much, much more than simply learning the API. I can't remember all the fields for the wndclassex struct, but I remember all the concepts involved with constructing a Windows application from scratch. I learned has helped me immensely, even with learning .NET. Everything more/less derives from the same concepts.

Pick up Petzold, and read it. You don't really have to read the whole damn book, but I think you'll find it rather enjoyable really. Building an entire Windows application from scratch in C is not a quick process, but it's quite fun really.

These days we often depend too heavily on nasty class libraries that encapsulate all the details. While this is good, and the foundation of OO itself, it still pays to understand the internals when things go awry.
 

RSMemphis

Golden Member
Oct 6, 2001
1,521
0
0
True, however I found it easier to start with MFC classes and then just try and get the rest right.
Actually, the lack of flexibility of MFC (unless you are a pointer juggler) forced me to program cleaner code.
 

Brian23

Banned
Dec 28, 1999
1,655
1
0
Thanks guys! I just ordered that book. I've been messing with C++ a little bit while I wait for the book. It looks like Nothinman was right when he said that I didn't know what I was getting into. It's complicated stuff, a lot more than console apps, but I'm determined to learn it.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It's complicated stuff, a lot more than console apps, but I'm determined to learn it.

Like I've said in other threads like this, I would choose another tool kit that is simpler and has the benefit of being crossplatfor like GTK or QT, there's no reason to force MFC upon yourself. Of you could go even easier and start using Borland C++ Builder, it's great for putting together GUI apps quickly.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |