Personal Development for Smart People Forums

Personal Development for Smart PeopleTM Forums


Go Back   Personal Development for Smart People Forums > Personal Development > Technology & Technical Skills
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Technology & Technical Skills Computer skills, hardware, software, internet topics, gadgets, programming


Welcome to the Personal Development for Smart People Forums, the place for lively, intelligent discussion of all personal growth issues -- physical, mental, financial, social, emotional, spiritual, and more.

You're currently viewing as a guest, which gives you limited read-only access. By joining our free community, you'll be able to post your own messages, access many members-only features, see the new messages posted since your last visit, and of course remove this header message. Registration is fast, simple, and free, so please join today.

If you arrived here from a search engine, you may want to explore the main site first, which includes hundreds of deep and insightful articles on a variety of personal development topics.

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-18-2006, 03:12 AM
Senior Member
 
Join Date: Nov 2006
Location: Logan, UT
Posts: 357
Adam is on a distinguished road
Send a message via Yahoo to Adam
Default C++ Windows Programming

Well, it seems that the only thing that most C++ teachers that I've come across are comfortable with are console applications.

Unfortunately, I want to write an application (or at least get it started well enough to release it as open source without being laughed at ), but very few general-user applications are console based now-a-days.

So, my question is, how should I get started? I'm willing to buy books, but I want to be absolutely certain that the books are high quality before I dip into my budget. I would much rather read through tutorials, though, because they tend to get to the meat of the subject faster, and I can experiment from there on my own.

Also, most of my searching has brought me to C code, but I'd rather use C++. Should I bite the bullet and use the C while I'm learning, and port it over to C++ later, or am I missing something important with what I'm doing my searches on?
__________________
People often say that 'beauty is in the eye of the beholder,' and I say that the most liberating thing about beauty is realizing that you are the beholder. This empowers us to find beauty in places where others have not dared to look, including inside ourselves.
--Salma Hayek

My blog: Adam's Peace
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-18-2006, 04:40 AM
Member
 
Join Date: Nov 2006
Posts: 64
Matt is on a distinguished road
Default

Since you are working in windows, and you appear to want to work on graphical user-focused applications, I think C# would be an appropriate choice.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-18-2006, 05:40 AM
Senior Member
 
Join Date: Nov 2006
Location: Logan, UT
Posts: 357
Adam is on a distinguished road
Send a message via Yahoo to Adam
Default

C# isn't my first choice for a couple of reasons...

It is much more difficult to port it to different OSes, it uses interpreted code, rather than actual machine code, so it is slower (marginally) and it is also depended on people downloading the .NET framework, which is something that not everybody wants to do or knows how to do. When Vista becomes the standard Windows OS, that won't be as much of a problem, but there are still people using Windows ME, despite its problems, so I still want to keep the backwards compatibility.
__________________
People often say that 'beauty is in the eye of the beholder,' and I say that the most liberating thing about beauty is realizing that you are the beholder. This empowers us to find beauty in places where others have not dared to look, including inside ourselves.
--Salma Hayek

My blog: Adam's Peace
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-18-2006, 06:21 AM
Member
 
Join Date: Nov 2006
Posts: 64
Matt is on a distinguished road
Default

Fair enough, I was just going by your first post. Are you planning on using Win32/MFC? Unless you use some cross-platform toolkit, porting isn't going to be an easy task no matter what language you use. I suggested C# because it handles memory management and has some other niceties so it will be quicker to pick up than C or C++.

Answering your earlier question: C is much simpler than C++ but will likely be more verbose.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-18-2006, 06:26 AM
Senior Member
 
Join Date: Nov 2006
Posts: 325
Baltar is on a distinguished road
Default

It's been a long time since I've done any Windows programming, but I am quite adept at C++ (game development) so perhaps I can still help you out a bit. In the "old days" (before .NET) you had two main options -- using Win32 API directly, or using MFC. I've messed a little bit with the Win32 API and wouldn't recommend going within a few kilometers of it. It's written in C anyway. MFC is way better than bare Win32, but probably not the best solution in your case if you want portability. Also, Microsoft seems to be focusing mostly on .NET these days and C++ seems to not be the most popular language for Windows app development.

There are alternatives to MFC and .NET though. A bunch of GUI toolkits available that will allow you to write programs independent of the OS. I've never used them myself because I simply don't need to, but here're the ones I know of:

FOX Toolkit
WxWidgets
GTK

More are listed here. Hope that helps. And by the way, if you want to learn C++ in general you should start with console apps because they're much easier to program.

Last edited by Baltar : 11-18-2006 at 06:29 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 11-18-2006, 06:33 AM
Junior Member
 
Join Date: Nov 2006
Posts: 23
DerekNewland is on a distinguished road
Default Gtk?

Hello, I would suggest GTK. Although GTK is written in C there is a C++ wrapper for it. I personally just made a really small application last week and it was pretty easy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-18-2006, 06:38 AM
Member
 
Join Date: Nov 2006
Posts: 32
Minishark is an unknown quantity at this point
Default

If you're dead set on not going the .NET route, then like everyone else said, search for some tutorials on Win32/MFC, but prepare to get really frustrated, that stuff is a pain to learn. The reason you're finding a lot of old C code is because a lot of that stuff is really old and was originally written in C. But don't worry about it, C and C++ are pretty much one and the same.
If you're willing to go the .NET route, but don't want C#, you can still do all that stuff in Visual C++, but be prepared to have most of the documentation you read be in Visual Basic or C#.
My recommendation would be to learn .NET. Your choice of language won't even matter. You'll be able to make the GUI applications you want in a fraction of the time. If you're looking at job prospects, far more new .NET jobs are being created than Win32/MFC jobs.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 11-18-2006, 01:42 PM
Senior Member
 
Join Date: Nov 2006
Location: Logan, UT
Posts: 357
Adam is on a distinguished road
Send a message via Yahoo to Adam
Default

There's one distinction that I didn't make clear... I'm not trying to learn C++, I'm trying to learn more C++. I'm at that awkward stage between being able to get an A on every assignment in college and being able to write something useful.

I'm wanting to write a personal development application that allows people to use several different systems. I've noticed that there are people out there who use Linux and are unable to use any of the existing applications out there because of compatibility, so I want to add cross platform support into it at the beginning. If that means that the code has to be open source because I'm using some GPL code, then that's fine.

I also want to be able to add new modules, different management systems, without having to recompile the source. That way, a person can add in their own, or customize one of the built in ones, without the headaches of figuring out someone else's code.

Thank you all for your recommendations. I think that I'll go with the GTK, but of course, there is a bit of research to be done before the code is actually in place. If I need to, I can still fall back on C#.
__________________
People often say that 'beauty is in the eye of the beholder,' and I say that the most liberating thing about beauty is realizing that you are the beholder. This empowers us to find beauty in places where others have not dared to look, including inside ourselves.
--Salma Hayek

My blog: Adam's Peace
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 11-20-2006, 01:16 PM
Junior Member
 
Join Date: Nov 2006
Location: Atlanta
Posts: 22
bhopkins is on a distinguished road
Default

If you want cross platform compatibility then you may want to consider Java. C++ is a great language if you are writing an OS, but the other languages mentioned like C# or even Vb.Net as well a s Java are better for building GUI type applications that are designed for some business application purpose. I tihnk most of the reason colleges still teach c++ becuase it forces you to think about resource allocation and the flow of an application. I personally took it in College and made A's and learned a lot about programming as a result of the classes I took, but I've never touched it since and have coded some pretty decent apps since then.

Its not the tool or the launguage, its the programmer :-)
__________________
Bruce
No nonsense Internet Marketing Blog

Last edited by bhopkins : 11-20-2006 at 06:08 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 11-20-2006, 02:36 PM
Senior Member
 
Join Date: Nov 2006
Posts: 100
Milo Riano is on a distinguished road
Default

Schools still teach C++ because their curriculum is still grounded to resource allocation (as mentioned above) and comsci theories. Until they reinvent themselves there wouldn't be a need for C#.

If you're going for a language outside C++ go with C#.NET. It is the de facto standard of Microsoft, and pays extremely well. Head hunters will be going after you. We have recruited lots of JAVA certified enterprise architects and the like and they have been amazed by how far you can push .NET using on C#. And they ain't turning back man.

Hands down, it is the best tool to build an enterprise collaboration and digital worker environment. Forget about those stuff about faster run time codes using assembly language and stuff. If your company can't afford the most expensive hardware to run your applications then don't work for them.
__________________
http://miloriano.com: Young man’s journey to become a CEO & succeed
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 11-20-2006, 10:11 PM
Junior Member
 
Join Date: Nov 2006
Posts: 19
ScottS is on a distinguished road
Default

Get these books:

Windows++ Code Library
^-- Read this first. There are some chapters that can be totally ignored because it's for 16-bit windows but overall it's probably the best book for learning windows.

Amazon.com: Windows Internals: The Implementation of the Windows Operating Environment (The Andrew Schulman Programming Series): Books: Matt Pietrek
^-- Another 16-bit windows book, but it's very useful because you can tell why some stupid things are the way they are.

Windows Graphics Programming: Win32 GDI and DirectDraw
^-- This book is an amazing reference to GDI. It covers everything you need to know and more.

Amazon.com: Advanced Windows: Books: Jeffrey Richter
^-- This book covers a broad area of windows like threads, memory management, manipulating processes, etc.



I also found these books helpful but you should just deal with the above first before you go on:

Amazon.com: MFC Internals: Inside the Microsoft(c) Foundation Class Architecture: Books: George Shepherd,Scot Wingo
Amazon.com: Debugging Applications: Books: John Robbins
Amazon.com: Win32 System Services: The Heart of Windows 98 and Windows 2000, Third Edition (Book Only): Books: Marshall Brain,Ron Reeves



wine identfier search
^-- Source code to WINE. Comes in handy often because Microsoft's documentation is complete garbage

The Code Project - Free Source Code and Tutorials
^-- Lots of random sample code


Edit: Whoops, I skipped the part where it says you don't know C++. Here is how I suggest getting up to speed from college level C to intermediate C++ quickly:

Amazon.com: Expert C Programming: Books: Peter van der Linden
Amazon.com: Inside the C++ Object Model: Books: Stanley B. Lippman

^-- read these two and then mess around with template metaprogramming on your own.

http://www.open-std.org/jtc1/sc22/wg...docs/n1124.pdf
http://www.open-std.org/jtc1/sc22/wg...2006/n2134.pdf

^-- these are the latest draft standards for C and C++. It's the actual reference for how C and C++ really work. Most of what you have been taught about them at school, books, or in tutorials are most likely wrong in various ways. Read random parts when you're bored and have some free time to kill.

Last edited by ScottS : 11-20-2006 at 10:25 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 11-20-2006, 10:15 PM
Senior Member
 
Join Date: Nov 2006
Location: Logan, UT
Posts: 357
Adam is on a distinguished road
Send a message via Yahoo to Adam
Default

Thank you very much, Scott. As soon as I can convince my wife that I could use new books, those are at the top of my list.
__________________
People often say that 'beauty is in the eye of the beholder,' and I say that the most liberating thing about beauty is realizing that you are the beholder. This empowers us to find beauty in places where others have not dared to look, including inside ourselves.
--Salma Hayek

My blog: Adam's Peace
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 11-20-2006, 10:58 PM
Senior Member
 
Join Date: Nov 2006
Location: The most Utarded place on the planet.
Posts: 160
Trina is on a distinguished road
Send a message via Yahoo to Trina
Default

Quote:
Originally Posted by Adam View Post
Thank you very much, Scott. As soon as I can convince my wife that I could use new books, those are at the top of my list.
Yeah, thanks a lot Scott. Now he is going to be bugging me for new books until I finally get sick of hearing about it and give in.
__________________
~ Trina ~
Contrary to Reality

"Yes, the long war on Christianity. I pray that one day we may live in an America where Christians can worship freely! In broad daylight! Openly wearing the symbols of their religion…. perhaps around their necks? And maybe — dare I dream it? — maybe one day there can be an openly Christian President. Or, perhaps, 43 of them. Consecutively." — Jon Stewart
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 11-22-2006, 10:35 PM
Member
 
