a couple of STATIC control questions

This is a discussion on a couple of STATIC control questions within the Windows Programming forums, part of the Platform Specific Boards category; Okay, I have a multi-line static control. But when I put in more text than viewable on screen, the scroll ...

  1. #1
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584

    a couple of STATIC control questions

    Okay, I have a multi-line static control. But when I put in more text than viewable on screen, the scroll bar is still ineffective. What do I have to do to get the scroll bar on the static working?

    And also, I want different colored text on the static control. Is there a way to do this? For instance, do a sentence in green, and then do another in yellow.

    Thanks!
    1978 Silver Anniversary Corvette

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Are you using the EDIT type with ES_READONLY or STATIC type? If using an edit, did you put in ES_AUTOVSCROLL? Not sure on the multicolor, hopefully someone else can answer that so I can learn how also

  3. #3
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    I'll change it to an EDIT with READONLY. Hopefully somebody can chime in on the color changing for this then...
    1978 Silver Anniversary Corvette

  4. #4

  5. #5
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    But this would only make the text ONE color. I want to be able to use different colors in the same static.

    And how come a text box doesn't handle the "\t" char?

    Also, my other text box (has focus on startup) is acting strange. When mouse is over it, there is no little "I" cursor. And if it looses focus to another control, I can't get focus back. Why is this?
    1978 Silver Anniversary Corvette

  6. #6
    jasondoucette.com JasonD's Avatar
    Join Date
    Mar 2003
    Posts
    278
    If you want more than one color, use multiple static controls. Otherwise, I think you'll have to look into RichEdit controls. Exactly why do you need multiple colors in a static text control, anyway? Also, are you subclassing your controls?

  7. #7
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    You can always design your own control if there's nothing prebuilt that does the job you want. I did this for a project of mine where I wanted more control over the editing and text output than the Richedit provided.

  8. #8
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Originally posted by JasonD
    If you want more than one color, use multiple static controls. Otherwise, I think you'll have to look into RichEdit controls. Exactly why do you need multiple colors in a static text control, anyway? Also, are you subclassing your controls?
    Yes, I am subclassing. Is this why my other edit is acting strangely?
    1978 Silver Anniversary Corvette

  9. #9
    jasondoucette.com JasonD's Avatar
    Join Date
    Mar 2003
    Posts
    278
    Possibly. Are you making sure that you process all messages that you do not handle yourself?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 05:42 PM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 06:49 PM
  3. Static Control Bitmap Style
    By Nurfina in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2007, 06:51 AM
  4. Couple of Questions
    By toonlover in forum Windows Programming
    Replies: 10
    Last Post: 07-14-2006, 02:04 AM
  5. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21