您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

VC++编程技巧集

2025/12/4 20:41:55发布24次查看
代码如下: void csys1view::ondraw(cdc* pdc) { csys1doc* pdoc = getdocument(); assert_valid(pdoc); // todo: add draw code for native data here // 显示系统windows目录 wchar szpath[max_path]; getwindowsdirectoryw( szpath, sizeof(szpath) ); pd
代码如下:
void csys1view::ondraw(cdc* pdc)
{
 csys1doc* pdoc = getdocument();
 assert_valid(pdoc);
 // todo: add draw code for native data here
// 显示系统windows目录
 wchar szpath[max_path];
 getwindowsdirectoryw( szpath, sizeof(szpath) );
 pdc->textout(100,100,windows目录:);
 pdc->textout(250,100,szpath);
// 显示temp目录
 char   temppath[_max_path+1];
    ::gettemppath   (_max_path,temppath);
 pdc->textout(100,150,temp目录:);
 pdc->textout(250,150,temppath);
// 显示系统分辨率
 char a1[12],b1[12];
 csize sizescreen (getsystemmetrics (sm_cxscreen),
 getsystemmetrics (sm_cyscreen));
 itoa(sizescreen.cx,a1,10);
 itoa(sizescreen.cy,b1,10);
 pdc->textout(100,200,水平分辨率:);
 pdc->textout(100,225,垂直分辨率:);
 pdc->textout(250,200,a1);
 pdc->textout(250,225,b1);
}
截图如下:
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product