How do you change the icon in a window's title bar?
Printable View
How do you change the icon in a window's title bar?
Assign the desired icon to IDR_MAINFRAME at design time or if u want to set it at run time then
HICON hIconNew = AfxGetApp()->LoadIcon( IDI_ICON1);
if( hIconNew)
{
AfxGetApp()->m_pMainWnd->SetIcon( hIconNew, TRUE);
}
Rajesh M. Jangid
C,C++,VC++,Java(C plus plus minus)