Setting A Dialog's Icon

Date: 5 April 1999
Author: faklein at globalnet dot co dot uk

To set or change the dialog icon placed a LoadIcon function call in the dialog constructor, where ThisIcon is of type HICON:

  ThisIcon = ::LoadIcon(GetApplication()->GetInstance(), MAKEINTRESOURCE(ICON_8));

And in the EvInitDialog message handler, write:

  SendMessage(WM_SETICON, (WPARAM)false, (LPARAM)ThisIcon);