Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit Box / Combo Box question

Status
Not open for further replies.

mpsoutine

Programmer
Jan 6, 2003
87
US
Hi,

I have an SDI application with several edit and combo boxes which the user fills in. I also have an "Add Transaction" button that a user clicks to updates a database with the contents of the edit and combo boxes. What I'm trying to figure out is how do I set the edit and combo boxes to blank after I click the "Add Transaction"
 
Case1 : There are CEdit objects associated with the edit fileds:
CEdit m_edtBox1;
CEdit m_edtBox2;

In the handler OnAddTransaction ()
{
m_edtBox1.SetTextWindow("");
m_edtBox2.SetTextWindow("");
}


Case 2: There are CString member variables associated with the edit fields:
CString m_sField1;
CString m_sField2;
In the handler OnAddTransaction ()
{
m_sField1.Empty();
m_sField2.Empty();
UpdateData(false);

}
For the ComboBox:

CComboBox m_cbxList;

In the handler OnAddTransaction ()
{
//...
m_cbxList.ResetContent();

}

-obislavu-


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top