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. Subclassing a picture control

Subclassing a picture control

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

    Dear all; I am trying to make some drawings on a dialog based application. As far as i have understood, its better to place a Static control and draw on it instead of directly drawing on top of the dialog. As i am trying to achieve this, i am a little bit confused and gona be needing some of your help. I have added a picture control to my dialog and created a member variable for it of type CStatic. Now I need to subclass the picture control in which i will be overriding the OnPaint() function. I do not know how to perform this subclassing :doh:? Thanx llp00na

    B 1 Reply Last reply
    0
    • L llp00na

      Dear all; I am trying to make some drawings on a dialog based application. As far as i have understood, its better to place a Static control and draw on it instead of directly drawing on top of the dialog. As i am trying to achieve this, i am a little bit confused and gona be needing some of your help. I have added a picture control to my dialog and created a member variable for it of type CStatic. Now I need to subclass the picture control in which i will be overriding the OnPaint() function. I do not know how to perform this subclassing :doh:? Thanx llp00na

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

      I wouldn't add a picture control, I'd add a static control and subclass that. But you have to specify that you want to receive messages by adding 'SS_NOTIFY' (or something like that) to the window's style. have a look here at my Modeler[^] My Music | My Pics | My Articles BlackDice

      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