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

Click here to load this message in the networking platform