Join Date: Nov 2006
Posts: 40
Scientist is on a distinguished road
Default

I think your best bet is to use the Win32 API. I used to use MFC, but the more I learned about it, the more I learned that I had to bypass it and use the Win32 C functions instead.

With MFC, it is easy to make a simple application, but when you begin to make more complicated applications, the process of digging through MFCs abstractions can be difficult, frustrating and time-consuming. You end up having to learn the Win32 API functions anyway, but in a roundabout way.

I work as a software engineer for a company that makes Windows software applications. All of our code is in C++ and we use the Win32 API for GUI stuff.

I would recommend the book Programming Windows by Charles Petzold. It goes through much of the nitty-gritty stuff that you really need to understand in order to write a Windows application in C++. It won't tell you everything you'll need to know, but it is a great way to learn the fundamentals.

------
Edit:

Whoops! I didn't realize that you wanted to make it cross-platform. I think the easiest way to make a cross-platform program with a user interface is probably to write it in Java. However, Java isn't perfect and you may still have some issues on different platforms. (I've heard that the Mac implementation of Java is a stinker and causes a lot of problems for my friend who writes in Java for a living.)

If possible, I would make the application a web app so that nobody would have to install anything and it would work on pretty much any OS which has a web browser. Of course, you'd need a web server for that and you'd have to deal with security issues and the problem of storing the user's data on the server instead of on their own machine.

I guess what you should do depends on what you want to get out of it. In other words, are you mostly interested in the learning experience, is this something you want to sell or is your goal to provide it freely to as many people as possible?

Last edited by Scientist : 11-22-2006 at 10:58 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 11-23-2006, 03:00 AM
Senior Member
 
Join Date: Nov 2006
Location: Boston, MA
Posts: 144
mustard76 is on a distinguished road
Default cross platform apps

If you are serious about writing a cross-platform application then check out the Java SWT GUI toolkit (http://www.eclipse.org/swt). I tried Win32 API programming and got frustrated really fast. So I switched to Java. First I tried using Java's Swing GUI library but the GUI widgets were sluggish compared to native Window's apps. Then I tried SWT and loved it.

Here were my reasons for using Java/SWT:

1. Java is a modern OO language with garbage collection (don't have to worry about memory allocation)

2. I could use the Eclipse IDE (Eclipse.org home)

3. The SWT toolkit created apps with the same look and feel as native Windows apps.

4. My apps were portable (linux, Windows and MacOS)

5. I already knew C++ so learning Java was easy

6. all of the dev tools were free

Many people say that C#/.NET development is better than Java/SWT development for Windows GUI apps, but I wanted to write cross-platform apps.

just my 2 cents
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 11-23-2006, 08:28 AM
Senior Member
 
Join Date: Nov 2006
Location: Seattle, Washington, USA
Posts: 1,684
Michael Chui is on a distinguished road
Default

Friend of mine swears by Qt.

Qt — Trolltech

I don't know how he's doing it... he probably actually bought it; I'd have to ask. I'm out of the swing of being a hardcore coder, so I didn't play with it personally.
__________________
"I read, I interpret, I think, I criticize, I oppose, I listen, I write, I question, I reply, I quote, I tell, I name, I discuss, I interpolate..., I learn, I teach, I live, therefore I am." -- Marc-Alain Ouaknin, "Mysteries of the Kabbalah", p383.
Favorite Essays I Wrote: love, identity & growth, economics, education, equality, definitions.
Recent Books I liked: Anansi Boys, Fly By Night, Hyperion.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Software engineering, best job in america AndyO Technology & Technical Skills 11 11-16-2006 07:07 PM
Mac v Windows Stephen Technology & Technical Skills 30 11-13-2006 09:33 AM
Career Advice SParkes Business & Financial 4 11-08-2006 12:38 PM
Prevent links from opening in new windows (Firefox, Greasemonkey) tomjen Technology & Technical Skills 2 11-08-2006 12:35 PM


All times are GMT. The time now is 09:22 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 by Pavlina LLC