[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 488
  • Last Modified:

ODBC - CRecordset - CRecordview

Environment : MS-Access , Visual C++

Interface : ODBC

Classes : MFC and C++

views : CRecordView


Question :

I have an combo box in my record view.
Is it possible for me to make a selection in the combo and then
upon making a selection in the combo box the program will automaticly trigger a routine that will perform a specific task.


For example :

When i select japan in the combo box
a routine will be executed automaticly.


Note : The Task that is to be perform in the routine
       depends on the programmer.


Regards

Eugene

 


0
eugene007
Asked:
eugene007
1 Solution
 
eugene007Author Commented:
Edited text of question.
0
 
inprasCommented:
Yes U can do like this
map the command handler sel change of combo box then in function
say
void CMyLangSelct::OnSelchangeLanguage()
{
      int index = m_Datatype.GetCurSel();
      datatype = m_Datatype.GetItemData(index) ;
             if (datatype == "Japan")
            {
              //Call a function or raise an event
             }
}

Hope this helps
           
0
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

What inpras meant is
void CMyLangSelct::OnSelchangeLanguage()
{
int index = m_Datatype.GetCurSel();
if(index != -1)
{
CString datatype;
m_Datatype.GetLBText(index, datatype);
if (datatype == "Japan")
{
//Call a function or raise an event
}
}
}

Try it out.
VinExpert
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now