0

I want to replicate the behaviour that you get when you try to click outside a modal dialog such as created by AfxMessageBox(). The title bar flashes rapdily several times, and a beep sounds. Using CWnd::FlashWindow() I can only get one or two very slow flashes. What is the missing link?

4

1 回答 1

2

查看文档,我发现CWnd::FlashWindowEx它可以让您指定每次闪光之间的超时时间。如果您希望五次闪烁总共花费一秒,请将超时值(毫秒)指定为 200,将闪烁次数指定为 5。

windowObject.FlashWindowEx(FLASHW_CAPTION, 5, 200);

对于哔声,您可以执行类似于 native 的操作MessageBeep

MessageBeep(MB_OK);
于 2012-09-17T02:18:30.403 回答