资源下载 | 发布源码资源
源码下载:Delphi源码 | JAVA源码 | VC源码 | VB源码 | .NET源码 | PB源码 | PHP源码

会员中心

当前位置:问友源码 ->
相关分类

多屏幕显示器编程( 七 )
发 布 者:tomore 
发布日期:2006-08-31 11:59
资源类别:
所属子类:
开发语言:其他开发语言
相关标签:屏幕 显示器 编程 

详细描述:
  Programming for Multiple Monitors in Windows 98
Figure 3: Cache the Work Area

Continued from Figure 2: The Virtual Desktop

This code snippet caches the work area of every monitor for later use.

// global variables to store work area

int gCount;

LPRECT gpRectArray = NULL;

void CacheWorkAreas()

{

// set the counter to 0

gCount = 0;

// delete old array, since number of monitors may

// have changed

delete [] gpRectArray;

// allocate a new array sized to the number of monitors

gpRectArray = new RECT[GetSystemMetrics(SM_CMONITORS)];

EnumDisplayMonitors(NULL, NULL, monitorEnumInfoProc, 0);

}

// definition of callback function

BOOL CALLBACK monitorEnumProc(

HMONITORhmonitor,

HDChdcMonitor,

LPRClprcMonitor,

DWORDdwData)

{

MONITORINFO mi;

mi.cbSize = sizeof(mi)

GetMonitorInfo(hmonitor, &mi);

*gpRectArray[gCount] = mi.rcWork;

gCount++;

}

Published as Power Programming in the 4/7/98 issue of PC Magazine.

相关下载资源:
delphi和PHP混合编程(PHP4DELPHI)
delphi和PHP混合编程(PHP4DELPHI),在DELPHI中调用PHP的程序,经调试能用,很COOL.能将PHP的程序在离开WEB服务 ...
c#高级编程(c#大全)
c#高级编程(c#大全)------从入门到精通c#,不论是初学者还是编程老手都很有用! ...
c#高级编程(第3版)
c#高级编程(第3版),包括完整英文版(清晰PDF格式),不全的中文版(几章DOC格式) ...
C#高级编程(第三版)
C#高级编程(第三版)
TIJ阅读笔记(第七章)
7:多态性再访上传(upcasting)  把对象的reference当作基类的reference来用,被成为上传(upcasting)。&nbs ...

会员评论:[举报获金币] 更多评论>>

还没有会员发布评论

发表评论:
hmtttank:上传资源被加精,获得10金币
gaoli0829sheng:上传资源被加精,获得10金币
panyuanol:上传资源被加精,获得10金币
hjianhuo:上传资源被加精,获得10金币
hjianhuo:上传资源被加精,获得10金币
dengdengwang:上传资源被加精,获得10金币
小叶子月:上传资源被加精,获得10金币
he426100:上传资源被加精,获得10金币
skyandecho:上传资源被加精,获得10金币
linjh225569:上传资源被加精,获得10金币

[完成后可按 Ctrl+Enter 发布]