Hi Everyone. I have a dialog box with a list control; populated with the contents of a database, an "Edit Trade" button and "Delete Trade" button. I select a item in the list control and then click "Edit Trade" This generates another dialog box, Edit Trade Dialog...
Here is the code:
//////////////FindDialog/////////////
void CFindDialog::OnButtonEdit()
{
//AfxMessageBox("You clicked the Edit Button");
CTransactionSet TmpSet;
CListCtrl* pList;
pList = &m_lcTradeList;
TmpSet.Open();
CEditTradeDialog TmpEdTrdDlg;
int nTransID...
Hi,
You're right that would be helpful. I'm using Access for the database and Visual C++ to design the application. I don't have the code in front of my right now. One idea I had was to pass the address of the list control from the "FindTrade" class to the "EditTrade"...
Hi,
I'll give an overview of my program. In my FormView class the user clicks the "Find Trade" button. This generates a "FindTrade" dialog box which has a list control populated with the contents of a database as well as an "Edit" button.
The user selects...
Hi,
A short introduction to the progam I'm working on. I have a Form View with combo boxes and edit contols. The combo boxes, Buyer & Seller, are populated with the contents of one the tables, Customer Table, in my data from my data.
I also have an "Add" button on my form view...
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...
Hi G,
If you go to class wizard/click on the menu object ID/and look in the Message Window. You will see Command and UpdateCommandUI()
I used this function to enable two menu items after I clicked an item in a list control.
Hope this code helps.
void...
Hi,
I have a button and menu item that carry out the same procedure. My question is the proper way to code for this. Currently I have two seperate functions OnEdit()for the button Edit and OnEditPerson() for the menu item Edit. Is this the acceptable way to code. Both functions are in my...
Hi,
I'm trying to populate a list control within a dialogbox with the records in a database. The user clicks on a "Show Employee List" button and a dialogbox appears. I'm trying to populate the the list control within DoModal().
The following runtime error was generated when...
Hi -obislavu-,
It did help. It pointed me in the right direction. I did have the ON_COMMAND for each menu item. I figured out what I needed to do for each of the UPDATE_COMMAND_UI functions. Here is a sample code.
void CBirthRecordView::OnUpdateDeletePerson(CCmdUI* pCmdUI)
{...
Hi,
I'm stuck on problem. When I click on an item in list control I want to enable a menu item. I have a menu selection: option|Add|Edit|Delete. When the program starts Edit and Delete should be diabled. When I select an item in the list control, Edit and Delete should be enabled...
Hi Dimandja,
This code is being used to add an item that was recently added to the recordset to a list control. But I figured out why MoveLast and MoveNext are called. I'm only adding ONE record to the list control NOT repopulating the the list control with the entire contents of a...
Hi Dimandja,
I've been reading the msdn site you mentioned. What I'm still confused on is what is taking place with in the while()loop.
When the recordset is opened I call MoveFirst() and then populate the List Control with the contents of the record.
Next I call MoveLast().This will...
Hi Dimandja,
Thanks for the feedback. Where I'm a little confused is with the term "first rowset" Would this be the first record? Below is the code I'm working with. I'm using the contents of a CRecordset to populate a list control. I'm using the code as a guide. I did not...
Hi,
I'm trying to get a better understanding of this function.
In MSDN: MoveFirst() call this member function to make the first record in the first rowset the current record.
I'm getting stuck on the term rowset. What is meant by the term "first rowset"
Thanks,
Hi,
Is there a limit to the number of rows that can be added to a list control? I'm populating my list control with the contents of a data base. Not all the items in the database are being added.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.