VC雕虫小技集(四)[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 he_zhidan 的 blog

category: choose listing files

listing file type:

select "assembly with source code"

 

9,如何获得进程所消耗的cpu时间?

bool getprocesstimes(

  handle hprocess,

  lpfiletime lpcreationtime,

  lpfiletime lpexittime,

  lpfiletime lpkerneltime,

  lpfiletime lpusertime

);

 

10,如何通过扩展名得到该扩展名所对应的图标?

shgetfileinfo(path,

              attr,

              &sfi,

              sizeof(shfileinfo),

              shgfi_usefileattributes | shgfi_icon | shgfi_typename);

 

 

 

如何在拉着对话框的边框改变大小时,让它成比例的变化.就像视频播放软件哪样

处理wm_sizing消息

void ctest 1dlg::onsizing(uint fwside, lprect prect)

{

  cdialog::onsizing(fwside, prect);

  if((fwside==wmsz_bottom) || (fwside==wmsz_top))

    prect->right=prect->left+(prect->bottom-prect->top)*2; 

  else

    prect->bottom=prect->top+(prect->right-prect->left)*0.5; 

本文关键:VC 雕虫小技集
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top