Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text in a DIB
Message
De
18/12/2000 04:22:13
 
 
À
17/12/2000 13:17:11
Information générale
Forum:
Visual C++
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00454517
Message ID:
00454598
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform