Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Ringo on March 08, 2005, 01:39 AM

Title: OpCode
Post by: Ringo on March 08, 2005, 01:39 AM
Iv been trying to write the ratings/levels of users in there icons, but im having a little trubble.

I can currently paint and copy to a bmp, but when i add that bmp to my imagelist for some reassion what i have printed to it doesnt stick!
All the image types im dealing with are .BMP
I have tryed all the opcodes i know of but with no luck:
vbMergeCopy
vbMergeand

vbSrcPaint
vbSrcCopy
vbSrcInvert
Also all the PAT's

Is there a Opcode that will print this final?

I am currently painting a BMP Picture in a picture box, adding it to my image list, in turn adding it to my list view, but the painting is not binding to the BMP!
anyone have any ideas, i would be most greatfull for ideas of how to do this ( VB ) thx in advance!

Some example code:

Private Sub Command1_Click()
Picture1.PaintPicture Picture2.Picture, 0, 150, 500, 500, 0, 150, 500, 500, vbSrcPaint
Picture1.PaintPicture Picture2.Picture, 0, 150, 500, 500, 0, 150, 500, 500, vbSrcCopy
End Sub

Private Sub Command2_Click()
ResultPic.Picture = Picture1.Image 'picture
End Sub

Or could somone possibly explain how i could target a icon with in the listview//image with in the imagelist  so that i could paint on it with the gdi32 api?
Title: Re: OpCode
Post by: UserLoser. on March 08, 2005, 07:47 AM
Quote from: Ringo on March 08, 2005, 01:39 AM
Or could somone possibly explain how i could target a icon with in the listview//image with in the imagelist  so that i could paint on it with the gdi32 api?
One way is to create an owner drawn list, subclass it, and capture/handle the WM_DRAWITEM message
Title: Re: OpCode
Post by: QwertyMonster on March 08, 2005, 10:03 AM
Edit


After talking with him on SC, found out im totally wrong.

Sorry  :P
Title: Re: OpCode
Post by: FrOzeN on March 11, 2005, 11:45 PM
After you draw/print the text onto the image add this line of code to make it stick.

picIcon.Image = picIcon.Picture