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. need help MFC

need help MFC

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

    I am doing something like this... void View::OnView() { Dialog dlg(); if(dlg.DoModal() == IDCANCEL) return; COIN Coin; if (dlg.m_ValCoinSwitch == " some text") Coin.lights[WFS_SIU_COINSWITCH] = ENABLE; else (dlg.m_ValCoin2Switch == "some text") Coin.lights[WFS_SIU_COINSWITCH] = DISABLE; } `Now, what I am doing in here is "bringing the dialog with DoModal and coded like if Cancel is pressed, then it should return otherwise should run the OK". Now, I wonder what should be added before "COIN coin" so that when okay is pressed it should perform ENABLE or DISABLE whatever I chose from ComboBox. Will really appreciate help. Thanbs C++Prog `

    D P 2 Replies Last reply
    0
    • C celllllllll

      I am doing something like this... void View::OnView() { Dialog dlg(); if(dlg.DoModal() == IDCANCEL) return; COIN Coin; if (dlg.m_ValCoinSwitch == " some text") Coin.lights[WFS_SIU_COINSWITCH] = ENABLE; else (dlg.m_ValCoin2Switch == "some text") Coin.lights[WFS_SIU_COINSWITCH] = DISABLE; } `Now, what I am doing in here is "bringing the dialog with DoModal and coded like if Cancel is pressed, then it should return otherwise should run the OK". Now, I wonder what should be added before "COIN coin" so that when okay is pressed it should perform ENABLE or DISABLE whatever I chose from ComboBox. Will really appreciate help. Thanbs C++Prog `

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      celllllllll wrote:

      Now, I wonder what should be added before "COIN coin" so that when okay is pressed it should perform ENABLE or DISABLE...

      If the if(...) condition evaluates to false, it is already doing that.


      "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

      "Judge not by the eye but by the heart." - Native American Proverb

      C 1 Reply Last reply
      0
      • C celllllllll

        I am doing something like this... void View::OnView() { Dialog dlg(); if(dlg.DoModal() == IDCANCEL) return; COIN Coin; if (dlg.m_ValCoinSwitch == " some text") Coin.lights[WFS_SIU_COINSWITCH] = ENABLE; else (dlg.m_ValCoin2Switch == "some text") Coin.lights[WFS_SIU_COINSWITCH] = DISABLE; } `Now, what I am doing in here is "bringing the dialog with DoModal and coded like if Cancel is pressed, then it should return otherwise should run the OK". Now, I wonder what should be added before "COIN coin" so that when okay is pressed it should perform ENABLE or DISABLE whatever I chose from ComboBox. Will really appreciate help. Thanbs C++Prog `

        P Offline
        P Offline
        prasad_som
        wrote on last edited by
        #3

        As said by David, its done already, Is something other you want ?

        Prasad Notifier using ATL | Operator new[],delete[][^]

        1 Reply Last reply
        0
        • D David Crow

          celllllllll wrote:

          Now, I wonder what should be added before "COIN coin" so that when okay is pressed it should perform ENABLE or DISABLE...

          If the if(...) condition evaluates to false, it is already doing that.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          C Offline
          C Offline
          celllllllll
          wrote on last edited by
          #4

          I got it worked..Thanks

          C++Prog

          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