MS-DOS - Windows Apps

This is a discussion on MS-DOS - Windows Apps within the C++ Programming forums, part of the General Programming Boards category; I am currently learning C\C++ programming and i have noticed that when i compile and execute a file it only ...

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    132

    MS-DOS - Windows Apps

    I am currently learning C\C++ programming and i have noticed that when i compile and execute a file it only opens up in a 32 bit MS-DOS windows and it looks... ugly. Is there anyway to use the same codes that im using in MS-DOS but to open it in a windows program window if you know what i mean?

    Now i am using Dev C++ , is this a good compiler or are there any better that can handle the same codes that Dev can?
    please let me know.

    Cheers.

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    You'll be interested in learning Win32 then. Make sure you have a firm grasp on C++ or at least the C before you jump in to Win32 though, or you'll be in over your head.

    A good resource once you're confident of your skills:
    http://winprog.org/tutorial/

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by Hugo716
    I am currently learning C\C++ programming and i have noticed that when i compile and execute a file it only opens up in a 32 bit MS-DOS windows
    There's no such thing as 32 bit MS-DOS windows. DOS was a 16-bit operating system which is long dead.

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    266
    Quote Originally Posted by Hugo716
    I am currently learning C\C++ programming and i have noticed that when i compile and execute a file it only opens up in a 32 bit MS-DOS windows and it looks... ugly. Is there anyway to use the same codes that im using in MS-DOS but to open it in a windows program window if you know what i mean?

    Now i am using Dev C++ , is this a good compiler or are there any better that can handle the same codes that Dev can?
    please let me know.

    Cheers.
    i wanted to do that too, but i now know i need a better understanding of c++ to do that

  5. #5
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    Ok thanks alot. and i meant 16 bit lol not 32.

    everything ive coded has opened the "16" bit ms dos window to do what i told it to do in the program right.

    now can i use this same code but make the interface different.

    whats the best compiler to use to make this? I want to make a small game...

    Like a text base game, but not just text. like a wrestling game where u choose moves and 1 JPG \ GIF image shows the move and then takes Health of them. etc...

    can dev C++ be used for this?

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    They are console windows, DOS is dead.

    If you really want to learn windows programming try googleing "theforger" for some tutorials.

  7. #7
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by Hugo716
    Ok thanks alot. and i meant 16 bit lol not 32.

    everything ive coded has opened the "16" bit ms dos window to do what i told it to do in the program right.
    What compiler are you using? only a 16-bit ancient compiler such as Turbo C will compile programs that generate 16-bit ms-dos windows. No modern 32-bit compiler will do that. If you are using a 16-bit compiler then you cannot create gui ms-windows programs, it requires a 32-bit compiler such as Dev-C++ or Microsoft's VC++ 2005 Express (there are others too) . The console programs those two compilers create are NOT 16-bit dos but just termed "console programs", which only simulate the ms-dos window.

    you need absolutely no knowledge of C++ to write win32 api gui programs -- see the tutorial that was previously posted. But what you do need is a solid understanding of C language. win32 api gui programming is definately not intended for new programmers.

  8. #8
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    ok cheers mate. well ive been reading C\C++ for dummies and its taught me alot of C\C++. now u say u need alot of knowledge in C but wouldnt knowing C++ be the same as knowing C? or do u need to learn C++ and also alot of just C to be able to use Win32 API?

  9. #9
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    c++ is ok too, but not required. you need not use any c++ to write gui that uses win32 api -- the win32 api was written in c, not c++, so that it can be called from most computer languages. There are c++ class wrappers, such as wxWindows and MFC.

  10. #10
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,161
    Misinformation!!!! Your program does not run in a 16-bit MS-DOS window. It is running in a 32-bit Console window. There is nothing DOS about it other than the look. Everything you run on your machine is 32 bit unless it is explicitly built 16 bit using old equipment or software. But it's still a 32-bit window.

    So the term is now console, not DOS. Which is not dead -- it still works fine. It's just rarely used today, but it is still used.

    If you want your program to run like a 'normal' Windows program, you will have to spend a lot more time writing the interface to the window, and all the other crap that needs to be added to the program just to open a window and add the output to a text box -- IOW make your source 3x larger than it is now. Not worth it at this stage. Learn using the ugly. Later get into the pretty.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  2. French characters not displaying on MS DOS Window
    By CookieMonster in forum C Programming
    Replies: 21
    Last Post: 04-05-2004, 10:54 AM
  3. DOS experience 0 windows experience help
    By shrin2000 in forum Windows Programming
    Replies: 5
    Last Post: 07-15-2002, 03:22 AM
  4. Replies: 2
    Last Post: 12-31-2001, 08:23 PM
  5. ms windows 1
    By iain in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-17-2001, 12:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21