Re: Free Beer!!

From: Jim Carlock (anonymous_at_10.10.com)
Date: 02/28/04


Date: Sat, 28 Feb 2004 01:09:14 -0500

The richtx32.ocx has 5 classes built into it:

DataObject
DataObjectFiles
OLEObject
OLEObjects
RichTextBox

8 Interfaces:

DRichTextEvents
IOLEObject
IOLEObjects
IRichText
IRichText10 <-- based on rich text control 1.0
IRichText11 <-- based on rich text control 1.1
IVBDataObject
IVBDataObjectFiles

and 14 Enums.

It's backwards compatible all the way back to Win95. Maybe earlier.

If you need any help configuring or using it let me know by replying
to the newsgroup here. Basically through BASIC, you'd mark it as
being referenced, VB puts a little tool icon in the Toolbox to draw
the object on forms. It has all the standard stuff... Left, Top, Height,
Width. There's a RightMargin that is used to set the wrapping if you
are going to use it to print. The files it creates are 100% readable
through Word, and it can create and read regular text as well rtf.

-- 
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
"Jim Carlock" <anonymous@10.10.com> wrote in message
news:O4UWYRX$DHA.3536@tk2msftngp13.phx.gbl...
richtx32.ocx it the control.
-- 
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
"John" <John@john.net> wrote in message
news:kyK%b.417207$xy6.2355026@attbi_s02...
I got this to work
Set Obj = CreateObject("Word.basic")
Obj.FileOpen "c:\leasedatabase\lease.rtf"
'Obj.EditSelectAll
 Obj.SetSelection "(2)Landlord first name"  <--doesn't work
Where can  I get a list of commands I can use, I'd like to replace with
'(2)Landlord first name' with a text value I'll obtain later.
Thanks
"John" <John@john.net> wrote in message
news:V8K%b.407505$I06.4419065@attbi_s01...
> Hey Thanks.
> I was thinking vb may be the way to go simply because the rich edit
control
> I loaded in my c++ project seemed to be geared toward it.
>
> Vb isn't my forte but I'll give it a try.
>
> Where can I get rtb??
>
> None of my guesses for what rtb is have the loadfile function
>
> Private Sub Command1_Click()
> OLE1.LoadFile "c:\leasedatabase\lease.rtf", rtfRTF
> Text1.LoadFile "c:\leasedatabase\lease.rtf", rtfRTF
> End Sub
>
> I tried to create an object on the form using the rtf file and it appeared
> to work however I don't see any selection based functions nor replace text
> functions. The object showed up on the form as OLE2
>
> Thanks
>
>
> "Jim Carlock" <anonymous@10.10.com> wrote in message
> news:OCjezeS$DHA.2308@tk2msftngp13.phx.gbl...
> > rtb.LoadFile "filename.rtf", rtfRTF
> > rtb.SelStart = iPosStart
> > rtb.SelLength = iLengthSelected
> > rtb.SelText = strNewText
> >
> > If the file to be loaded is a RichText File, set rtfRTF to rtfRTF,
> > otherwise set it to rtfText for text files.
> >
> > Where iPosStart is the starting position in characters.
> >
> > iLengthSelected is the number of characters to select starting from
> > iPosStart.
> >
> > Setting .SelText is the way to set the property that replaces the
existing
> > text.
> >
> > Done. HTH
> >
> > -- 
> > Jim Carlock
> > http://www.microcosmotalk.com/
> > Post replies to the newsgroup.
> >
> >
> > "Jim Carlock" <anonymous@10.10.com> wrote in message
> > news:uuTyVRS$DHA.2800@tk2msftngp13.phx.gbl...
> > It is very easily accomplished in VB6.
> >
> > -- 
> > Jim Carlock
> > http://www.microcosmotalk.com/
> > Post replies to the newsgroup.
> >
> >
> > "John" <John@john.net> wrote in message
> > news:1Nr%b.402652$I06.4379868@attbi_s01...
> > Now that I've got your attention... (well it was funny on the simpsons)
> >
> > I'm looking to open a text file and replace parts of it with my text. I
> have
> > looked at the find and replace methods but they all seem to be tied to
> > dialogs which I don't need nor want to code the back end functions.
> >
> > If anyone could provide me with some working code that'll do a non
dialog
> > based (or at least don't show the dialog) search and replace based on
> > parameters I pass on a rich text file I would definately buy them some
> beer
> > or soda if they're under 21.
> >
> > Btw this is not a student project but a project I'm doing for friend.
> > A project I figured would be easy but has turned out more challenging
than
> I
> > thought.
> >
> > Thanks alot
> >
> >
> >
> >
> >
>
>


Relevant Pages

  • Re: Free Beer!!
    ... > Text1.LoadFile "c:\leasedatabase\lease.rtf", rtfRTF ... > "Jim Carlock" wrote in message ... >> Post replies to the newsgroup. ...
    (microsoft.public.vc.mfc)
  • Re: Free Beer!!
    ... I don't have a clue on how to connect to an .ocx through C++. ... Post replies to the newsgroup. ... "Jim Carlock" wrote in message ... > Post replies to the newsgroup. ...
    (microsoft.public.vc.mfc)
  • Re: Free Beer!!
    ... >> Jim Carlock ... >> Post replies to the newsgroup. ... >> If anyone could provide me with some working code that'll do a non ...
    (microsoft.public.vc.mfc)
  • Re: Visual Studio SP6 BUG with MSCOMCTL.OCX
    ... title "Visual Studio SP6" by Jim Carlock, ... SP6 is installed on the XP system. ... > Post replies to the newsgroup. ...
    (microsoft.public.vb.general.discussion)
  • Re: Visual Studio SP6 BUG with MSCOMCTL.OCX
    ... title "Visual Studio SP6" by Jim Carlock, ... SP6 is installed on the XP system. ... > Post replies to the newsgroup. ...
    (microsoft.public.vb.controls)