Posted by Brian Levantine on March 15, 2004 at 10:56:14:
The DlgDemo program was recently modified to demonstrate how to place a customized icon onto the dialog caption bar. The program failed to show how to restore the icon to the original default value. The code to reset the icon must be executed BEFORE the dialog is actually destroyed. This should be done in your command handler code before calling the COS.EndDialog subroutine.
The below code can be used to reset a dialog class icon to its default value.
cosValue = 0 ! Restore standard icon
cosCWnd$ = cosDlghDlg$
cosIndex = GCL.HICON
Gosub COS.SetClassLong