CopiedSprite.sImage->SpritePos.y = (SelectedSprite.sImage->SpritePos.y + 20);
*CopiedSprite.sImage->hBitmap = *SelectedSprite.sImage->hBitmap;
::GetObject(CopiedSprite.sImage->hBitmap, sizeof (BITMAP), &CopiedSprite.sImage->Bitmap);
CopiedSprite.sImage->hBitmap = SelectedSprite.sImage->hBitmap;
In the red bold is my problem. I need to copy the bitmap that HBITMAP points to to another HBITMAP. I tried to simply dereference both hBitmaps so that it would copy the bitmap, and it compiles, but I get a runtime issue that just kicks me out when it reaches that line.
Does the winAPI have a function or something for copying a bitmap that an hbitmap points to into another hbitmap?