void Icon(int icon)
{
SetClassLongPtr(m_hWnd, GCL_HICON,
(LONG)LoadIcon(m_hInst, MAKEINTRESOURCE(icon)));
}
changing icon in win32 during runtime
Hi how do I change the icon in the title bar. I have a custom window class that creates a window with the default IDI_APPLICATION icon. I want to inherit the class and then be able to change the icon. I looked at msdn and it said to do this.
But it doesn't change, is there something I am missing.
I think the icon on the title bar is the small icon, which should be GCLP_HICONSM instead of GCL_HICON
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement