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. Bitmap associated with a static control

Bitmap associated with a static control

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsquestion
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.
  • C Offline
    C Offline
    cphawk
    wrote on last edited by
    #1

    Hello, I have developed an application that uses a bitmap associated with a static control using CStatic::SetBitmap. When displaying the image in the client area: 1. I would like the ability for the user to select an area of interest (via a transparent rectangle). 2. Be able to move and rubber band the rectangle similar to CRectTracker. The rectangle should not be able to be moved or resized out of the CStatic client window. 3. Report the coordinates of the rectangle with respect to the client area coordinates (i.e. top left, bottom right). Does anybody have Visual C++/Studio sample code that would do this? Thanks in advance, PJP

    S 1 Reply Last reply
    0
    • C cphawk

      Hello, I have developed an application that uses a bitmap associated with a static control using CStatic::SetBitmap. When displaying the image in the client area: 1. I would like the ability for the user to select an area of interest (via a transparent rectangle). 2. Be able to move and rubber band the rectangle similar to CRectTracker. The rectangle should not be able to be moved or resized out of the CStatic client window. 3. Report the coordinates of the rectangle with respect to the client area coordinates (i.e. top left, bottom right). Does anybody have Visual C++/Studio sample code that would do this? Thanks in advance, PJP

      S Offline
      S Offline
      sudeesh
      wrote on last edited by
      #2

      sub class CStatic class and then on mouse events u update the window in Onpaint handler.

      Sudeesh

      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