No, very easy to do this. See the source code for my Text Editor on my web
page: http://members.aol.com/nfiedler/software.html.
> 2. At the bottom of my window, I have a grouping (for geometry reasons) of
> a GenGlyphClass object and a GenTextClass object (used as status
> indicators). I've written a simple function to update the monikers and
text
> of these objects, along the lines of
>
> @send MyObj::MSG_GEN_REPLACE_VIS_MONIKER_TEXT(szText, VUM_NOW);
> @send MyObj::MSG_VIS_TEXT_REPLACE_ALL_PTR(szContent, 0);
> @send BothObjs::MSG_VIS_REDRAW_ENTIRE_OBJECT();
>
> The function does work, but quite often, the objects will be drawn, and
> then disappear in a flash. Then when I do something like adjust the size
of
> the window frame, they will be redrawn again. When I hit the maximize
> button, the GenTextClass object disappears again. I think this is probably
> a matter of sending the right messages out at the right time, but I'm
> surprised that these stock objects don't sort themselves out - especially
> as they are being told to update VUM_NOW.
I'd skip doing the MSG_VIS_REDRAW_ENTIRE_OBJECT, it's not necessary. Also,
change the VUM_NOW to VUM_DELAYED_VIA_APP_QUEUE. It helps optimize the
graphics updates.
> 3. It's very easy to incorporate, for example, a point size controller,
and
> associate it with a text window. But what about the situation where you
> don't have a targetable text window in the app? Say you want a dialog box
> that will allow you to select a font that will be used in situations A, B
> and C (radio buttons), e.g. I want bank credits to printed in a choice of
> my color and overdrafts printed in another color (just an example!).
What's
> the best way of using the existing controllers in such a dialog box?
You could have the program perform the color change manually, without user
intervention. Simply change the color of the text using
VisTextDefaultCharAttr. See Code Display 10-3 in the Objects book for more
info.
Nathan