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. check box problem

check box problem

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

    I am using the two stage check box in sdk(not MFC). when i checked or unchecked on checkbox then how can I find out whether the checkedbox is checked or unchecked. I am using the following code. case WM_COMMAND: if(LOWORD(wParam) == IDC_CHECKBOX1) { }

    Trioum

    F H M 3 Replies Last reply
    0
    • T trioum

      I am using the two stage check box in sdk(not MFC). when i checked or unchecked on checkbox then how can I find out whether the checkedbox is checked or unchecked. I am using the following code. case WM_COMMAND: if(LOWORD(wParam) == IDC_CHECKBOX1) { }

      Trioum

      F Offline
      F Offline
      fd0129002
      wrote on last edited by
      #2

      Hi, Trioum Try IsDlgButtonChecked function please.

      ============ Einstein Seeing is believing.

      1 Reply Last reply
      0
      • T trioum

        I am using the two stage check box in sdk(not MFC). when i checked or unchecked on checkbox then how can I find out whether the checkedbox is checked or unchecked. I am using the following code. case WM_COMMAND: if(LOWORD(wParam) == IDC_CHECKBOX1) { }

        Trioum

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Did you use of BM_GETCHECK?

        T 1 Reply Last reply
        0
        • H Hamid Taebi

          Did you use of BM_GETCHECK?

          T Offline
          T Offline
          trioum
          wrote on last edited by
          #4

          but how can I used in my code shown in my first post. I could not understand

          Trioum

          F H 2 Replies Last reply
          0
          • T trioum

            but how can I used in my code shown in my first post. I could not understand

            Trioum

            F Offline
            F Offline
            fd0129002
            wrote on last edited by
            #5

            Please search it on google or MSDN .

            ============ Einstein Seeing is believing.

            1 Reply Last reply
            0
            • T trioum

              but how can I used in my code shown in my first post. I could not understand

              Trioum

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              For use it you must use of SendMessage with handle of your control.

              1 Reply Last reply
              0
              • T trioum

                I am using the two stage check box in sdk(not MFC). when i checked or unchecked on checkbox then how can I find out whether the checkedbox is checked or unchecked. I am using the following code. case WM_COMMAND: if(LOWORD(wParam) == IDC_CHECKBOX1) { }

                Trioum

                M Offline
                M Offline
                Mark Salsbery
                wrote on last edited by
                #7

                case WM_COMMAND:
                if(LOWORD(wParam) == IDC_CHECKBOX1)
                {
                LRESULT ret = ::SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);

                  if (BST\_CHECKED == ret)
                  {
                  }
                  else if (BST\_INDETERMINATE == ret)
                  {
                  }
                  else  // must be BST\_UNCHECKED
                  {
                  }
                

                }

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                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