正在加载图片...
121.1一个简单的应用实例 【例121】设计一个简单的音频播放程序,程 序启动时,播放 windows系动启动时候的音乐 1创建工程文件 MCIStart;打开 Stdafx. h文件,在# ifndef AFX NO AFXCMN SUPPORT语句的上一行顶头加入 语句# include< mmsystem. h> Project Settings ? x 2将 winmm. lib Settings For: win 32 Debug General I Debug I cIC++Link Resources |M B-EP MCIStart 与应用程序链三m Category: General Res 接起来 中-口 Resource Files Output file name: 自 ReadMe.txt Debug/Mcistart ex Objectlibrary module 3在 MCIStartDlg. cpp的 OnInitDialog0 Generate debug info Ignore all default libraries 函数中的 return TrUe之前加上代码:Lmmp 厂 Generate mapfile sndPlaySound("System Start", SND_ASYNC); Project pti /incremental: yes /pdb: Debug/MCIStart pdb"/debt achine: 386 /out: Debug/MciStart. exe / pdbtype OK Cancel3 12.1.1 一个简单的应用实例 【例12-1】设计一个简单的音频播放程序,程 序启动时,播放windows系动启动时候的音乐 1.创建工程文件MCIStart;打开Stdafx.h文件,在#ifndef _AFX_NO_AFXCMN_SUPPORT语句的上一行顶头加入 语句#include <mmsystem.h> 2.将winmm.lib 与应用程序链 接起来 3.在MCIStartDlg.cpp的OnInitDialog() 函数中的return TRUE之前加上代码: sndPlaySound("SystemStart" ,SND_ASYNC);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有