Matlab position 0 is off the screen - windows

I'm running Matlab 2015a on a Windows 7 laptop connected to two external monitors using nvidia's nView desktop manager. Recently, my figure positions have been screwey. When I set a positive x position, the figures appear off the right side of the screens. Pulling them in view (with Windows Key + Arrow) shows a negative value for anything in view. This is a big problem for my default positions (Waitbars and such are appearing out of view) and if I share my scripts with anyone (otherwise I'd just set my figures to show up at [ -1000, 10, w, l], but that'd put them off the left of other people's screens)
Any ideas what might cause this? I've had the same computer/moniter/GPU set up for over a year, and this only popped up in the past few weeks.

this might help: [1,1] is the position of the lower left corner of your Main Display. Its not the most left nor the first montior. you can check and change taht in control panel/Display/Settings (or similiar depending on windows version and language). So if your main screen is in the middle the display on the left of it will have a negative value on x

Related

Do relative coordinates for a window change depending on the resolution?

My colleagues seem to have a lot of trouble using my AHK scripts and it sounds like the MouseClicks are not clicking the right positions within the active windows.
Both parties here are using Windows 7.
Their resolution is 1600 x 900 where as I'm using 1280 x 1024.
I thought the relative positions to a given window would be different so I got my IT people to get 16:9 monitors today for the computer next to mine. Unfortunately the monitors don't support 1600 x 900 resolution and when I noticed that I didn't check the coordinates on those monitors because it wasn't the right resolution.
I was looking around for another way to convert the coordinates to that resolution and found a thread that says converting my coordinates is as simple as:
x1 * 1600/1280 = x2
y1 * 900/1024 = y2
I applied this formula to the MouseClick command coordinates and I tested it on different resolutions and the clicks go to the wrong position everytime.
However, the regular coordinates from my starting resolution still work.
I'm not sure anymore if the coordinates are the problem which is why I'm here asking.
Thank you.
No. The coordinate system or point of origin is not affected by screen resolution, nor are the coordinates for the window itself.
However, the size or contents of the window may change depending on any number of factors, including screen resolution. It is up to the application.
Window coordinates (the default for most commands in AutoHotkey v1) depend on the current system theme and other settings which affect the size of the window's title bar and borders.
Client coordinates (the default for AutoHotkey v2) are less affected by differences between systems, so are recommended over Window coordinates.
Whatever the coord mode, any values you hard code in the script will need to take into account whatever changes in layout might occur within the application. Again, what those changes are depends on the application.
If the system has multiple monitors and they do not all have the same DPI (scaling), the system "lies" about the coordinates of objects on monitors other than the primary one, unless the program retrieving the coordinates is per-monitor DPI aware. This can cause issues with AutoHotkey, which is not per-monitor DPI aware.

Windows HtmlHelp popup on wrong monitor

I'm using the HTMLHelp function with C to provide short, context sensitive help for the edit fields on various dialogs. It works perfectly except when the dialog is located on a monitor whose screen has negative X coordinates.
For example, I have three monitors and the top, left point on the CENTER of the three is the (0,0) point on the screen. That makes ALL X-coordinates on the LEFT screen have negative values. When I call HTMLHelp for HH_DISPLAY_TEXT_POPUP, the tooltip it displays shows up stuck to the left edge of the CENTER screen instead of on the LEFT screen, where it belongs. When the coordinate for the help popup is on the center or right screens, the popup is exactly where it should be.
Does anyone know a way to get the HTMLHelp function to work correctly and just use the given coordinates instead of applying an invalid range check and "fixing" my X location?
If not, I guess I will be forced to write my own version of a help popup function, but I'd much rather use the system feature.

Placing window on two displays with different resolution in same point

Is there a way to place window in the same point for example in top-right corner on the to displays with different resolution?
For example you have Macbook and you connected it to big display.
Note: windows property "Spaces" in IB is set to "Can join all spaces"
Spaces and displays are two separate concepts. So, "Can join all spaces" is not relevant to your question.
A window can only be at one position in the global screen coordinate system that spans the whole desktop. Each display constitutes a separate part of that coordinate system (ignoring mirroring). Therefore, no, it's not possible to have a window show up in the top-right corner of two separate displays. You would need two separate windows to achieve that.

How do you get the view coordinates of a CListCtrl in LVS_REPORT style on Win XP

I'm trying to coordinate the scrolling of a CListCtrl with another control. Contrary to the documentation on Win 7 you can call CListCtrl::GetViewRect or CListCtrl::GetOrigin to get the viewable area coordinates.
e.g. If you're scrolled 10 units across CListCtrl::GetOriginwill return x=10, y=0.
Unfortunately Win XP does follow the SDK documentation which says "... if the control is in report view, the return value is always zero".
I'm sure this must be really simple but whats the best way to get the top left coordinates of a CListCtrl viewable area?
It turns out that GetScrollInfo will do the trick. The nPos value matches the window coordinates (ie the min/max range represents the total size of columns not a fixed 0-100 range).

Buttons become mis-aligned when window is resized

I'm designing my interface in Interface Builder (using Xcode 4.2 on Snow Leopard), and PERFECTLY aligning two elements (two NSButtons, bordered), one below the other.
The thing is that when the window is resizing, at some points, the elements seem misaligned (by 1 pixel or so), while at some other, they're still perfectly aligned.
Here's a (zoomed) example of what I mean:
Aligned
Mis-Aligned
And here are my resizing settings (for the upper NSButton):
And for the container (of my upper NSButton):
I know I'm probably getting a bit too crazy about such a tiny issue, but I definitely need to resolve it.
So, why is that happening? What should I do in order to resolve it?
Are both buttons in the same container?
Do they have the same size & alignment settings?
Below the autosizing widgets in the inspector, there's a set of alignment buttons. Try selecting both buttons and clicking the left-side alignment button. (See if that makes the other side mis-align.) Below that are placement icons - verify both buttons have same settings there.
Type in values for W & H so both buttons are the exact same (even if the boxes already show the same, type over it to be sure). Also type in X & Y so they're same (except for vertical offset).
Personally, having the center scaling set (last image, double-ended horizontal arrow) seems odd when it's only anchored on one side. That might have a strange effect. On the other hand, you have both vertical anchors set but not the vertical scaling.
If all else fails, you could try (save original version first) delete the second button, copy the first and position the copy below it.

Resources