In almost the same way. When copying from one EXE to another, you used LoadImage()/LoadResource() followed by LockResource() to get a pointer to the icon's data. You then called UpdateResource() with that pointer. When using an ICO file, the only difference is to use CreateFile() to open the ICO file, followed by ReadFile() to get a pointer to pass to UpdateResource(). Make sense?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?