Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » support for maximising on second monitor[FEATURE_REQUEST]
support for maximising on second monitor[FEATURE_REQUEST] [message #11124] Mon, 20 August 2007 22:30 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
I posted this as a bug in the IDE somewhere else. However, it also effects TopWindow when you try to maximise it on a second monitor. If the second monitor is a different shape to the first, TopWindow will not exceed either dimension of the first monitor display. Also, TopWindow will not exceed the dimensions of the first monitor if you try to drag it to cover more than one display at once. Linux and Windows both support multiple monitors with different resolutions so I believe this is a real issue.

Nick

p.s. I am more than willing to test any potential solutions.
Re: support for maximising on second monitor[FEATURE_REQUEST] [message #11125 is a reply to message #11124] Mon, 20 August 2007 23:38 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11965
Registered: November 2005
Ultimate Member
I agree. Any further informations and patches are highly welcome!
Re: support for maximising on second monitor[FEATURE_REQUEST] [message #11131 is a reply to message #11125] Tue, 21 August 2007 15:15 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
good point Embarassed

There is definitely a limit somewhere (I can't find it) which is based on the first screen size and on not on the virtual screen but I do not understand why the win32 maximize calls don't work properly.

Anyway, will test on linux when I get a chance.

Nick

Re: support for maximising on second monitor[FEATURE_REQUEST] [message #11134 is a reply to message #11131] Tue, 21 August 2007 20:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11965
Registered: November 2005
Ultimate Member
OK, found possible cause.

Please, try simple experiment:

In CtrlCore/Win32Proc.cpp, commenout out the whole WM_GETMINMAXINFO case and report how maximize behaves...

Mirek
Re: support for maximising on second monitor[FEATURE_REQUEST] [message #11137 is a reply to message #11134] Tue, 21 August 2007 22:50 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Yup. That works perfectly Smile

The top window now maximizes to the full extents of whichever screen it is mostly on. Also, it is not possible to span both screens by drag-resizing the window. This is as I believe it should be.

Thanks. Will this be in the next release or was there a reason for that case?

Nick

[Updated on: Tue, 21 August 2007 22:53]

Report message to a moderator

Re: support for maximising on second monitor[FEATURE_REQUEST] [message #11140 is a reply to message #11137] Wed, 22 August 2007 10:55 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11965
Registered: November 2005
Ultimate Member
Slow down, it was just about identifying the problem. The real solution is a bit more complex and even involves changing Ctrl interface (minimally).

Anyway, it should be implemented now (thanks Tom!) and definitely will be available in the next release.

Mirek
Re: support for maximising on second monitor[FEATURE_REQUEST] [message #36537 is a reply to message #11140] Wed, 06 June 2012 01:09 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Mirek,

Is it possible to allow windows to be dragged to cover more than one window?

I now believe the correct behaviour is to be zoomable to cover only one monitor but to be sizeable to cover the entire desktop by dragging.

Is there a flag to control this behaviour? It looks just now as if the maximum size for zooming is also the maximum size for sizing.

Cheers,

Nick

EDIT: comenting out the WM_GETMINMAXINFO block resuts in something very like the desired behaviour for my current app. Is there a way to disable this block without changing my version of the UPP code?

How about a flag called "limitless" where, if it set, that block doesn't do anything?

[Updated on: Wed, 06 June 2012 01:17]

Report message to a moderator

Re: support for maximising on second monitor[FEATURE_REQUEST] [message #36581 is a reply to message #36537] Mon, 11 June 2012 12:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11965
Registered: November 2005
Ultimate Member
I guess that simply removing 'msz' out of process would do the trick, right?

Mirek
Re: support for maximising on second monitor[FEATURE_REQUEST] [message #36585 is a reply to message #36581] Mon, 11 June 2012 18:00 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Yes. I just tried

	case WM_GETMINMAXINFO:
		{
			MINMAXINFO *mmi = (MINMAXINFO *)lParam;
			Rect frmrc = Size(200, 200);
			::AdjustWindowRect(frmrc, WS_OVERLAPPEDWINDOW, FALSE);
//			Size msz = Ctrl::GetWorkArea().Deflated(-frmrc.left, -frmrc.top,
//				           frmrc.right - 200, frmrc.bottom - 200).GetSize();
//			Rect minr(Point(50, 50), min(msz, GetMinSize()));
//			Rect maxr(Point(50, 50), min(msz, GetMaxSize()));
			Rect minr(Point(50, 50), GetMinSize());
			Rect maxr(Point(50, 50), GetMaxSize());
			dword style = ::GetWindowLong(hwnd, GWL_STYLE);
			dword exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE);
			AdjustWindowRectEx(minr, style, FALSE, exstyle);
			AdjustWindowRectEx(maxr, style, FALSE, exstyle);
			mmi->ptMinTrackSize = Point(minr.Size());
			mmi->ptMaxTrackSize = Point(maxr.Size());
			LLOG("WM_GETMINMAXINFO: MinTrackSize = " << Point(mmi->ptMinTrackSize) << ", MaxTrackSize = " << Point(mmi->ptMaxTrackSize));
			LLOG("ptMaxSize = " << Point(mmi->ptMaxSize) << ", ptMaxPosition = " << Point(mmi->ptMaxPosition));
		}
		return 0L;


and it seems to be the best all round. Can we make this the default behaviour please?

Nick
Re: support for maximising on second monitor[FEATURE_REQUEST] [message #36588 is a reply to message #36585] Tue, 12 June 2012 12:52 Go to previous message
mirek is currently offline  mirek
Messages: 11965
Registered: November 2005
Ultimate Member
Done. Thanks.
Previous Topic: TopWindow "WhenOpen" callback
Next Topic: How to just close a window£¿
Goto Forum:
  


Current Time: Wed Jul 24 04:12:22 CEST 2019

Total time taken to generate the page: 0.01837 seconds