In the Win32 folder, in Window::SetPositionRelative() there is the code:

// Retrieve desktop bounds and make sure window popup's origin isn't left-top 
of the screen.
RECT rcDesktop = {0, 0, 0, 0};
#ifdef SM_XVIRTUALSCREEN
rcDesktop.left = ::GetSystemMetrics(SM_XVIRTUALSCREEN);
rcDesktop.top = ::GetSystemMetrics(SM_YVIRTUALSCREEN);
rcDesktop.right = rcDesktop.left + ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
rcDesktop.bottom = rcDesktop.top + ::GetSystemMetrics(SM_CYVIRTUALSCREEN);
#endif

The effect of this is that if you are using VC6 out of the box (even SP6), 
where SM_XVIRTUALSCREEN is not defined, your call tips are limited to the 
primary monitor. If the code were changed to:

#ifndef SM_XVIRTUALSCREEN
#define SM_XVIRTUALSCREEN 76
#define SM_YVIRTUALSCREEN 77
#define SM_CXVIRTUALSCREEN 78
#define SM_CYVIRTUALSCREEN 79
#endif
rcDesktop.left = ::GetSystemMetrics(SM_XVIRTUALSCREEN);
rcDesktop.top = ::GetSystemMetrics(SM_YVIRTUALSCREEN);
rcDesktop.right = rcDesktop.left + ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
rcDesktop.bottom = rcDesktop.top + ::GetSystemMetrics(SM_CYVIRTUALSCREEN);

Then this would work on all platforms that support the extra SM_ values, and be 
unchanged on platforms that do not as GetSystemMetrics returns 0 for unknown 
requests.

The entire code could be reduce further as rcDesktop.right and rcDesktop.bottom 
are not used:

#ifndef SM_XVIRTUALSCREEN
#define SM_XVIRTUALSCREEN 76
#define SM_YVIRTUALSCREEN 77
#endif
rcDesktop.left = ::GetSystemMetrics(SM_XVIRTUALSCREEN);
rcDesktop.top = ::GetSystemMetrics(SM_YVIRTUALSCREEN);

Greg Smith


_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to