Subversion Repositories filter_foundry

Rev

Rev 300 | Rev 407 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 300 Rev 301
Line 133... Line 133...
133
#define _MONITOR_DEFAULTTONEAREST    0x00000002
133
#define _MONITOR_DEFAULTTONEAREST    0x00000002
134
 
134
 
135
void _doMonitorAdjustments(LPRECT rcPlugin) {
135
void _doMonitorAdjustments(LPRECT rcPlugin) {
136
        RECT rcMonitorWork;
136
        RECT rcMonitorWork;
137
        _HMONITOR hMonitor;
137
        _HMONITOR hMonitor;
138
        _MONITORINFO grMonitorInfo = { sizeof(grMonitorInfo) };
138
        _MONITORINFO grMonitorInfo;
139
        int nXAdjust = 0, nYAdjust = 0, nPluginWidth, nPluginHeight, nMonitorWorkWidth, nMonitorWorkHeight;
139
        int nXAdjust = 0, nYAdjust = 0, nPluginWidth, nPluginHeight, nMonitorWorkWidth, nMonitorWorkHeight;
140
 
140
 
141
        hMonitor = _MonitorFromRect(rcPlugin, _MONITOR_DEFAULTTONEAREST);
141
        hMonitor = _MonitorFromRect(rcPlugin, _MONITOR_DEFAULTTONEAREST);
142
        if (hMonitor == NULL) return;
142
        if (hMonitor == NULL) return;
143
 
143
 
-
 
144
        grMonitorInfo.cbSize = sizeof(grMonitorInfo);
144
        if (!_GetMonitorInfoA(hMonitor, &grMonitorInfo)) return;
145
        if (!_GetMonitorInfoA(hMonitor, &grMonitorInfo)) return;
145
        rcMonitorWork = grMonitorInfo.rcWork;
146
        rcMonitorWork = grMonitorInfo.rcWork;
146
 
147
 
147
        // Don't let the window exit the left/right borders of the monitor
148
        // Don't let the window exit the left/right borders of the monitor
148
        nPluginWidth = rcPlugin->right - rcPlugin->left;
149
        nPluginWidth = rcPlugin->right - rcPlugin->left;