Please use the bbcode for codes so that its easy to see and analyze the code.

Also you dont have the correct syntax for the UpdateResource function and line is truncated.

Also can you alrify a bit more on what you mean by it can replace the defaulte icon but can't display the aa.ico in the EXE file?