Click to See Complete Forum and Search --> : 2 Simple Questions
absalom
Nov 21st, 2000, 07:41 PM
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
Stephen Bazemore
Nov 22nd, 2000, 07:35 AM
I'm not sure about your first question, but for the fullscreen here you go:
// 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.
jovton
Nov 24th, 2000, 03:44 AM
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
Nov 24th, 2000, 05:34 AM
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.
>)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.