Owner-draw edit controls

This is a discussion on Owner-draw edit controls within the Windows Programming forums, part of the Platform Specific Boards category; Can "owner-draw" edit controls be made without making my own custom edit class? I thought of returning a brush created ...

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    Owner-draw edit controls

    Can "owner-draw" edit controls be made without making my own custom edit class?

    I thought of returning a brush created with CreatePatternBrush() in WM_CTLCOLOREDIT, but I haven't tried it yet.
    Last edited by maxorator; 01-02-2007 at 01:59 PM.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  2. #2
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Basically it worked but I don't know how to create a padding between my own border (which is in that bitmap) and the text that I can write into it...
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Try setting the formatting rectangle with EM_SETRECT.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  4. #4
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    It only works with multiline edit controls...
    Last edited by maxorator; 01-03-2007 at 04:09 AM.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. line number on a rich edit control
    By rakan in forum Windows Programming
    Replies: 1
    Last Post: 02-18-2008, 06:58 AM
  2. Problems defining classes
    By esmeco in forum C++ Programming
    Replies: 47
    Last Post: 10-24-2007, 01:13 PM
  3. owner draw...
    By Devil Panther in forum Windows Programming
    Replies: 6
    Last Post: 03-12-2004, 12:19 PM
  4. I need help disabling Keyboard and Mouse input on Edit controls
    By Templario in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2003, 11:59 PM
  5. setting default font to draw all further controls with
    By alandrums in forum Windows Programming
    Replies: 0
    Last Post: 12-03-2001, 09:31 PM

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