Ans: The executable files of Paint Brush, Notepad, PowerPoint etc. have their own icons. If you want to use icon of one of these executables for your window use ExtractIcon( ) API function as shown below.
HICON hicon ;
hicon = ::ExtractIcon ( AfxGetApp( ) -> m_hInstance, “C:\\Windows\\pbrush.exe”, 0 ) ;
SetIcon ( hicon, FALSE ) ;
This code snippet shows how to set icon of Paint application to our window.