Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use main window icon in dialog boxes

Status
Not open for further replies.

PeDa

Technical User
Oct 10, 2002
227
NL
My resource script contains an icon and several dialog boxes. I see the icon in the blue caption bar of the main window, but not in the dialog boxes. How can I apply my icon also in the dialog boxes? My RC contains (among other things)...

Surprise ICON Surprise.ico

HelmBox DIALOG 183, 55, 155, 50
STYLE WS_POPUP | WS_CAPTION
CAPTION "Heading for automatic helmsman"
FONT 8, "MS Sans Serif"
{
LTEXT "Heading to steer" , -1, 15, 10, 160, 8
.....
}
 
HWND hDlg = <Handle of dialog box>;
HICON hIcon = <Handle of the icon>;

SendMessage ( hDlg, WM_SETICON, (WPARAM)TRUE, (LPARAM)hIcon );



Marcel
 
Marcel,

Thank you.

Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top