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 do i set a Radio Button's state in with win32 api's?

How do i set a Radio Button's state in with win32 api's?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++json
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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    not mfc :) thanks

    R 1 Reply Last reply
    0
    • A Anonymous

      not mfc :) thanks

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

      SendMessage(
      (HWND) hWnd, // handle to destination window
      BM_SETCHECK, // message to send
      (WPARAM) wParam; // check state
      (LPARAM) lParam; // not used; must be zero
      );

      For wParam use BST_CHECKED, BST_UNCHECKED or BST_INDETERMINATE. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

      D 1 Reply Last reply
      0
      • R Ravi Bhavnani

        SendMessage(
        (HWND) hWnd, // handle to destination window
        BM_SETCHECK, // message to send
        (WPARAM) wParam; // check state
        (LPARAM) lParam; // not used; must be zero
        );

        For wParam use BST_CHECKED, BST_UNCHECKED or BST_INDETERMINATE. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

        D Offline
        D Offline
        Dimitri Rochette
        wrote on last edited by
        #3

        SendMessage is Great but there is a macro which do the same BOOL CheckDlgButton( HWND hDlg, // handle to dialog box int nIDButton, // button identifier UINT uCheck // check state );

        R 1 Reply Last reply
        0
        • D Dimitri Rochette

          SendMessage is Great but there is a macro which do the same BOOL CheckDlgButton( HWND hDlg, // handle to dialog box int nIDButton, // button identifier UINT uCheck // check state );

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

          You're right, CheckDlgButton() is easier to use. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

          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