Thread: No window

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    3

    Question No window

    I am wanting this program to not display/generate a window when ran. I forgot how.

    Thanks,

    James

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    What program? What window? !!
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    watts
    Guest
    If your using msvc then put your console code in a win32 app, no window will appear.

  4. #4
    Registered User
    Join Date
    Oct 2002
    Posts
    3
    I am using Visual Studio 6.0.

    I am wanting the DOS windows to disappear because I am not displaying anything on the screen.

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    If you've created a console program, you'll need a console to run it in. If you've created a Windows GUI program, you don't need a console window, or any visible window if you don't want.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  6. #6
    watts
    Guest
    Example:
    Needs to be a win32 app not a win32 console app.
    Code:
    int WINAPI WinMain( HINSTANCE hThisInst, HINSTANCE hPrevInst, LPSTR lpszArgs, int nWinMode )
    {
         FILE *fp;
    
         fp = fopen( "temp.txt", "wt" );
         fputs( "Hello World", fp );
         fclose( fp );
     
         return 0;
    }
    this isn't a console program, it's a windows program. But it demonstrates that you can easliy write a 'console' program without a window, just by changing main.

  7. #7
    Registered User
    Join Date
    Oct 2002
    Posts
    3

    Question Don't understand

    I do not understand that code. Am I going to have to use MFC programming to not use a window? the code is in C right now. I may end up using COBOL.

    I am just wanting to do this.

    printf("\a"); //beep

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM