如何让程序显示在第二个屏幕上? 嗯...我前天把笔记本屏幕按坏了,外接个显示器,在WIN8下直接右键有选项,显示到监控屏幕设备就好了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://msdn.microsoft.com/zh-cn/library/windows/desktop/dd162827(v=vs.85).aspx你看上面这个网址,我查到了这样一个。但是不知道怎么用谁来看看 MonitorFromPoint, MonitorFromRect, and MonitorFromWindow.GetMonitorInfo SetWindowPos 用以上几个函数就可以实现 WINDOWINFO wininf; AfxGetApp()->GetMainWnd()->GetWindowInfo(&wininf); int Num = GetSystemMetrics(SM_CMONITORS); MONITORINFO inf,inf2; int ret; if(Num >= 2) { HMONITOR hMonitor = ::MonitorFromPoint( CPoint( 0,0 ), MONITOR_DEFAULTTOPRIMARY ); inf.cbSize = sizeof(inf); inf2.cbSize = sizeof(inf2); GetMonitorInfo(hMonitor,&inf); HMONITOR mo = ::MonitorFromPoint( CPoint( inf.rcMonitor.right + 100,0 ), MONITOR_DEFAULTTONEAREST ); GetMonitorInfo(mo,&inf2); ret = SetWindowPos(AfxGetApp()->GetMainWnd(), wininf.rcWindow.left+inf2.rcMonitor.left, wininf.rcWindow.top+inf2.rcMonitor.top, wininf.rcWindow.right, wininf.rcWindow.bottom, SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW); }MFC实现,win32同理 MFC使用ADO怎么连接SQL2005 VS2005文件归类问题求助 请问如何才能获取当前的时间 对Button进行SetIcon时.. 用VC怎么实现打印预览(没装打印机) 我想看看一个mfc单文挡程序的从程序开始到结束所有消息怎么办,谢谢了 哪位有<<program windows with MFC>>中文版下载的地址? VC出现奇怪的问题,救命啊~~~ 请问:ActiveX控件嵌入网页,怎么能做到让用户自动下载注册? CInternetSession初始化的问题? 急急急 VS2012帮助的问题 急,子窗口中的编辑框无法编辑?
你看上面这个网址,我查到了这样一个。
但是不知道怎么用谁来看看
GetMonitorInfo
SetWindowPos
用以上几个函数就可以实现
AfxGetApp()->GetMainWnd()->GetWindowInfo(&wininf);
int Num = GetSystemMetrics(SM_CMONITORS);
MONITORINFO inf,inf2;
int ret;
if(Num >= 2)
{
HMONITOR hMonitor = ::MonitorFromPoint( CPoint( 0,0 ), MONITOR_DEFAULTTOPRIMARY ); inf.cbSize = sizeof(inf);
inf2.cbSize = sizeof(inf2);
GetMonitorInfo(hMonitor,&inf);
HMONITOR mo = ::MonitorFromPoint( CPoint( inf.rcMonitor.right + 100,0 ), MONITOR_DEFAULTTONEAREST );
GetMonitorInfo(mo,&inf2);
ret = SetWindowPos(AfxGetApp()->GetMainWnd(),
wininf.rcWindow.left+inf2.rcMonitor.left,
wininf.rcWindow.top+inf2.rcMonitor.top,
wininf.rcWindow.right,
wininf.rcWindow.bottom,
SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW);
}
MFC实现,win32同理