[BUG_FIXED] (Author: Ede_123) Fix opening file in Notpad++ makes Aero-snapped canceled.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1099 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-08-06 10:11:49 +00:00
parent 785459bf8e
commit 614070068f

View File

@ -337,12 +337,18 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
sw = SW_MAXIMIZE;
else if (::IsIconic(hNotepad_plus))
sw = SW_RESTORE;
/* REMOVED
else
sw = SW_SHOW;
// IMPORTANT !!!
::ShowWindow(hNotepad_plus, sw);
DEVOMER*/
/* ADDED */
if (sw != 0)
::ShowWindow(hNotepad_plus, sw);
/* DEDDA */
::SetForegroundWindow(hNotepad_plus);
if (params.size() > 0) //if there are files to open, use the WM_COPYDATA system