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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to put background image into CListCtrl.

How to put background image into CListCtrl.

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorialquestion
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.
  • A Offline
    A Offline
    Artem Moroz
    wrote on last edited by
    #1

    I've tried to put background image into CListCtrl, but i completely ran out of ideas how to do this!!! I cannot use owner drawn control because I need big icons. I cannot use CListCtrl::SetBkImage() because it cannot stretch bitmap; Maybe this is done somehow by using custom draw, but I failed. Can somebody give me link to working sample with background image? Give me any suggestions!

    B M 2 Replies Last reply
    0
    • A Artem Moroz

      I've tried to put background image into CListCtrl, but i completely ran out of ideas how to do this!!! I cannot use owner drawn control because I need big icons. I cannot use CListCtrl::SetBkImage() because it cannot stretch bitmap; Maybe this is done somehow by using custom draw, but I failed. Can somebody give me link to working sample with background image? Give me any suggestions!

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

      when you OnSize, dynamically resize the bitmap to the client area rect, then CListCtrl::SetBkImage(), there are good chapters on bitmap manipulation in Charles Petzold's programming windows 95 and Programming windows with MFC by j. procise

      1 Reply Last reply
      0
      • A Artem Moroz

        I've tried to put background image into CListCtrl, but i completely ran out of ideas how to do this!!! I cannot use owner drawn control because I need big icons. I cannot use CListCtrl::SetBkImage() because it cannot stretch bitmap; Maybe this is done somehow by using custom draw, but I failed. Can somebody give me link to working sample with background image? Give me any suggestions!

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        Handle WM_ERASEBKGND, which is the message designed for just this purpose. --Mike-- "Big handwavy generalizations made from a position of deep ignorance is one of the biggest wastes of time on the net today. -- Joel Spolsky Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber

        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