Changing icon resource with madshis madres

provide proper language and everything should work just fine.
function UpdateExeIcon(exeFile, iconGroup, icoFile: string; language: word) : boolean;
var resUpdateHandle : dword;
resUpdateHandle := BeginUpdateResourceW(PWideChar(wideString(exeFile)), false);
if resUpdateHandle <> 0 then
if (icongroup=’MAINICON’) or GetIconGroupResourceW(resUpdateHandle, PWideChar(wideString(iconGroup)), language, c) then
result := LoadIconGroupResourceW(resUpdateHandle, PWideChar(wideString(iconGroup)), language, PWideChar(wideString(icoFile)))
if StrToIntDef(iconGroup, -1)>-1 then
result := LoadIconGroupResourceW(resUpdateHandle, PWideChar(pointer(strtoint(iconGroup))), language, PWideChar(wideString(icoFile)))
result := false;
result := EndUpdateResourceW(resUpdateHandle, false) and result;
end else
result := false;

Related posts

2 Responses to “Changing icon resource with madshis madres”

  1. ciuly says:

    and just for the record, here is the question that the above was derived from:

  2. ciuly says:

    and I made an extract thingie too 🙂
    both projects can be found here:

Leave a Reply

This blog is kept spam free by WP-SpamFree.