Thread

tabs (Sdk)

tabs // Sdk

1  |  

hal9000

Apr 25, 2000, 11:46pm
hey, I'm working on a new bot and wanted some help with some things... I'm
using Microsoft VC++5, and am making a GUI bot... my questions don't really
apply to the AW SDK though.. but thought this was a good place to start
asking questions :-)

1) How do I USE a RichEdit control? I don't see any way to add a member
variable... I have already initialized the rich edit stuff, I just need to
find out how to write to it... I want to have everything in black but like
the world greeting in like green or something... maybe a couple other things
like bold, and other colors like red for some stuff...

2) how do I use tabs? how do I set the number of tabs and name them, and how
do I get the data for them in there?

Thanks for the help

--
-=Hal9000=- world:Discover
--==~~out~~==--

hal9000

Apr 25, 2000, 11:48pm
oops guess I should have named that something a little better... lol

"Re: Help with Tabs and RichEdit"


[View Quote]

faber

Apr 26, 2000, 5:34pm
A richeditcontrol can basically be used like an edit control. Send text to its current
cursorposition using

myrichtctrl.ReplaceSel(....);

or

SendMessage(myrichtctrlhwnd, WM_REPLACESEL,....);

use SetSel() etc.. for cursor placement.

A typical tab control does not offer support for its content.. look at it like a fancy border and
buttons.

You can use a CPropertySheet (derived) class to open a properties like dialog, use CPropertyPage
derived classes
(generated from dialog resources using classwizard) for the pages... however that limits your
freedom a little (no extra stuff on your
"main" area (outside the tab control)

Try to look all the aforementioned keywords up in the MSDN to find details about their usage :)

Faber

[View Quote]

hal9000

Apr 26, 2000, 8:46pm
ok but how about how to format the text? like make it green or red or black?
etc...


--
-=Hal9000=- world:Discover
--==~~out~~==--
[View Quote]

hal9000

Apr 26, 2000, 9:02pm
also what about a member variable? how do I set one for it? or do I? do I
just call it what its called in the window? IDC_CHATWINDOW ?

--
-=Hal9000=- world:Discover
--==~~out~~==--
[View Quote]

faber

Apr 27, 2000, 4:40pm
Look up all the member function of CRichEditCtrl.. you will find SetParaFormat() and similar
functions for text styling :)

Faber
[View Quote]

faber

Apr 27, 2000, 4:43pm
use the classwizard to add a member variable for it. its the same way for richedit controls as with
any other type of control.

using the Control -ID (IDC_CHATWINDOW) is possible to, however, its a little more difficult to use
SendMessage() on it yourself.

The CRichEditCtrl class is a wrapper which does provide some help in translating/reading/generating
all those structs you need to use for Rich Edit Controls. (such as PARAFORMAT etc..)

Faber

ps: The F1 key is your friend. Type "CRichEditCtrl" in any source window, place your caret (text
cursor) on it and hit F1. Read on on "CRichEditCtrl" and "CRichEditCtrl class members" Feel free to
browse more :)






[View Quote]

hal9000

Apr 27, 2000, 10:49pm
must not be the same with VC++5... there is no entry for a member variable
for it in the classwizard....

--
-=Hal9000=- world:Discover
--==~~out~~==--
[View Quote]

hal9000

Apr 28, 2000, 1:07am
is there a way to set the color before you send it to the window?

--
-=Hal9000=- world:Discover
--==~~out~~==--
[View Quote]

faber

Apr 28, 2000, 12:43pm
You might be right here.. VC5 Classwizard supports CRichEditCtrl member classes but is not able to
insert them itself . it does not offer that choice (a bug, it was planned to do that), if I remember
correctly :)

Faber


[View Quote]

faber

Apr 28, 2000, 12:45pm
You can set the "current para format" or better the "current char format" before using ReplaceSel..
look for
SetSelectionParaFormat() of the CRichEditCtrl.

btw. for CRichedit Examples try www.codeguru.com :)

Faber

[View Quote]

hal9000

Apr 28, 2000, 10:54pm
hmm... don't know how to add them... can ya help me out?
and if you find any way to make a VC++5 AW.lib let me know

--
-=Hal9000=- world:Discover
--==~~out~~==--
[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn