MessageBox and ShellExecute First experience

Source: Internet
Author: User

#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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.