10月27
VCL里的MessageDlg没有声音,而标准的windows消息对话框是带声音的
可以用下面的函数解决:
function MsgDlg (const msg: string; atype: TMsgDlgType; abuttons: TMsgDlgButtons; helpctx: Longint): Word;
var mb: CARDINAL;
begin
case AType of
mtWarning: mb:= MB_ICONEXCLAMATION;
mtError: mb:= MB_ICONHAND;
mtInformation: mb:= MB_ICONASTERISK;
mtConfirmation: mb:= MB_ICONQUESTION;
else mb:= $0FFFFFFFF;
end;
MessageBeep (mb);
MsgDlg:= MessageDlg (msg, atype, abuttons, helpctx);
end
来源:Heck's Blog
地址:https://www.heckjj.com/post/309/
转载时须以链接形式注明作者和原始出处及本声明,否则将追究法律责任,谢谢配合!
可以用下面的函数解决:
function MsgDlg (const msg: string; atype: TMsgDlgType; abuttons: TMsgDlgButtons; helpctx: Longint): Word;
var mb: CARDINAL;
begin
case AType of
mtWarning: mb:= MB_ICONEXCLAMATION;
mtError: mb:= MB_ICONHAND;
mtInformation: mb:= MB_ICONASTERISK;
mtConfirmation: mb:= MB_ICONQUESTION;
else mb:= $0FFFFFFFF;
end;
MessageBeep (mb);
MsgDlg:= MessageDlg (msg, atype, abuttons, helpctx);
end
来源:Heck's Blog
地址:https://www.heckjj.com/post/309/
转载时须以链接形式注明作者和原始出处及本声明,否则将追究法律责任,谢谢配合!
在C++与Delphi之
截获系统函数



