Task bar Icon
-
Hai How can we set an icon in the task bar :confused: Thanks in advance:)
-
Hai How can we set an icon in the task bar :confused: Thanks in advance:)
-
Hai How can we set an icon in the task bar :confused: Thanks in advance:)
Put this code in OnInitDialog function of your Dlg Class if you are working on a MFC dialog based application
HICON m_hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON,16, 16, 0); SetIcon (m_hIcon,false); ModifyStyleEx(0, WS_EX_APPWINDOW);
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
Put this code in OnInitDialog function of your Dlg Class if you are working on a MFC dialog based application
HICON m_hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON,16, 16, 0); SetIcon (m_hIcon,false); ModifyStyleEx(0, WS_EX_APPWINDOW);
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
You also need to destroy the icon by calling the DestroyIcon(HICON ) to prevent resource leak . Regards, FarPointer Blog:http://farpointer.blogspot.com/
-
You also need to destroy the icon by calling the DestroyIcon(HICON ) to prevent resource leak . Regards, FarPointer Blog:http://farpointer.blogspot.com/
Yeap buddy, Sometimes the code given is not optimized. This was one of those. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
Hai How can we set an icon in the task bar :confused: Thanks in advance:)
akshita_15 wrote:
How can we set an icon in the task bar :confused:
the QWin32 way of doing sam e:- HERE[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You