在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,欢迎指教