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

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » win32 multiscreen / multimonitor problem fix
Re: win32 multiscreen / multimonitor problem fix [message #19511 is a reply to message #19509] Wed, 10 December 2008 00:25 Go to previous message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
Hello!

Thanks, accepted into the live U++ tree with slight code compression and avoiding to use internal Ctrl variables, please check for errors ;-):

Rect Ctrl::GetWorkArea() const
{
// return MonitorRectForHWND(GetHWND());
// mst:2008-12-08, hack for better multimonitor support.
	const Ctrl *topctl = GetTopCtrl();
	HWND hwnd = topctl->GetHWND();
	if(!hwnd && !((topctl = topctl->GetOwnerCtrl()) && (hwnd = topctl->GetHWND())))
		hwnd = ::GetFocus();
	return MonitorRectForHWND(hwnd);
}


Regards

Tom
 
Read Message
Read Message
Previous Topic: Propose a slight change to DropCoice/WithDropChoice
Next Topic: Context menu in a embedded class?
Goto Forum:
  


Current Time: Sat May 30 08:53:28 GMT+2 2026

Total time taken to generate the page: 0.00369 seconds