I'm trying to get an Icon to appear in a CStatic control but I'm damned if I can get it to work. I'm using VC++5 and all the help files tell me I can use ModifyStyle() to set the control to load an Icon but it doesn't seem to do anything.
here's my code:
m_cStatic.ModifyStyle(0, SS_ICON | SS_CENTERIMAGE | SS_SUNKEN, SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER);
HICON warningIcon (((CMyApp*)AfxGetApp())->LoadIcon(IDI_WARNING));
m_cStatic.SetIcon(warningIcon);
m_cStatic.SetRedraw(TRUE);
m_cStatic.RedrawWindow();
My CStatic control remains empty.
Any ideas?
Thanks in advance
CMR
here's my code:
m_cStatic.ModifyStyle(0, SS_ICON | SS_CENTERIMAGE | SS_SUNKEN, SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER);
HICON warningIcon (((CMyApp*)AfxGetApp())->LoadIcon(IDI_WARNING));
m_cStatic.SetIcon(warningIcon);
m_cStatic.SetRedraw(TRUE);
m_cStatic.RedrawWindow();
My CStatic control remains empty.
Any ideas?
Thanks in advance
CMR