Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: guest on March 15, 2003, 08:06 PM

Title: picture in rtb
Post by: guest on March 15, 2003, 08:06 PM
Is there any posible way to put a bitmap in a rich text box?
Title: Re: picture in rtb
Post by: Zakath on March 15, 2003, 09:35 PM
Of course! I'm not sure why'd you want to, though...It'd be much easier to create the APPEARANCE of a bitmap in a RTB than to actually put one in it.

If you insist, though...look into owner-drawn controls.
Title: Re: picture in rtb
Post by: Grok on March 16, 2003, 07:12 AM
Zakath is correct.  Creating the appearance of a picture background on a RichTextBox could be done by making the window transparent.  Draw a real picture box behind the RichText, and make it host your image.  The image will show through to some degree depending on your mask values.

Drawing the background yourself is easier in this context, and produces a better looking output, plus is supported on more platforms.  Transparent windows are Windows 2000 and later.  Win95/98 will not do them.
Title: Re: picture in rtb
Post by: l)ragon on March 16, 2003, 03:44 PM
QuoteZakath is correct.  Creating the appearance of a picture background on a RichTextBox could be done by making the window transparent.  Draw a real picture box behind the RichText, and make it host your image.  The image will show through to some degree depending on your mask values.

Drawing the background yourself is easier in this context, and produces a better looking output, plus is supported on more platforms.  Transparent windows are Windows 2000 and later.  Win95/98 will not do them.

Nor will WinMe asfar as i have seen.
Title: Re: picture in rtb
Post by: Atom on March 16, 2003, 04:35 PM
I think he meant putting pictures IN the rtb like smilies. You can force this on the rtb control by pasting the image in with code. You could also try BitBlt api.
Title: Re: picture in rtb
Post by: Camel on March 16, 2003, 05:28 PM
QuoteNor will WinMe asfar as i have seen.

transparent windows are a feature of NT5+
ME is built off of 98, not NT

by the way, Win2000=NT5 and WinXP=NT5.1
Title: Re: picture in rtb
Post by: Banana fanna fo fanna on March 16, 2003, 05:47 PM
It's on pscode, basically you copy the image to the clipboard and send a WM_PASTE message to the rtb.
Title: Re: picture in rtb
Post by: Mesiah / haiseM on March 16, 2003, 06:22 PM
Yes storm, but if he is trying to paste images into an rtb, which is already a rather large object alone, if you combine images, which colors, and tons of text, you get lag++. Buddha Bot uses WM_PASTE for it smileys, but untill i find a more memory effecient method, im making it an option the user can enable/disable, because of the lag it brings after so long...
Title: Re: picture in rtb
Post by: Camel on March 17, 2003, 05:33 PM
QuoteYes storm, but if he is trying to paste images into an rtb, which is already a rather large object alone, if you combine images, which colors, and tons of text, you get lag++. Buddha Bot uses WM_PASTE for it smileys, but untill i find a more memory effecient method, im making it an option the user can enable/disable, because of the lag it brings after so long...
just clear the box after x lines
Title: Re: picture in rtb
Post by: Skywing on March 18, 2003, 08:01 AM
Quotejust clear the box after x lines
That's kind of not very user friendly.  I don't know about you, but I don't like text I'm trying to read suddenly disappearing because a certain limit was reached.  A better solution might be to remove lines from the top of the richedit after a certain number of lines are present.
Title: Re: picture in rtb
Post by: Camel on March 18, 2003, 01:17 PM
QuoteThat's kind of not very user friendly.  I don't know about you, but I don't like text I'm trying to read suddenly disappearing because a certain limit was reached.  A better solution might be to remove lines from the top of the richedit after a certain number of lines are present.
*cough* quazi-flame

and yeah, that's what i do, but i assure you there was a large time gap between when i first made it clear chat and when it was able to do that :-X
Title: Re: picture in rtb
Post by: Skywing on March 19, 2003, 08:05 AM
Quote*cough* quazi-flame

and yeah, that's what i do, but i assure you there was a large time gap between when i first made it clear chat and when it was able to do that :-X
Not a flame at all.  You'll notice there were no personal attacks or any such things; my post was merely stating my opinions towards a subject as well as observations I've made regarding other user's opinions on the same subject.

Discussion of ideas is how progress is made; forums are a great place to publicly debate ideas, and I'll hope you'll agree that suppressing such debates, so long as they're not degraded to personal attacks, is counter-productive.
Title: Re: picture in rtb
Post by: Camel on March 21, 2003, 08:20 AM
QuoteNot a flame at all.  You'll notice there were no personal attacks or any such things; my post was merely stating my opinions towards a subject as well as observations I've made regarding other user's opinions on the same subject.

Discussion of ideas is how progress is made; forums are a great place to publicly debate ideas, and I'll hope you'll agree that suppressing such debates, so long as they're not degraded to personal attacks, is counter-productive.

the reason i said quazi-flame and not flame is because you were just verging on being pretentious

QuoteI don't know about you, but I don't like text I'm trying to read suddenly disappearing because a certain limit was reached.