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. How can I associate the editbox with the ratio button? (dynamically update editbox ratio button)

How can I associate the editbox with the ratio button? (dynamically update editbox ratio button)

Scheduled Pinned Locked Moved C / C++ / MFC
questionannouncement
3 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.
  • D Offline
    D Offline
    danginkgo
    wrote on last edited by
    #1

    I have this dialog: MYAPP DIALOG 10, 19, 158, 104 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ... BEGIN ... RADIOBUTTON "1&50%", IDD_Zoom150RB, 16, 10, 32, 10, WS_GROUP | WS_TABSTOP ... RADIOBUTTON " ", IDD_ZoomSpinRB, 62, 38, 12, 10, WS_TABSTOP EDITTEXT IDD_ZoomSpinEF, 76, 36, 36, 14, WS_GROUP ... END The contents within IDD_ZoomSpinEF editbox, needs to update the IDD_ZoomSpinRB label. The editbox isn’t associated with the ratio button, thus when the ratio button is selected nothing is read. How can I associate the editbox with the ratio button?

    danginkgo

    I 1 Reply Last reply
    0
    • D danginkgo

      I have this dialog: MYAPP DIALOG 10, 19, 158, 104 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ... BEGIN ... RADIOBUTTON "1&50%", IDD_Zoom150RB, 16, 10, 32, 10, WS_GROUP | WS_TABSTOP ... RADIOBUTTON " ", IDD_ZoomSpinRB, 62, 38, 12, 10, WS_TABSTOP EDITTEXT IDD_ZoomSpinEF, 76, 36, 36, 14, WS_GROUP ... END The contents within IDD_ZoomSpinEF editbox, needs to update the IDD_ZoomSpinRB label. The editbox isn’t associated with the ratio button, thus when the ratio button is selected nothing is read. How can I associate the editbox with the ratio button?

      danginkgo

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      danginkgo wrote:

      How can I associate the editbox with the ratio button?

      You can't "associate" them, and have it automatically work. What you can do is write a EN_CHANGE handler for the edit box, then use SetDlgItemText (ZoomSpinRB, ...) to set the text for the radio button. I'd be tempted to skip this step though - make the radio button text be blank, and just put the edit box where the radio text would have been. Then when they click on the custom option radio button, read the edit box and use that percentage for whatever you want it for. Iain.

      Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

      D 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        danginkgo wrote:

        How can I associate the editbox with the ratio button?

        You can't "associate" them, and have it automatically work. What you can do is write a EN_CHANGE handler for the edit box, then use SetDlgItemText (ZoomSpinRB, ...) to set the text for the radio button. I'd be tempted to skip this step though - make the radio button text be blank, and just put the edit box where the radio text would have been. Then when they click on the custom option radio button, read the edit box and use that percentage for whatever you want it for. Iain.

        Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

        D Offline
        D Offline
        danginkgo
        wrote on last edited by
        #3

        Thank you! Your answer helped me much. I used EN_CHANGE notify and SetDlgItemText().

        danginkgo

        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