Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-23-2004, 02:32 AM   #1 (permalink)
Amaranthine
Registered User
 
Amaranthine's Avatar
 
Join Date: May 2004
Posts: 47
Amaranthine is on a distinguished road
Richedit

I've recently been playing around with richedit controls and I was wondering how you change the color of individual chunks of text, rather than the text as a whole.
Amaranthine is offline   Reply With Quote
Old 07-29-2004, 06:59 AM   #2 (permalink)
bdiamond
Registered User
 
Join Date: Jul 2004
Posts: 5
bdiamond is on a distinguished road
You have to make a variable of type CHARFORMAT. Then you set the dwFlags with CFE_COLOR, then set the color member to the RGB() value you want. Then call SelectionCharFormat, passing the address of the CHARFORMAT structure you set up. Some of what I put down may be off a little bit, but look up CHARFORMAT in the MSDN to get a more exact explanation. Hope this helps
bdiamond is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 07:05 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting