Results 1 to 4 of 4

Thread: 2 Simple Questions

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61
    Umm... Guys

    I have two questions

    First:

    I have created a VC++ dos program How do I change the title of the dos window

    Second:

    How do I make that same window Fullscreen

    Thanks
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  2. #2
    Addicted Member Stephen Bazemore's Avatar
    Join Date
    Aug 2000
    Location
    North Carolina
    Posts
    158
    I'm not sure about your first question, but for the fullscreen here you go:

    Code:
    // setconsolemode9x.cpp (Windows 95/98) 
    // 
    // This example will show how you can switch console application 
    // to the full-screen mode on Windows 95/98. 
    // 
    // 
    // (c)1999 Ashot Oganesyan K, SmartLine, Inc 
    // mailto:ashot@aha.ru, http://www.protect-me.com, http://www.codepile.com 
    
    #include <windows.h> 
    #include <stdio.h> 
    
    #define ID_SWITCH_CONSOLEMODE 0xE00F 
    
    void main(int argc, char* argv[]) 
    { 
    if (argc<2) 
    { 
    printf("Usage:\n\nsetconsolemode9x.exe hWnd\n"); 
    return; 
    } 
    
    HWND hWnd; 
    sscanf(argv[1],"%lx",&hWnd); 
    
    if (!IsWindow(hWnd)) 
    { 
    printf("Incorrect window handle\n"); 
    return; 
    } 
    
    SendMessage(hWnd,WM_COMMAND,ID_SWITCH_CONSOLEMODE,0); 
    }
    Hope that helps.
    Stephen Bazemore
    Email:runik@hotmail.com

  3. #3
    Hyperactive Member jovton's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    267

    Wink

    hang on a sec, man.

    i got the answer to your first question. see my next post
    when it arrives. not gonna take long, promise.

    thnx.
    jovton

  4. #4
    Hyperactive Member jovton's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    267

    Cool

    Answer the first question?

    Yeah here it is:

    You can use the "SetConsoleTitle" function to set
    the caption of the console window.

    Code:

    RetVal = SetConsoleTitle("Point of Sales System") ;



    Here is a list of console functions

    The following functions used to manipulate a console.

    AllocConsole
    CreateConsoleScreenBuffer (This is a nice one for doing that proffesional screen buffer saving to return to the original screen after your program exits. Cool!)
    FillConsoleOutputAttribute
    FillConsoleOutputCharacter
    FlushConsoleInputBuffer
    FreeConsole
    GenerateConsoleCtrlEvent
    GetConsoleCP
    GetConsoleCursorInfo
    GetConsoleMode
    GetConsoleOutputCP
    GetConsoleScreenBufferInfo
    GetConsoleTitle
    GetLargestConsoleWindowSize
    GetNumberOfConsoleInputEvents
    GetNumberOfConsoleMouseButtons
    GetStdHandle
    HandlerRoutine
    PeekConsoleInput
    ReadConsole
    ReadConsoleInput
    ReadConsoleOutput
    ReadConsoleOutputAttribute
    ReadConsoleOutputCharacter
    ScrollConsoleScreenBuffer
    SetConsoleActiveScreenBuffer
    SetConsoleCP
    SetConsoleCtrlHandler
    SetConsoleCursorInfo
    SetConsoleCursorPosition
    SetConsoleMode
    SetConsoleOutputCP
    SetConsoleScreenBufferSize
    SetConsoleTextAttribute
    SetConsoleTitle
    SetConsoleWindowInfo
    SetStdHandle
    WriteConsole
    WriteConsoleInput
    WriteConsoleOutput
    WriteConsoleOutputAttribute
    WriteConsoleOutputCharacter

    hope it helps.
    >)

    jovton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width