MFC 在窗口上画指定大小的ICON

CPaintDC dc(this);
HICON hIcon  = (HICON)::LoadImage(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDI_ICON),IMAGE_ICON, 16,16,0);
::DrawIconEx(dc.GetSafeHdc(), 6, 2, hIcon, 16, 16, 0, NULL, DI_NORMAL | DI_COMPAT);

 

posted @ 2016-10-27 19:55  程序员大叔  阅读(1830)  评论(0编辑  收藏  举报