[ENHANCEMENT] Better flash window while search not found.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1049 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-05-21 23:31:50 +00:00
parent 0bd5bfa635
commit fb67ac3bc3
2 changed files with 20 additions and 5 deletions

View File

@ -5142,7 +5142,7 @@ struct Quote{
const char *_quote;
};
const int nbQuote = 128;
const int nbQuote = 130;
Quote quotes[nbQuote] = {
{"Notepad++", "Good programmers use Notepad++ to code.\nExtreme programmers use MS Word to code, in Comic Sans, center aligned."},
{"Martin Golding", "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."},
@ -5263,6 +5263,8 @@ Quote quotes[nbQuote] = {
{"Anonymous #87", "I promised I would never kill someone who had my blood.\nBut that mosquito made me break my word."},
{"Anonymous #88", "Frigide, ton cul doit etre jaloux de la merde qui sort de ta bouche."},
{"Anonymous #89", "I'm drunk and you're still ugly."},
{"Anonymous #90", "Clapping:\n(verb)\nRepeatedly high-fiving yourself for someone else's accomplishments."},
{"Anonymous #91", "CV: ctrl-C, ctrl-V"},
{"Gandhi", "Earth provides enough to satisfy every man's need, but not every man's greed."},
{"R. D. Laing", "Life is a sexually transmitted disease and the mortality rate is one hundred percent."},
{"Apple fan boy", "I'll buy a second iPhone 5 and buy a lot of iOS applications so that Apple will be able to buy Samsung (this shitty company) to shut it down and all the Apple haters will be forced to have an iPhone. Muhahaha..."},

View File

@ -1971,13 +1971,26 @@ void FindReplaceDlg::setStatusbarMessage(const generic_string & msg, FindStatus
if (staus == FSNotFound)
{
::MessageBeep(0xFFFFFFFF);
HWND hwnd2Flash = isVisible()?_hSelf:GetParent(_hSelf);
FlashWindow(hwnd2Flash, TRUE);
FLASHWINFO flashInfo;
flashInfo.cbSize = sizeof(FLASHWINFO);
flashInfo.hwnd = isVisible()?_hSelf:GetParent(_hSelf);
flashInfo.uCount = 3;
flashInfo.dwTimeout = 100;
flashInfo.dwFlags = FLASHW_ALL;
FlashWindowEx(&flashInfo);
}
else if (staus == FSTopReached || staus == FSEndReached)
{
if (!isVisible())
FlashWindow(::GetParent(_hSelf), TRUE);
if (!isVisible()) {
FLASHWINFO flashInfo;
flashInfo.cbSize = sizeof(FLASHWINFO);
flashInfo.hwnd = GetParent(_hSelf);
flashInfo.uCount = 2;
flashInfo.dwTimeout = 100;
flashInfo.dwFlags = FLASHW_ALL;
FlashWindowEx(&flashInfo);
}
}
if (isVisible())