Archive: Custom MB Icons?


Custom MB Icons?
is there a possibility to change those icons or are these system icons? would be nice if one could replace those using an .icl (icon library).


You can with MessageBoxIndirect, but you will have to make an extension DLL for this.


i can contribute icons, not write dlls :D


I was trying to write the DLL for you but:

lpszIcon
Identifies an icon resource. This parameter can be either a null-terminated string or an integer resource identifier passed to the MAKEINTRESOURCE macro.
To load one of the standard system-defined icons, set the hInstance member to NULL and set lpszIcon to one of the values listed with the LoadIcon function.

This member is ignored if the dwStyle member does not specify the MB_USERICON flag.
This means you can't load the icon from a file and you will have to add it as a resource to the DLL. If you want I can make you the DLL so you will be able to insert an icon into it using Resource Hacker and then it will use this icon. It can also take the icon from a certain EXE or icon library. Just tell me what fits better to your needs.

I've included such example into just posted release (Sample 1). See examples/system.nsi.