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. OnDrawItem question

OnDrawItem question

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.
  • R Offline
    R Offline
    RuiSantiago
    wrote on last edited by
    #1

    Hello everyone!! I'm using OnDrawItem in a Form to draw some objects. I would like to know how can i recall that function after pressing a button (since the button is owner draw, i would like the user to notice when he is pressing a button). What i really want is to get the LPDRAWITEMSTRUCT struct. How can i do this? Thank you for your time

    R A 2 Replies Last reply
    0
    • R RuiSantiago

      Hello everyone!! I'm using OnDrawItem in a Form to draw some objects. I would like to know how can i recall that function after pressing a button (since the button is owner draw, i would like the user to notice when he is pressing a button). What i really want is to get the LPDRAWITEMSTRUCT struct. How can i do this? Thank you for your time

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      OnDrawItem() is passed a pointer to a DRAWITEMSTRUCT. Check the itemAction and itemState members to see if the button is currently pressed. Here's[^] the MSDN link. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

      1 Reply Last reply
      0
      • R RuiSantiago

        Hello everyone!! I'm using OnDrawItem in a Form to draw some objects. I would like to know how can i recall that function after pressing a button (since the button is owner draw, i would like the user to notice when he is pressing a button). What i really want is to get the LPDRAWITEMSTRUCT struct. How can i do this? Thank you for your time

        A Offline
        A Offline
        alex barylski
        wrote on last edited by
        #3

        I've never done ownerdrawn buttons, but isn't that what ODS_SELECTED or ODA_SELECT is for...? If not...I guess you could just check the state of the left mouse button inside DrawItem(), assuming when you press down on a button OnDrawItem() is fired off Cheers! :) "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr

        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