Knowledge Base Nr: 00002 change_icon.cpp - http://www.swe-kaiser.de

Downloads:

MFC: change icon during run-time of application

  
HICON hicon = AfxGetApp()->LoadIcon(IDR_NEWICON);
AfxGetMainWnd()->SetIcon(hicon, TRUE); //big icon
AfxGetMainWnd()->SetIcon(hicon, FALSE); //small icon