U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to previous message
Tom1
Messages: 1319
Registered: March 2007
Ultimate 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to call a new window?
Next Topic: TopWindow "WhenOpen" callback
Goto Forum:
  


Current Time: Thu Oct 08 20:47:00 GMT+2 2026

Total time taken to generate the page: 0.33805 seconds