Thread: creating an application

  1. #16
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    On a 2 GHz machine, it takes a second or two instead of an instant to include windows.h.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #17
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    That's odd. It's been a long time, but I remember a Win32 hello world compiling in less than a second, on a 600MHz computer.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #18
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Wasn't there a WIN32_LEAN_AND_MEAN thing somewhere?

    CornedBee, I didn't know about that. I'll check it out sometime.

  4. #19
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Yeah.
    #define WIN32_LEAN_AND_MEAN

    Kicks out a lot of stuff, like networking and multimedia. Don't mix it with PCHs, though.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #20
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    The times I got for including windows.h are:

    Without WIN32_LEAN_AND_MEAN: 00:02:49
    With WIN32_LEAN_AND_MEAN: 00:02:04

    My processor is an Athlon X2 3800+ (2 GHz).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #21
    Registered User Cpro's Avatar
    Join Date
    Oct 2006
    Posts
    149
    Thank you all for your help. It works now.

    One last question (although i'm sure to have more in the future).
    Is creating a Windows Application alot different than the Console Application programming I have been doing?
    For example, I want to try to take my previous Console Applications and turn them into Windows Applications (have a window, buttons, etc.). Is this going to be as simple as adding some code, or am I going to have to basically re-write my programs?
    Like, it appears from this code, that instead of using "cout" to ouput text to the screen, I use "TEXT("My first windows app")". So, do cout, if statements, loops, etc. still work?

    Thanks.
    IDE - Visual Studio 2005
    Windows XP Pro

  7. #22
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    It's much different from console (which is why everyone is suggested to begin with consoles to learn the basics before venturing on to GUI programs). The basics are still there, of course (string handling, ifs, etc), but cout & co will be useless in a windows app.
    And yes, you're pretty much going to have to re-write a lot and add a lot of code to make it work. Windows programming is far from easy.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Creating a Dialog Based Application without MFC
    By MitchellH in forum C++ Programming
    Replies: 8
    Last Post: 05-21-2005, 10:02 AM
  3. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 04:33 AM
  4. Creating a Stand-Alone Application
    By QtApprentice in forum C++ Programming
    Replies: 4
    Last Post: 11-03-2003, 01:33 PM

Tags for this Thread