控制台程序自动全屏

#include <iostream> #include <windows.h> using namespace std; //Function Declaration void FullScreen(); int main() { FullScreen(); cout << "Yay! We Are Now Full Screen!!"<< endl; cout << "Press Any Key To Undo The Full Screen!" << endl; cin.get(); FullScreen(); cout << "No More Full Screen =(" << endl; cin.get(); } 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); }

你可能感兴趣的:(c,include,menu)