|
-
Apr 5th, 2000, 11:01 AM
#1
Thread Starter
New Member
i am wondering if there is a way to embed graphics or images of some sort into a rich text box. if not, is there a way to embed a graphic into an OLE object and place the OLE object into a rich text box. i am trying to create the happy faces like in America Online's Instant Messenger. ummm, maybe there is an API call besides bitblt to paint onto a window. if anyone can help, please email me at [email protected], or post a reply to this message. thank you very much.
-
Apr 5th, 2000, 03:35 PM
#2
Junior Member
Well seeing as a rich text box is not a container object (i.e. it can't contain other controls) you won't be able to place a ole object in it. Aol instant messanger most probably uses a custom control. As I haven't had much experience with the rich text object, there might be other methods that one could use to insert objects (Take word pad for instance, which is basically a .rtf editor where you can insert pictures.)
If you get the answer, let me know.
"He who laughs at a question is not worth being asked"
RavenCrow

-
Aug 13th, 2002, 01:14 PM
#3
Lively Member
I found a a$$-backwards way of doing it if you are interested.
basically i made a simple rtf -> text converter and c&p my graphics into the rtb... which generated the rtf code into my text box. I then took out the {\pic} header which is basically the image code itself. stored that into a library (.txt i made) with my own headers and call on that in the program.
you can use .selrtf to insert the code. it works
-
Oct 2nd, 2002, 05:22 AM
#4
New Member
please elaborate on the {\pic} header thing . i want to geta a image displayed in the rtf files
-
Oct 2nd, 2002, 06:38 AM
#5
Addicted Member
I know one way, but it uses the clipboard. This is it:
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_PASTE = &H302
Clipboard.Clear
Clipboard.SetData picture1.Picture
SendMessage RichTextBox1.hwnd, WM_PASTE, 0, 0
This pastes the picture from picture1 into the rich textbox.
-Shell-
-
Oct 2nd, 2002, 06:49 AM
#6
New Member
what will u do for inserting images in a rtf file using the file system object of asp and using the rtf script.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|