About SetIcon
-
I want to paste a icon from resource to a button by using SetIcon(), but neither m_bttnOpen.SetIcon(AfxGetApp()->LoadIcon(IDI_ICON_OPEN)); nor m_bttnOpen.SetIcon(::LoadIcon(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON_OPEN))); can do this. Why? And how to do this by the most simple way? thankx
-
I want to paste a icon from resource to a button by using SetIcon(), but neither m_bttnOpen.SetIcon(AfxGetApp()->LoadIcon(IDI_ICON_OPEN)); nor m_bttnOpen.SetIcon(::LoadIcon(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON_OPEN))); can do this. Why? And how to do this by the most simple way? thankx
olinn wrote: Why? Has your button the icon style checked ? (Go in the ressource editor, right click on your button, tab "styles", check "Icon"). olinn wrote: And how to do this by the most simple way? This one :
m_bttnOpen.SetIcon(::LoadIcon(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON_OPEN)));
~RaGE();