Because most of the sample applications use a dialog box as their main window, you must change the dialog box icon manually so that it is displayed correctly on the taskbar, in the task switch window, and in the application's caption. The chSETDLGICONS macro is always called when dialog boxes receive a WM_INITDIALOG message so that the icons are set correctly.