#include <stdio.h>//includes header file, standard input/output library#include <windows.h>//contains the Windows header file, ShellExecute is coming from thisvoidMain () {printf ("I finally started. C and C + +"); //MessageBox (file handle number, message window content, message window title, with several buttons, can be up to 20 combinations)MessageBox (0,"Welcome to the programming world of C","This is not a joke.",0); ShellExecute (0,"Open","c:\\users\\administrator\\desktop\\ new folder \ \ If I am ... _ Gao Qi & overloading. mp3",0,0,1); ShellExecute (0,"Open","c:\\users\\administrator\\pictures\\p4s87libl41u2e3rro1_1280.jpg",0,0,1); //ShellExecute (file handle number, action to be performed open or print, file name to manipulate, reserved parameter location defaults to 0, reserved parameter location defaults to 0,windows window size, 1---maximized, 6---hidden)ShellExecute (0,"Print","c:\\users\\administrator\\pictures\\p4s87libl41u2e3rro1_1280.jpg",0,0,1); //GetChar () is only intended to stop the programGetChar ();}
ShellExecute in the literal sense, not only does the human thinking back to the shell in Linux----provide the interface between the kernel and the user, so it may be understood to open a process in the Windows system, in fact, These lines of ShellExecute code do turn on music playback, open images, and print images.
MessageBox and ShellExecute First experience