Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text in a DIB
Message
From
18/12/2000 04:22:13
 
 
To
17/12/2000 13:17:11
General information
Forum:
Visual C++
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00454517
Message ID:
00454598
Views:
23
I am going to make a couple of assumptions here; first you are using MFC, secondly you already know how to load a bitmap (BMP) file.
void DrawBitmap(CDC& dc, CBitmap* pbm)
{
   CDC dcMem;
   BOOL bReturn;

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

   *!*
   *!* Now you can use the CDC member methods to render stuff
   *!* into the display context, for example:-   
   *!*
   *!* CDC::DrawText()
   *!* CDC::ExtTextOut()
   *!*

   dcMem.SelectObject(pOldBitmap);
 }
You can convert this to native Win32 API calls but I find MFC much simpler for this type of thing.

HTH
Neil
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform