vc++ 비트맵 사이즈 가져오기

2007/09/01 22:14

//비트맵 불러오고
CBitmap *bmpImage;
    bmpImage = CBitmap::FromHandle((HBITMAP)LoadImage(GetModuleHandle(NULL), "skin\\All player1.bmp", IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION | LR_LOADFROMFILE | LR_DEFAULTSIZE ));

//사이즈가져오고
    BITMAP bitmap;
    int nBmpWidth, nBmpHeight;
    ::GetObject(*bmpImage, sizeof(BITMAP), &bitmap);   
    nBmpWidth = bitmap.bmWidth;
    nBmpHeight = bitmap.bmHeight;

Tags

bitmap, vc++