Advertisement
Guest User

Untitled

a guest
Feb 14th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.75 KB | None | 0 0
  1. for(int N=0;N<pIcoGrp->idCount;N++){
  2.           ICONDIRENTRY    *pIcoF = &pIcoDir->idEntries[0]+N;
  3.           GRPICONDIRENTRY *pIcoR = &pIcoGrp->idEntries[0]+N;
  4.  
  5.           memcpy(pIcoR,pIcoF,sizeof(GRPICONDIRENTRY)-sizeof(WORD));
  6.  
  7.           pIcoR->nID = N+100;
  8.           // Update the resource
  9.           if(
  10.                UpdateResource(
  11.                     hHandle,
  12.                     RT_ICON,
  13.                     MAKEINTRESOURCE(1),
  14.                     MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
  15.                     ((LPVOID)pIcoDir)+pIcoF->dwImageOffset,
  16.                     pIcoF->dwBytesInRes
  17.                ) == 0){
  18.                printf("Error at Update resource (1) : 0x%X... ",GetLastError());
  19.                exit(9);
  20.           }
  21.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement