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);
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);