How can i make a normal application

This is a discussion on How can i make a normal application within the C++ Programming forums, part of the General Programming Boards category; How can i make a normal application, not win32? What program... What source code......

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    21

    How can i make a normal application

    How can i make a normal application, not win32?
    What program...
    What source code...

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,344
    Choose "console" application in your IDE (you didn't say which).

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    21
    Ok but it still starts in a system32 screen??? ( i mean that black screen) What can i do about that???
    btw. im using Visual C++ express edition

    and btw. (i know im noob) what does IDE mean?
    Last edited by jobbie; 01-20-2006 at 07:11 AM.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    What do you mean by "normal" application. On win32 there are two main types of application these are windows console applications and windows GUI applications.
    Console applications display a console with text, GUI applications don't display a console and normally create a window.

  5. #5
    Registered User
    Join Date
    Jan 2006
    Posts
    21
    I want to make a game, understand?
    but not with text... but with models in 3D
    So i need a GUI application... if i understand it right??
    how do i do that then?

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    A GUI application has a WinMain function instead of a main function. Some compilers will require to set it to GUI in the project settings.

    To make a game you would use DirectX or OpenGL.

    Before you do that you might want to read some tutorials such as those written by The Forger which will show you how a GUI application works.

  7. #7
    Registered User
    Join Date
    Jan 2006
    Posts
    21
    Sorry that i have to ask one more thing...
    But i have an error: Can't find windows.h, there's no such file...
    What can i do bout that?

  8. #8
    @codeguru
    Join Date
    Jan 2006
    Posts
    34
    do you happen to use MSVC++2005 express edition? if so you need to download Platform SDK from microsoft.

  9. #9
    Registered User
    Join Date
    Mar 2002
    Posts
    203

  10. #10
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    If you have a legitimate copy of your compiler and IDE, and it was installed correctly, then your IDE should be able to locate the appropriate headers and libraries. If it cannot, and it is a genuine copy, I suggest you de-install it and re-install using the installers defaults.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  11. #11
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by adrianxw
    If you have a legitimate copy of your compiler and IDE, and it was installed correctly, then your IDE should be able to locate the appropriate headers and libraries. If it cannot, and it is a genuine copy, I suggest you de-install it and re-install using the installers defaults.
    MSVC++ 2005 express dosen't come with the headers or libraries to create window API applications. The instructions say you need to download the SDK as well.

    Make sure to do a full install of the SDK, I used the custom install and it didn't install a need library.
    Last edited by Quantum1024; 01-20-2006 at 09:09 AM.

  12. #12
    Registered User
    Join Date
    Jan 2006
    Posts
    21
    The Forger is not very usefull to me... because it's written in C..
    Thank you all very much... my compiler now accepts windows.h and stuff...
    Does anyone know a good site for a free Open GL download?
    Last edited by jobbie; 01-20-2006 at 12:46 PM.

  13. #13
    Registered User
    Join Date
    Jan 2006
    Posts
    21
    is there btw another tutorial like The Forger that is written in C++
    and does anyone know a good site for a free Open GL download?

    Code:
    #include <windows.h>
    
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
        LPSTR lpCmdLine, int nCmdShow)
    {
        MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
        return 0;
    }
    the error with this is:
    SDK special.cpp
    c:\documents and settings\waalwijk\mijn documenten\visual studio 2005\projects\sdk special\sdk special\sdk special.cpp(6) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [22]' to 'LPCWSTR'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    what do i have to do bout this?
    Last edited by jobbie; 01-20-2006 at 01:14 PM.

  14. #14
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    The code above in perfectly valid c++ the reason it isn't compiling is that the compiler is set to unicode.
    To make the code work as it is open your project in MSVC++ and go to the project menu and click properties. underneath configuration properties select general and then set charactor set to "not set".
    You can also work in unicode by placing an L before text strings
    Code:
    MessageBox(NULL, L"Goodbye, cruel world!", L"Note", MB_OK);

  15. #15
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,344
    Or even
    Code:
    MessageBox(NULL, _TEXT("Goodbye, cruel world!"), _TEXT("Note"), MB_OK);
    , then you can mess with turning unicode on and off, and you don't have to keep hacking the code about to cope with it.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cleanup of the application...
    By Petike in forum Windows Programming
    Replies: 1
    Last Post: 08-16-2008, 05:23 PM
  2. Win32 Common Controls in C++, how do i make and use them?
    By C+noob in forum Windows Programming
    Replies: 6
    Last Post: 01-09-2006, 10:53 AM
  3. Problem with com application
    By amardon in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2005, 05:50 AM
  4. socket send() exits app unexceptively
    By Kleid-0 in forum C Programming
    Replies: 9
    Last Post: 07-25-2005, 08:29 AM
  5. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 03:33 AM

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