Thread: Win32 for dummies?

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    5

    Unhappy Win32 for dummies?

    Hi all, as a complete newbie I'm having trouble figuring something out...I've followed lots of tutorials for console programming and have written a few working console progs (the logic, syntax, etc. doesn't bother me), but when it comes to Windows tutorials, all I can find is stuff about drawing the window, menus, etc. Suppose I just want to make a basic text-based program, but I don't want it to run in a console (which scares many people), can I just paste the code I used for console progs after drawing the basic window? I realize I'm missing something fundamental here, I'm just not sure what it is. Thanks.

  2. #2

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    but when it comes to Windows tutorials, all I can find is stuff about drawing the window, menus, etc. Suppose I just want to make a basic text-based program, but I don't want it to run in a console (which scares many people), can I just paste the code I used for console progs after drawing the basic window?
    Nope. If you have statements like this:

    cout<<"hello world";

    they won't work. cout is a stream that represents console output. A window that you create does not accept console output.

  4. #4
    Registered User
    Join Date
    May 2005
    Posts
    73
    Unfortunately, the answer is no...
    Windows programming is much more difficult and uses different function sets to accomplish things.

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    I might get kicked-out of the C++ board for suggesting this...

    If you want to write "real" Windows programs from day-one, check out Visual BASIC. The VB compiler/IDE takes care of the details for you.

    If you want to learn what's going-on "under the hood", you'll have to be patient.

    A university student would typically take two semesters of standard C++ before moving-on to GUI, or some other "speciality" topic. You don't really need to know that much standard C++ before starting Windows, but you should be very comfortable with the basics... For example, you should know the stuff in the Cprogramming.com tutorials very well.

    The danger of jumping into Windows programing too soon is that you will spend all of your time learning to make your programs "look good" without learning the standard stuff to make your program do something useful. And, learning Windows programing will take some time... you're not going to "pick it up" in a couple of weeks.

  6. #6
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    Quote Originally Posted by 7stud
    Nope. If you have statements like this:

    cout<<"hello world";

    they won't work. cout is a stream that represents console output. A window that you create does not accept console output.
    You could define your own "alternative" cout object that is set up to output to a window , and cin to display an input dialog...then you could cut and paste a console app into a window app

  7. #7
    Registered User
    Join Date
    May 2005
    Posts
    73
    Quote Originally Posted by DougDbug
    I might get kicked-out of the C++ board for suggesting this...

    If you want to write "real" Windows programs from day-one, check out Visual BASIC. The VB compiler/IDE takes care of the details for you.
    My instructor for my C++ class was a bald-headed brute into video games and sports, while the instructor for my Visual Basic class was a little fragile 65 year old grandma... i think you can come to your own conclusions.
    Last edited by Deo; 06-08-2005 at 03:41 PM.

  8. #8
    Registered User
    Join Date
    May 2005
    Posts
    6
    Is the bald-headed brute mean?

  9. #9
    Registered User
    Join Date
    Jun 2005
    Posts
    5
    Thanks everyone for the good advice. I'll stick to the basics for now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console program to Win32
    By Ducky in forum Windows Programming
    Replies: 3
    Last Post: 02-25-2008, 12:46 PM
  2. Win32 API or Win32 SDK?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 07-20-2005, 03:26 PM
  3. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  4. Thread Synchronization :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 08-09-2002, 09:09 AM
  5. Win32 API Tutorials?
    By c++_n00b in forum C++ Programming
    Replies: 9
    Last Post: 05-09-2002, 03:51 PM