BigInch
Petroleum
- Jun 21, 2006
- 15,161
Warning! Very limited graphics programming knowledge and using VB6. Now 3 days at the helm with no sleep.
I am trying to load a texture. I have been able to do this from a disk file by using LoadImage and specifying the texture's file name,
'***********************
Public HBITMAP as Long
HBITMAP = LoadImage(0, TextureFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE Or LR_CREATEDIBSECTION)
'***********************
I would also like to load a texture from a Device Context, but can't seem to figure out what the procedure is for doing that. I now guess its probably impossible to simply BitBlt to an HBITMAP, as I have been able to do from one DC to another, or from a DC to a picture box. Anybody know how to get a DC into a HBITMAP? Humm... looks like I should have tried creating a DIB and attempt to load with the same statements above, so I'll be trying that until...
BigInch
-born in the trenches.
I am trying to load a texture. I have been able to do this from a disk file by using LoadImage and specifying the texture's file name,
'***********************
Public HBITMAP as Long
HBITMAP = LoadImage(0, TextureFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE Or LR_CREATEDIBSECTION)
'***********************
I would also like to load a texture from a Device Context, but can't seem to figure out what the procedure is for doing that. I now guess its probably impossible to simply BitBlt to an HBITMAP, as I have been able to do from one DC to another, or from a DC to a picture box. Anybody know how to get a DC into a HBITMAP? Humm... looks like I should have tried creating a DIB and attempt to load with the same statements above, so I'll be trying that until...
BigInch
![[worm] [worm] [worm]](/data/assets/smilies/worm.gif)