hey recently i was wondering how to start a console window in fullscreen mode. i searched around the 'net a bit and heres all i could find:
| CODE |
#include <windows.h>
void fullscreen() { keybd_event(VK_MENU,0x38,0,0); keybd_event(VK_RETURN,0x1c,0,0); keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0); keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0); }
int main() {
fullscreen(); return 0; }
|
it works, but it leaves me wondering isnt there a simpler way to make a console go automaticaly fullscreen?
p.s. if someone changed the backround and made it flash your desktop it would be a good prank ;)
I dont have a reference handy, so I could be wrong; but maybe you could do it by getting a handle to the console via CreateFile() then using SetConsoleScreenBufferInfo() or a similar function to set it to fullscreen. Only problem with this technique is that it would take alot more of much more complex code than simply simulating a selection of the fullscreen option on the menu (What your example does).