You can enable your application to display an icon in the title bar of a dialog box by adding the WS_SYSMENU and WS_CAPTION styles to the dialog box template and sending the WM_SETICON message from within the dialog box procedure in response to the WM_INITDIALOG message.
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.