1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#include "stdafx.h"
#include <iostream>
#include <windows.h>
using namespace std;
int main(void)
{
while(true)
{
int i;
cout << "READY FOR INPUT: \n";
cin >> i;
if(i==0)
{
system("exit");
HINSTANCE hInst = ShellExecute(NULL,"open","explorer","C:\\one.png",0,SW_SHOWMAXIMIZED);
Sleep(5);
}
if(i==1)
{
system("exit");
HINSTANCE hInst = ShellExecute(NULL,"open","explorer","C:\\two.png",0,SW_SHOWMAXIMIZED);
Sleep(5);
}
if(i==2)
{
system("exit");
HINSTANCE hInst = ShellExecute(NULL,"open","explorer","C:\\three.png",0,SW_SHOWMAXIMIZED);
Sleep(5);
}
if(i==3)
{
system("exit");
HINSTANCE hInst = ShellExecute(NULL,"open","explorer","C:\\four.png",0,SW_SHOWMAXIMIZED);
Sleep(5);
}
}
}
| |