Home » U++ Library support » TopWindow&PopUp, TrayIcon » TopWindow::SerializePlacement () on dual-head display
Re: TopWindow::SerializePlacement () on dual-head display [message #34271 is a reply to message #34263] |
Mon, 07 November 2011 15:54 |
Tom1
Messages: 1216 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
Yet more. The maximized status is not properly retained (at least in Windows 7) if the window is already opened. (See below the if(IsOpen()) statement.) Also restoring to secondary display in maximized state does not work correctly.
Here is the new tail part of the TopWindow::SerializePlacement() as I have it now and this works for me. Please check if it works for you and merge to upp.
...
if(IsOpen()) {
#ifdef PLATFORM_WIN32
WINDOWPLACEMENT wp;
memset(&wp,0,sizeof(WINDOWPLACEMENT));
wp.length=sizeof(WINDOWPLACEMENT);
wp.showCmd = state==MINIMIZED ? SW_MINIMIZE : state==MAXIMIZED ? SW_MAXIMIZE : SW_RESTORE;
wp.rcNormalPosition.left=rect.left;
wp.rcNormalPosition.top=rect.top;
wp.rcNormalPosition.right=rect.right;
wp.rcNormalPosition.bottom=rect.bottom;
::SetWindowPlacement(GetHWND(),&wp);
#endif
#ifdef PLATFORM_X11
if(state == MINIMIZED)
Minimize(false);
if(state == MAXIMIZED)
Maximize(false);
#endif
}
}
#endif
}
Best regards,
Tom
|
|
|
|
|
TopWindow::SerializePlacement () on dual-head display
By: Tom1 on Mon, 07 November 2011 09:42
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: mirek on Mon, 07 November 2011 09:51
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: Tom1 on Mon, 07 November 2011 10:56
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: Tom1 on Mon, 07 November 2011 15:54
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: Tom1 on Fri, 18 May 2012 15:36
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: Tom1 on Wed, 23 May 2012 12:58
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: mirek on Wed, 23 May 2012 15:40
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: Tom1 on Thu, 24 May 2012 08:53
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: mirek on Thu, 24 May 2012 08:59
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: Tom1 on Thu, 24 May 2012 09:02
|
|
|
Re: TopWindow::SerializePlacement () on dual-head display
By: unodgs on Mon, 07 November 2011 10:52
|
Goto Forum:
Current Time: Tue May 14 20:50:20 CEST 2024
Total time taken to generate the page: 0.02580 seconds
|