人工设定窗口图标

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

本文简介:选择自 leisureful 的 blog

在vc中使用代码修改任意对话框窗口得图标,起主要代码如下:

在oninitdialog函数中加入下面代码:

其中idr_my为自己指定得图标

 hinstance hinstresource = afxfindresourcehandle(makeintresource(idr_my),
  rt_group_icon);
 hicon m_hicon = (hicon)::loadimage(hinstresource,
        makeintresource(idrmy),
        image_icon, 15, 15, 0);
 if( m_hicon != 0 )
 {
  seticon(m_hicon,true);
    }

2003.6.18,欢迎指教

本文关键:VC 图标
  相关方案
Google
 

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

go top