dialog based project and radio buttons

i have a dialog based project.  I know how to open an access database.  What I want to be able to do is when I make a selection with my radio button and checkbox it will reflect what is displayed from my database inside of my listctrl.

Here is the code I have to open my database.

**********
//database
CDaoDatabase db;
CString Name = _T(""), Type = _T(""), Units = _T(""), XCord = _T(""), YCord = _T("");
COleVariant covVal;
CDaoRecordset rec(&db);

db.Open(_T("6se70.mdb"), TRUE, TRUE, _T(""));
      //put if statement here for radio and combobox selection
      rec.Open(dbOpenDynaset, _T("SELECT * FROM Parameter WHERE Parameter!Name LIKE 'n*'"), 0);
      m_database.InsertColumn(0, _T("Name"), LVCFMT_LEFT, 83, -1);
      m_database.InsertColumn(1, _T("Type"), LVCFMT_LEFT, 60, -1);
      m_database.InsertColumn(2, _T("Units"), LVCFMT_LEFT, 60, -1);
      m_database.InsertColumn(3, _T("X Cord"), LVCFMT_LEFT, 55, -1);
      m_database.InsertColumn(4, _T("Y Cord"), LVCFMT_LEFT, 55, -1);
      int x=0;
      while(!rec.IsEOF())
      {
            //Name Field
            rec.GetFieldValue(_T("Name"), covVal);
            strcpy(Name.GetBuffer(128), (char*)covVal.bstrVal);
            m_database.InsertItem(0, Name);
            //Type Field
            rec.GetFieldValue(_T("Type"), covVal);
            strcpy(Type.GetBuffer(128), (char*)covVal.bstrVal);
            m_database.SetItem(x, 1, LVIF_TEXT, Type, 0, 0, 0, 0);
            //Units Field
            rec.GetFieldValue(_T("Units"), covVal);
            strcpy(Units.GetBuffer(128), (char*)covVal.bstrVal);
            m_database.SetItem(x, 2, LVIF_TEXT, Units, 0, 0, 0, 0);
            //X Cord Field
            rec.GetFieldValue(_T("X Cord"), covVal);
            XCord.Format("%.3f", covVal.bstrVal);
            m_database.SetItem(x, 3, LVIF_TEXT, XCord, 0, 0, 0, 0);
            //Y Cord Field
            rec.GetFieldValue(_T("Y Cord"), covVal);
            YCord.Format("%.3f", covVal.bstrVal);
            m_database.SetItem(x, 4, LVIF_TEXT, YCord, 0, 0, 0, 0);
                        
            x++;
            rec.MoveNext();
      }
*******

now when I choose a radio button and make a selection inside of a combobox it will make changes to the SELECT clause.  This is what I want it to do.  Please keep in mind that all of this code is performed inside of my OnInitDialog function.  Where do I put the code for the radio buttons and comboboxes and make it work, which is really what I want answered

LVL 2
simongodAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhanceCommented:
Open the ClassWizard and add handlers for your radio buttons and comboboxes.

When your handlers get called you can do your processing.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
simongodAuthor Commented:
I went to classwizard and made "member variables" is that what you mean?  where does the code go when I want to select an option in a combobox or radio button so that operation gets performed
0
jhanceCommented:
No, that not what I meant.  Open the Class Wizard and choose MESSAGE MAPS.  Choose the Class Name that you are working with and then the Object ID for your radio button.  Choose the BN_CLICKED message and hit OK.  This will add a handler for you that will get called whenever that radio button is clicked.  Do the same for the combo box.
0
simongodAuthor Commented:
it worked thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.