Saturday 18 May 2013

Use a custom icon in a dialog box in windows

When creating a windows dialog, the icon in the top left corner is the dull standard one. Add your own funky alternative by adding this code! SendMessage(mainDialog,WM_SETICON,ICON_BIG,(LPARAM)::LoadIcon(hInstance, MAKEINTRESOURCE(IDI_YOURICON))); SendMessage(mainDialog,WM_SETICON,ICON_SMALL,(LPARAM)::LoadIcon(hInstance, MAKEINTRESOURCE(IDI_YOURICON))); SendMessage(mainDialog,WM_SETICON,ICON_SMALL2,(LPARAM)::LoadIcon(hInstance, MAKEINTRESOURCE(IDI_YOURICON)));

No comments:

Post a Comment