BITMAP bm;
::GetObject(hBitmap, sizeof(bm), &bm);


width and height should be filled in the bm structure (along with some other fields).