本网页所有文字内容由 imapbox邮箱云存储,邮箱网盘, iurlBox网页地址收藏管理器 下载并得到。
ImapBox 邮箱网盘 工具地址: https://www.imapbox.com/download/ImapBox.5.5.1_Build20141205_CHS_Bit32.exe
PC6下载站地址:PC6下载站分流下载
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox 网页视频 工具地址: https://www.imapbox.com/download/ImovieBox4.7.0_Build20141115_CHS.exe
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
#define SM_CMONITORS 80
// int screen_count = ::GetSystemMetrics( SM_CMONITORS );
BOOL EnumDisplayDevices(
LPCTSTR lpDevice, // device name
DWORD iDevNum, // display device
PDISPLAY_DEVICE lpDisplayDevice, // device information
DWORD dwFlags // reserved
);
typedef BOOL ( __stdcall * pEnumDiaplayDevices )( LPCTSTR lpDevice, // device name
DWORD iDevNum, // display device
PDISPLAY_DEVICE lpDisplayDevice, // device information
DWORD dwFlags // reserved
);
int
GetScreenRect( int ScreenNo, RECT *rect )
{
pEnumDiaplayDevices xenum;
BOOL flag;
DISPLAY_DEVICE dd;
ZeroMemory( &dd, sizeof( dd ) );
dd.cb = sizeof( dd );
HMODULE hhh = LoadLibrary( _T( "user32.dll" ) );
if( hhh )
{
xenum = ( pEnumDiaplayDevices )GetProcAddress( hhh, "EnumDisplayDevicesW" );
}
if( !xenum )
{
FreeLibrary( hhh );
return 1;
}
//flag = EnumDisplayDevices( NULL, ScreenNo, &dd, 0 );
flag = xenum( NULL, ScreenNo, &dd, 0 );
if( !flag )
{
FreeLibrary( hhh );
return 1;
}
DEVMODE dm;
ZeroMemory( &dm, sizeof( dm ) );
dm.dmSize = sizeof( dm );
flag = EnumDisplaySettings( dd.DeviceName, ENUM_CURRENT_SETTINGS, &dm );
rect–>left = dm.dmPosition.x;
rect–>top = dm.dmPosition.y;
rect–>right = dm.dmPelsWidth;
rect–>bottom = dm.dmPelsHeight;
FreeLibrary( hhh );
return 0;
}
//*************************
// 简单测试代码
//*************************
RECT rec;
int result = GetScreenRect( 1, &rec );
if( rec.left == rec.right )
{
// 没找到第二显示器,随便判断一下,不严格
阅读和此文章类似的: 程序员专区