发信人: zgshit (浪漫已过), 信区: Npsos
标  题: Re: 张老师,老问题!
发信站: 哈工大紫丁香 (Sun Sep 22 20:47:05 2002) , 转信

学会看帮助。
MessageBeep
The MessageBeep function plays a waveform sound. The waveform sound for each s
ound type is identified by an entry in the [sounds] section of the registry. 
BOOL MessageBeep(
  UINT uType   // sound type
);
 
Parameters
uType 
Specifies the sound type, as identified by an entry in the [sounds] section of
 the registry. This parameter can be one of the following values: 
Value Sound
0xFFFFFFFF Standard beep using the computer speaker
MB_ICONASTERISK SystemAsterisk
MB_ICONEXCLAMATION SystemExclamation
MB_ICONHAND SystemHand
MB_ICONQUESTION SystemQuestion
MB_OK SystemDefault

Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error informa
tion, call GetLastError. 
Remarks
After queuing the sound, the MessageBeep function returns control to the calli
ng function and plays the sound asynchronously. 
If it cannot play the specified alert sound, MessageBeep attempts to play the 
system default sound. If it cannot play the system default sound, the function
 produces a standard beep sound through the computer speaker. 
The user can disable the warning beep by using the Sound Control Panel applica
tion. 
Windows CE: Passing 0xFFFFFFFF will cause the SystemDefault waveform to be pla
yed. 



【 在 pray (望悠草) 的大作中提到: 】
: MessageBeep(1000)中的1000次太多了,少设个数。


: 【 在 pray (望悠草) 的大作中提到: 】
: :    我用VC编了一个能发出声音的项目!主要用了以下几个函数:
: : 
: : 

: :   OnCreat()
: : {  SetTimer(1,1000,null);
: :    rerturn 0;
: : }
: : 
: : OnTimer()
: : {  MessageBeep(1000);
: :  }
: :  
: : OnDestory();
: : {  KillTimer(1);
: : }
: : 
: : 当我把messsagebeep(1000)改成10的时候好像变化不大!

: 不过在关掉对话框的后声音就没有了.(以前是还会发声的)

: 请问messzgebeep(  ) 这个函数中的参数是什么意思?这个函数是什么功能?







--

※ 来源:.哈工大紫丁香 http://bbs.hit.edu.cn [FROM: 202.118.228.51]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.972毫秒