J_Seaman
asked on
Urgent and hopefully easy BMP
I am trying to display a BMP using the following in an onpaint event:
CDC *LogoDC, LogoMemDC;
CBitmap* OldBMP;
CBitmap LogoBitmap;
BITMAP BMPObject;
LogoDC = m_CLogo.GetDC();
LogoBitmap.LoadBitmap(IDB_
LogoBitmap.GetObject( sizeof(BITMAP), &BMPObject);
LogoMemDC.CreateCompatible
OldBMP = LogoMemDC.SelectObject(&Lo
LogoDC->BitBlt(0, 0, BMPObject.bmWidth, BMPObject.bmHeight, &LogoMemDC, 0,0, SRCCOPY );
LogoMemDC.SelectObject(Old
Problem is I only get about 256 colours and need proper resolution - 16 bit I think it is.
How do I do this?!
Thanks a lot
James.
ASKER
Any chance of some code, really busy at the moment and that's n issue which is considered a bonus. If so you can have the points and a very big thankyou. Already determined the problem is due to the internal BMP stuff being stored in 256 colour.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Not had a chance to test it yet but thanks a lot - I trust ya!
The other thing: Normally I would load the bitmap at another place into a variable and only display it inside the onpaint handler. It might depend on where the bitmap comes from and if it changes often but here it seems to be a resource.