📄 readme.wzd
字号:
/////////////////////////////////////////////////////////////////////
// To play a beep
/////////////////////////////////////////////////////////////////////
// 1) to play a simple tone
::Beep( 1000, // sound frequency, in hertz (the higher the number the higher the pitch)
1000); // sound duration, in milliseconds);
/////////////////////////////////////////////////////////////////////
// To play a separate .WAV file
/////////////////////////////////////////////////////////////////////
// 1) include <mmsystem.h> and link your project with winmm.lib
// 2) to play a .WAV file
::sndPlaySound("sound.wav",SND_SYNC); // and SND_ASYNC for async sound
// and SND_ASYNC|SND_LOOP for continual play
/////////////////////////////////////////////////////////////////////
// To play a .WAV file from your application's resources
/////////////////////////////////////////////////////////////////////
// 1) include <mmsystem.h> and link your project with winmm.lib
// 2) add a .WAV file to your project (see the book for an easy way.)
// 3) to play the .WAV file resource
HRSRC hRsrc = FindResource(AfxGetResourceHandle(),MAKEINTRESOURCE(IDR_SOUND),"WAV");
HGLOBAL hglb = LoadResource(AfxGetResourceHandle(), hRsrc);
::sndPlaySound((LPCTSTR)::LockResource(hglb),SND_MEMORY|SND_SYNC|SND_NODEFAULT);
FreeResource(hglb);
/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1999 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -