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. Controls redrawn in odd places??

Controls redrawn in odd places??

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

    Hello, I have a dialog bar that contains the following SliderCtrl message handler: OnCustomdrawSliderProg(NMHDR* pNMHDR, LRESULT* pResult) Inside this handler, I call another function to update a 2nd dialog bar's windows. However, when this occurs, the slider control is randomly (time) redrawn on the 2nd dialogbar's client area at random places. I assume I'm mixing device contexts somehow. Functionally I want my 2nd dialog bar to have a 'live' response to a user adjusting the CSliderCtrl on the 1st dialog bar. Has anyone a solution for a clean way to do this? I've tried to handle the lose-focus SliderCtrl message (works without odd slider drawing), but then if the user uses the arrow keys, the 2nd dialog bar is not updated. Thanks! JennyP

    T 1 Reply Last reply
    0
    • J JennyP

      Hello, I have a dialog bar that contains the following SliderCtrl message handler: OnCustomdrawSliderProg(NMHDR* pNMHDR, LRESULT* pResult) Inside this handler, I call another function to update a 2nd dialog bar's windows. However, when this occurs, the slider control is randomly (time) redrawn on the 2nd dialogbar's client area at random places. I assume I'm mixing device contexts somehow. Functionally I want my 2nd dialog bar to have a 'live' response to a user adjusting the CSliderCtrl on the 1st dialog bar. Has anyone a solution for a clean way to do this? I've tried to handle the lose-focus SliderCtrl message (works without odd slider drawing), but then if the user uses the arrow keys, the 2nd dialog bar is not updated. Thanks! JennyP

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      JennyP wrote: Functionally I want my 2nd dialog bar to have a 'live' response to a user adjusting the CSliderCtrl on the 1st dialog bar Handle WM_HSCROLL - this message is sent whenever thumb is moved using mouse/keyboard. When user releases the mouse, you'll get WM_HSCROLL with TB_ENDTRACK code. You'll also get TB_ENDTRACK after each keypress changing thumb position. Tomasz Sowinski -- http://www.shooltz.com

      What is "scratch" and why can everything be made from it?

      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