[BUG_FIXED] cannot save file(s) if application closed while minimized.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@132 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
93280d508e
commit
62cfd070bf
@ -64,6 +64,14 @@ static void goToCenter(HWND hwnd)
|
||||
RECT rc;
|
||||
HWND hParent = ::GetParent(hwnd);
|
||||
::GetClientRect(hParent, &rc);
|
||||
|
||||
//If window coordinates are all zero(ie,window is minimised),then assign desktop as the parent window.
|
||||
if(rc.left == 0 && rc.right == 0 && rc.top == 0 && rc.bottom == 0)
|
||||
{
|
||||
hParent = ::GetDesktopWindow();
|
||||
::GetClientRect(hParent,&rc);
|
||||
}
|
||||
|
||||
POINT center;
|
||||
center.x = rc.left + (rc.right - rc.left)/2;
|
||||
center.y = rc.top + (rc.bottom - rc.top)/2;
|
||||
|
Loading…
Reference in New Issue
Block a user