hey i am currently developing a rts game, and for the external resources im using palette and data files (as they are tiny in comparisson to its current 24-bit format) but the problem is the routine im using to read the palette and the data file uses the setpixel procedure, and this has had a huge impact on loading times, before the loading time was barely noticable, but now it takes around 13seconds, so i was wondering whether there is a faster way of setting a COLORREF to an x,y coordination of a Device context, heres my current code:

Code:
 ifstream File2(DataPath);
 File2.setmode(filebuf::binary);
 for(int y=0;y<iHeight;y++)
  for(int x=0;x<iWidth;x++)
  {
   File2.get(Byte1);
   SetPixel(hDC,x,y,Palette[Byte1]);
  }
 File2.close();
any help would be great, thanx