Is it possible to make a shortcut that opens a program made in c++ in fullscreen mode? I only know how to do it with .bat files.
Is it possible to make a shortcut that opens a program made in c++ in fullscreen mode? I only know how to do it with .bat files.
some dude a while back posted this, it will let you make it
fullscreen, that is if your using windows.
i suppose you could have a statment asking if the person want
fullscreen and if they do run the code.
andCode:COORD Coord; SetConsoleDisplayMode( GetStdHandle( STD_OUTPUT_HANDLE ), CONSOLE_FULLSCREEN_MODE, &Coord);
i think that how it setup, ive never used it personally,Code:COORD Coord; SetConsoleDisplayMode( GetStdHandle( STD_OUTPUT_HANDLE ), CONSOLE_WINDOWED_MODE, &Coord);
also you will need to include <windows.h>
if you just want a windows shortcut to make a command
prompt fullscreen, ALT+ENTER will do that.
But i get an error: 101 C:\Programs\Dev-Cpp\man.cpp `CONSOLE_WINDOWED_MODE' undeclared (first use this function) , 101 C:\Programs\Dev-Cpp\man.cpp `SetConsoleDisplayMode' undeclared (first use this function) , C:\Programs\Dev-Cpp\G__~1.EXE man.o: No such file or directory.
#include <windows.h>
Stan The Man. Beatles fan
When I was a child,
I spoke as a child,
I thought as a child,
I reasoned as a child.
When I became a man,
I put childish ways behind me"
(the holy bible, Paul, in his first letter to the Cor. 13:11)
Errors:Code:#include <windows.h> #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { COORD Coord; SetConsoleDisplayMode( GetStdHandle( STD_OUTPUT_HANDLE ), CONSOLE_FULLSCREEN_MODE, &Coord); system("PAUSE"); return EXIT_SUCCESS; }
C:\Programs\Dev-Cpp\Templates\main8.cpp In function `int main(int, char**)':
10 C:\Programs\Dev-Cpp\Templates\main8.cpp `CONSOLE_FULLSCREEN_MODE' undeclared (first use this function)
10 C:\Programs\Dev-Cpp\Templates\main8.cpp `SetConsoleDisplayMode' undeclared (first use this function)
C:\Programs\Dev-Cpp\G__~1.EXE Templates/main8.o: No such file or directory.
C:\Programs\Dev-Cpp\G__~1.EXE no input files
From the MSDN
Requirements
Client Requires Windows "Longhorn" or Windows XP.
This means you need a pretty new version of windows. This also means this function is probably not included with older compilers/SDKs that came out prior to XP.
Edit:
Note that the following thoughts are my personal oppinion and a pet peeve and don't reflect any official or unofficial programming standards or guidelines:
It's called "Windows" for a reason. Ever heard of "Window XP" ? No. Why not ? It's "Windows", note the plural "s". Windows means I have the choice of multiple open command interfaces at the same time. By programmatically chosing fullscreen mode for your application, you assume your application is the only important thing on my mind when I start it. Guess what, it's not. Automatically opening fullscreen is contraproductive on my system. It will get the app removed real quick. There are applications I chose to open fullscreen. But that's because I made a choice. I know that many people don't even know that you can have two windows on the same screen, I always hate coming back to my PC having to resize all windows because all of them are maximized. How much better does a simple mp3 player or a Skype Window get if you have it 1200x1024 fullscreen ? If your application is better fullscreen, great. Make fullscreen the default. But give me a choice. Give me a way to turn that lousy feature off. </rant>
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.
i to tired to work on this problem right now, i found
somethign that could possibly satisfy you?
Code:#include <iostream> #include <windows.h> using namespace std; int main() { SetConsoleTitle("Console32"); HWND hwnd = FindWindow(NULL, "Console32"); SendMessage(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); cin.get(); return 0; }
I make programs for myself and to learn more c++, I am not going to use everything I learn how to do, in my REAL programs. If I ever make any REAL programs.Originally Posted by nvoigt
ILoveVectors, sorry but your script didnt work for me.
It only changed the title to Console32, nothing else...
Stan The Man. Beatles fan
When I was a child,
I spoke as a child,
I thought as a child,
I reasoned as a child.
When I became a man,
I put childish ways behind me"
(the holy bible, Paul, in his first letter to the Cor. 13:11)
I am using Windows 98 SE. That example doesnt work on Windows 98.
Just print a message: "Press ALT-ENTER to enter full-screen mode."
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Yes, I agree. That's the default hot-key to do it, so you might as well use it.Originally Posted by dwks