setting checks on checkbox , setcheck not working

This is a discussion on setting checks on checkbox , setcheck not working within the Windows Programming forums, part of the Platform Specific Boards category; setting checks on checkbox , setcheck not working how do i set a check on checkbox? i used Code: m_checknow.SetCheck(BST_CHECKED); ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    114

    setting checks on checkbox , setcheck not working

    setting checks on checkbox , setcheck not working

    how do i set a check on checkbox?

    i used

    Code:
    	m_checknow.SetCheck(BST_CHECKED);
    but the button refuses to get checked

    m_checknow is a CButton class with a checkbox as its dialog

    thanks in advance

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,181
    Looks like Windows programming to me, so I am moving this thread there. Correct me if I am wrong.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    114
    thanks all for your help
    here is the solution


    ((CButton*)GetDlgItem(IDC_ACTIVATE))->SetCheck(TRUE);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 01-18-2008, 04:06 AM
  2. No Checks i CheckBox
    By CodeJerk in forum Windows Programming
    Replies: 1
    Last Post: 06-09-2003, 11:50 AM
  3. Obtaining and Setting a Checkbox State
    By Okiesmokie in forum Windows Programming
    Replies: 4
    Last Post: 05-13-2002, 05:25 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21