Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text in a DIB
Message
From
18/12/2000 06:53:09
 
 
To
18/12/2000 06:12:12
General information
Forum:
Visual C++
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00454517
Message ID:
00454618
Views:
21
Hennie,

Sorry I should have expanded the example a bit more. The thing I left out was a call to BitBlt() to transfer the bitmap to the display context.
void DrawBitmap(CDC& dc, CBitmap* pbm)
{
   CDC dcMem;
   BOOL bReturn;

   dcMem.CreateCompatibleDC(&dc);
   CBitmap* pOldBitmap = dcMem.SelectObject(pbm);

   *!* Copy bits from bitmap to display context, parameters
   *!* intentionally left out.
   dc.BitBlit(.....)

   *!* Now use the GDI to perform further rendering.
   dc.DrawText(data, -1, r, DT_CENTER ); 

   dcMem.SelectObject(pOldBitmap);
 }
If you have any more problems then I will dig out Visual C++ and create a sample project for you.

HTH
Neil
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform