How do I set the icon thats displayed in the caption of a frame window or dialog?
You first load the icon from your program’s resources, then set it as the window’s current icon. You should set both the large (32×32) and small (16×16) icons; the large icon is used in the Alt+Tab window, and the small icon is used in the caption bar and the Taskbar. Note that the code generated by the MFC AppWizard is buggy and does not properly set the small icon. The LoadIcon() function can only load 32×32 icons; to load 16×16 icons, use LoadImage().