Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. "Ownerdraw" in an editbox

"Ownerdraw" in an editbox

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pie
    wrote on last edited by
    #1

    Hello. Does anyone have experience in inserting an image as background in an editbox? I've tried, but the final solution took up a lot of cpu. I just want the editbox to look like those in Msn messenger. If it isn't possible to do ownerdraw with an editcontrol, which control must I then use? -Anders.

    B 1 Reply Last reply
    0
    • P pie

      Hello. Does anyone have experience in inserting an image as background in an editbox? I've tried, but the final solution took up a lot of cpu. I just want the editbox to look like those in Msn messenger. If it isn't possible to do ownerdraw with an editcontrol, which control must I then use? -Anders.

      B Offline
      B Offline
      bryce
      wrote on last edited by
      #2

      One method would be to owner draw the editbox and handle WM_ERASEBKGND by painting the image. Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
      Publitor, making Pubmed easy. http://www.sohocode.com/publitor

      Our kids book :The Snot Goblin

      A 1 Reply Last reply
      0
      • B bryce

        One method would be to owner draw the editbox and handle WM_ERASEBKGND by painting the image. Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
        Publitor, making Pubmed easy. http://www.sohocode.com/publitor

        Our kids book :The Snot Goblin

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks for the reply! I've tried handling WM_ERASEBKGND, but when WM_VSCROLL is called, the background image moves down like 10 pixels and then jumps right back up. I don't want it to scroll down, so this is fine(that it jumps up), i just wonder how I can stop the scrolling from pulling it the first 10 pixels. To do this I used LockWindowUpdate(), but this took up an awfull lot of cpu :( Any suggestions as to how I can stop the scroll-messages from scrolling my background? Or am I using the wrong approach? -Anders.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups