News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Question: Changing Text Attributes in an edit box

Started by dicky96, January 24, 2006, 06:15:58 PM

Previous topic - Next topic

dicky96

Hi guys
I've got my first real win32 application pretty much up and running now, with much thanks to those who have helped me on this board. Now what I would like to do is make it look NICE  :green

I'd like some advice on how to change the attributes of an edit box (within a dialog) that I use to display test data to my users.  For instance I would like to change the background colour and also do things like

Now Testing....
Server Response GOOD

Now Testing....[/color]
Server Response BAD

I'm sure you get the idea.  How do I go about doing that sort of thing in an edit box.  I'm sure there is some handy Window Messages or something, or maybe special html type control characters, that do this.... but when you don't know what you are looking for they seem a little hard to find.

Thanks again
dicky

Tedd

There's bad new and good news :P

The bad news is that you can't do that with a simple little EDIT box :'(

The good news is that you 'can' do it with a smiliar control - "RichEdit" but setup and use is a little more work.
However, for many things it will still work in pretty much the same way as a standerd edit control - it responds to most of the messages in the same way.
So get ready for a bit of searching and plenty of tearing your hair out :wink Iczelion did a few tutorials on using it, so you could start there.

(I may post an example if I get around to it :8))
No snowflake in an avalanche feels responsible.

dicky96

Bahh trust microsoft from not making edit boxes properly  :eek

I did of course start with Iczelions tutorials - after reading most of AoA vol 1 first to brush up on 80x86.... but I only got to Tut 14 before getting stuck in on my own project.....

Guess it's time to go back and study the rest of them now.  Especially since I think some multithreading is gonna be needed in my next project, and I know sod all about that too.

Thanks Tedd

Don't worry you'll all most likely know about it if I get stuck.  Oh did I say "if" - make that WHEN  :lol

P1

*If* your going to mixed font colors amoung other things, you need to go with the RichEdit control.

Regards,  P1  :8)

zooba

Quote from: dicky96 on January 24, 2006, 06:32:59 PM
Bahh trust microsoft from not making edit boxes properly  :eek

They get that a lot. Realistically, there's no point making an edit box do everything. 'Use the right tool for the right job'

Simple, lightweight text entry --> edit box
Colourful, heavyweight text    --> rich edit box
Bloat --------------------------> Microsoft Office text control :wink

Tedd

Hot from the oven...

[attachment deleted by admin]
No snowflake in an avalanche feels responsible.