综合 >> 计算机 >> 课程详情
 帮助主题
客服在线答疑

  该会员的其他系列课程
   
该会员的录制课程
   
VC常用技巧总结 系列课程
 
主讲人: etre 个人认证图标
ID 号: 100011
信用分: 50
好评率: 73.5%
课程咨询:
查看详细信息
课程收费:
课  时: 1次 * 60分钟   
开课日期: 2008-08-31
上课时间: 详细时间
 
适合人群:
招生人数: 不限制
  查看信用评价
课程试听: 联系我
浏  览: 6      信用积分:0    最近更新:2008-07-30 22:51
   
 
 课程简介

如何确定当前屏幕分辨率
调用SDK函数GetSystemMetrics,该函数可以检索有关windows显示信息,诸如标题大小、边界大小以及滚动条大小等等。

//Initialize CSize object with screen size.
CSize sizeScreen (GetSystemMetrics (SM_CXSCREEN),
GetSystemMetrics (SM_CYSCREEN))

 

如何确定Windows和Windows系统目录
有两个SDK函数可以完成该功能。GetWindowsDirectory和GetSystemDirectory,下例说明了如何使用这两个函数:

TCHAR szDir [MAX_PATH]
//Get the full path of the windows directory.
∶ : GetWindowsDirectory (szDir, MAX_PATH)
TRACE ("Windows directory %s\n", szDir)
//Get the full path of the windows system directory.
∶ : GetSystemDirectory (szDir, MAX_PATH)
TRACE ("Windows system directory %s\n", szDir)