Thread: Owner-draw edit controls

  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 02: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 05: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, 07: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, 01: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-07-2003, 12:59 AM
  5. setting default font to draw all further controls with
    By alandrums in forum Windows Programming
    Replies: 0
    Last Post: 12-03-2001, 10:31 PM