This screen must be completely filled with the Dialog and the Dialog
must be placed on the second screen.
Is there an automatic way to place a dialog on the second screen ?
Matthias
Tom
"Matthias Pospiech" <matth...@gmx.de> wrote in message
news:ekmlo2$scm$1...@newsserver.rrzn.uni-hannover.de...
EnumDisplayMonitors
GetMonitorInfo
MonitorFromPoint
MonitorFromRect
MonitorFromWindow
Take a look at these. What happens is that the x coordiante of the origine
of each monitor is the horizontal resolution of the last monitor + 1.
So GetMonitorInfo will tell you what that value is along with the resolution
of that monitor.
What you want to do is call GetMonitorInfo for the second monitor and then
use SetWindowPos to place your window within the coordinates returned by
GetMonitorInfo.
Here is an example, of a window going fullscreen on the monitor that it's
parent window is on. (if i was to set it to 0,0 instead of Rect.left,
Rect.top it would show up on the first monitor.
CRect Rect;
HMONITOR hMon =
MonitorFromWindow(GetParent()->m_hWnd,MONITOR_DEFAULTTONEAREST);
MONITORINFO MonitorInfo;
MonitorInfo.cbSize = sizeof( MonitorInfo );
::GetMonitorInfo( hMon, &MonitorInfo );
Rect = MonitorInfo.rcMonitor;
SetWindowPos(&wndTopMost,Rect.left,Rect.top,Rect.Width(),Rect.Height(),SWP_S
HOWWINDOW);
AliR.
"Matthias Pospiech" <matth...@gmx.de> wrote in message
news:ekmlo2$scm$1...@newsserver.rrzn.uni-hannover.de...