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. Is it possible to stretch a bitmap to the size of a CStatic?

Is it possible to stretch a bitmap to the size of a CStatic?

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsquestionlearning
2 Posts 2 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.
  • M Offline
    M Offline
    Marcelo Guerra
    wrote on last edited by
    #1

    Is it possible to stretch a bitmap to the size of a CStatic? I´m currently using a CStatic control with the SS_BITMAP style to display a bitmap but with this style the control automatically sizes itself to accommodate it. The bitmap I want to stretch was included in the project as a resource file. ------------------------------------------- Marcelo Guerra

    J 1 Reply Last reply
    0
    • M Marcelo Guerra

      Is it possible to stretch a bitmap to the size of a CStatic? I´m currently using a CStatic control with the SS_BITMAP style to display a bitmap but with this style the control automatically sizes itself to accommodate it. The bitmap I want to stretch was included in the project as a resource file. ------------------------------------------- Marcelo Guerra

      J Offline
      J Offline
      Jeremy Davis
      wrote on last edited by
      #2

      (1) Create a CStatic frame NOT bitmap, but invisible. (2) Get Chris Maunder's CDIBSectionLite class to draw the bitmap. (3) Find the size of your CStatic, and using CDIBSectionLite::Stretch draw the stretched bitmap. HTH Jerry

      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