Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

Loading Bitmaps

Question:
I am having trouble transferring a bitmap that I loaded with the LoadBitmap call from a resource to a picturebox. How do I do that?

Answer:
The LoadBitmap call returns you a hWnd to the created bitmap. You should be able to use the GetDC API call to convert that hWnd and the hWnd of the picture box to hDC (device contexts), and then you can load those into the BitBlt function. You will have to look at the help for it in the Windows 3.1 SDK help file for more information, but that should get you going on the right track. The API declaration for GetDC is:

Declare Function GetDC Lib "user" (ByVal
hWnd%) As Integer
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date