thx...it's work now...but why the view of ClistCtrl didn't scroll automatically to the attributes(for example the ClistCtrl only preview 10 attributes,but the attributes that I want is in index 20. When I try to run the find function, although the selection mark is in index 20,but the view still previewing 1-10). How to handle this problem? thx...
firebolt77
Posts
-
need help in CListCtrl -
need help in CListCtrlwhat flag that I should use, because I didn't find any suitable flag? Pls help thx..
-
need help in CListCtrlthx..but how to make the previous item is not selected(because when I try to use the find function twice or more, the previous selected item is still highlighted/selected) thx...
-
need help in CListCtrlhi all..I'm making a program using CListCtrl that has a find feature(so if I enter a string in edit box and click the find button, it search the CListCtrl attributes with the same string, and then set the selection mark into the attributes). What function that I should use?(I already try SetSelectionMark,but it doesn't work) pls help... thx
-
troubles on exchanging data between dialogthx...it works... Thx for the reply...
-
troubles on exchanging data between dialoghi all... want to exchange a list control data between dialogs, but when I tried it, it failed and I don't know why..can anyone help? //I initialize the 2nd dialog at the 1st dialog class CAddNeighborsDialog* dlg = new CAddNeighborsDialog; int count = 0; /*inserting data to m_listAddNeighbors(CListCtrl data type)in dialog 2 from m_strData(CStringArray data type)*/ while(count*29m_listAddNeighbors.GetItemCount(); dlg->m_listAddNeighbors.InsertItem(nItem,m_strData.GetAt((count*29)+10)); dlg->m_listAddNeighbors.SetItemText(nItem,1,m_strData.GetAt((count*29)+1)); count++; } if(dlg->DoModal() == IDOK) { //I try to test it using message box, but the message box shows nothing MessageBox(dlg->m_listAddNeighbor.GetItemText(0,1)); } } pls help... thx
-
troubles on using scroll bar in frameok thx...I will try it
-
troubles on using scroll bar in framehmm..but I'm using CDialog base class. Can I use the method? thx..
-
troubles on using scroll bar in framejust ordinary dialog box with tab control, tree control, button, edit box, etc. I want the dialog box can be resize to smaller size, and I can use the scroll bar to see all of the frame. Sorry for the bad english...but I hope you understand what I mean :) thx..
-
troubles on using scroll bar in frameThx...but I'm still confuse on the drawing code :) I'm still new in MFC so I'm still lack of knowledge in MFC thx anyway..
-
troubles on using scroll bar in frameI'm using VC 6.0. I already make the event handler. On where I should write my drawing code? Btw...what is the keyword for finding thw tutorials(I try "repainting window" keyword, but I didn't find any suitable articles) thx...
-
troubles on using scroll bar in framehow to implement it? Can u give some tutorials,articles,or some link that can be helpful..pls thx
-
troubles on using scroll bar in framehi all..I want to make a dialog that can be resize with HScroll and VScroll. But when I tried the program, the dialog window can be resized, but the scroll doesn't work(I added the scroll using class wizard by right-clicking the dialog window, go to properties, and checked horizontal scroll and vertical scroll). Pls help... thx.
-
question about tab controlok..will try it. The problem is, I forgot who is the author(I've download the source code,but in the source code, he didn't put his name but his email ben@shido.fsnet.co.uk) :) thx.
-
question about tab controlHow to access it. I'm making a member variable for the edit box. How to access the member variable? I'm making a program that has tree control and tab control. If I click the tree attributes, the tab control content will change according to the selected tree item. But I'm so confused. pls help...
-
question about tab controlhi all...I have troubles in accessing and editing the tab control member's attributes. I've followed the codeproject article on making the tab control application(which is creating a new class for example CMyTabCtrl derived from CTabCtrl and inserted with other classes for exmaple CTabOne,CTabTwo,etc). How to access the CTabOne attributes(for example its edit box)? Does anyone can help me?From where I can access to CTabOne attributes?Is it from the Main Dialog Class, CMyTabCtrl, or from the CTabOne directly?Pls help...
-
trouble in inserting data to tree controlthx...I also have some problem on populating the tree control. I want to group the tree attributes if there are same occurences. I have tried to make the function, but when I run it, my program become not responding. here is my function: HTREEITEM CCDBMainDlg::LoadTree(CStringArray& tree) { m_hItem = m_treeCDB.GetNextItem(m_hItem,TVGN_ROOT); if(m_treeCDB.ItemHasChildren(m_hItem)) { m_hItem = m_treeCDB.GetChildItem(m_hItem); while(m_treeCDB.GetItemText(m_hItem).Compare(tree.GetAt(12))!=NULL || m_hItem != NULL) { m_hItem = m_treeCDB.GetNextSiblingItem(m_hItem); } if(m_treeCDB.ItemHasChildren(m_hItem)) { m_hItem = m_treeCDB.GetChildItem(m_hItem); while(m_treeCDB.GetItemText(m_hItem).Compare(tree.GetAt(11))!=NULL || m_hItem != NULL) { m_hItem = m_treeCDB.GetNextSiblingItem(m_hItem); } if(m_treeCDB.ItemHasChildren(m_hItem)) { m_hItem = m_treeCDB.GetChildItem(m_hItem); while(m_treeCDB.GetItemText(m_hItem).Compare(tree.GetAt(0))!=NULL || m_hItem != NULL) { m_hItem = m_treeCDB.GetNextSiblingItem(m_hItem); } } else { m_hItem = m_treeCDB.InsertItem(tree.GetAt(0),0,1,m_hItem); } } else { m_hItem = m_treeCDB.InsertItem(tree.GetAt(11),0,1,m_hItem); m_hItem = m_treeCDB.InsertItem(tree.GetAt(0),0,1,m_hItem); } } else { m_hItem = m_treeCDB.InsertItem(tree.GetAt(12),0,1,m_hItem); m_hItem = m_treeCDB.InsertItem(tree.GetAt(11),0,1,m_hItem); m_hItem = m_treeCDB.InsertItem(tree.GetAt(0),0,1,m_hItem); } m_hItem = m_treeCDB.InsertItem(tree.GetAt(1),0,1,m_hItem); m_treeCDB.EnsureVisible(m_hItem); return m_hItem; } pls help. thx.
-
trouble in inserting data to tree controlthx...I have read the link u gave me, but I think it is not what I' looking for for example I have a data base file that consist name,age,address,phone number,etc and I want to make a tree control based on the name for example. And then if I click the tree control attributes, I can access the other database attributes such as the age,address,phone,etc. Is there any function or maybe some links to help me..because I'm so confused. thx...
-
trouble in grouping tree control attributesI want to make a tree control based on database file.(I want to group the same occurence in database using tree control). but when I run my program, the tree control is not grouping here i my function: HTREEITEM CCDBMainDlg::LoadTree(CStringArray& tree) { //HTREEITEM hItem2; m_treeNetwork = m_treeCDB.GetNextItem(m_treeNetwork,TVGN_ROOT); //m_treeNetwork = m_treeCDB.GetChildItem(m_treeNetwork); //m_treeCDB.SetImageList(&m_ImageList,TVSIL_NORMAL); if((m_treeNetwork = m_treeCDB.GetChildItem(m_treeNetwork)) != NULL) { while(m_treeCDB.GetItemText(m_treeNetwork).Compare(tree.GetAt(12))!=NULL || m_treeNetwork != NULL) { m_treeNetwork = m_treeCDB.GetNextSiblingItem(m_treeNetwork); } if((m_treeNetwork = m_treeCDB.GetChildItem(m_treeNetwork)) != NULL) { while(m_treeCDB.GetItemText(m_treeNetwork).Compare(tree.GetAt(11))!=NULL || m_treeNetwork != NULL) { m_treeNetwork = m_treeCDB.GetNextSiblingItem(m_treeNetwork); } if((m_treeNetwork = m_treeCDB.GetChildItem(m_treeNetwork)) != NULL) { while(m_treeCDB.GetItemText(m_treeNetwork).Compare(tree.GetAt(0))!=NULL || m_treeNetwork != NULL) { m_treeNetwork = m_treeCDB.GetNextSiblingItem(m_treeNetwork); } } else { m_treeNetwork = m_treeCDB.InsertItem(tree.GetAt(0),0,1,m_treeNetwork); } } else { m_treeNetwork = m_treeCDB.InsertItem(tree.GetAt(11),0,1,m_treeNetwork); m_treeNetwork = m_treeCDB.InsertItem(tree.GetAt(0),0,1,m_treeNetwork); } } else { m_treeNetwork = m_treeCDB.InsertItem(tree.GetAt(12),0,1,m_treeNetwork); m_treeNetwork = m_treeCDB.InsertItem(tree.GetAt(11),0,1,m_treeNetwork); m_treeNetwork = m_treeCDB.InsertItem(tree.GetAt(0),0,1,m_treeNetwork); } m_treeNetwork = m_treeCDB.InsertItem(tree.GetAt(1),0,1,m_treeNetwork); return m_treeNetwork; } sorry if my function is too complicated, because I am still new in MFC pls help..thx
-
trouble in inserting data to tree controlCan u give me some examples pls?because I'm still new in MFC and lack of experience in programming. thx