about 7 months ago - No comments
In the development for the control to add Listener is a very common work, the easiest way to add Listener can be: 1 findViewById (R.id.myButton). setOnClickListener (new View.OnClickListener () (public void onClick (View v) (/ / Do stuff))); Add a Listener using the above method has a drawback is that if control is too large,
about 9 months ago - No comments
In the development for the control to add Listener is a very common work, the easiest way to add Listener can be: 1 findViewById (R.id.myButton). setOnClickListener (new View.OnClickListener () (public void onClick (View v) (/ / Do stuff))); Add a Listener using the above method has a drawback is that if control is too large,
about 1 year ago - No comments
Question: In some app like WinSpy/Spy++ to make adjustments to list controls. It can correctly set an app’s list control’s modes, alignments, sorting, styles, and extended styles. It can also get the widths of the columns and count of items. The problem is that you cannot seem to get the columns’ names or the item
about 1 year ago - No comments
How to catch the events when you click on the application’s icon on the taskbar? It’s the WM_NC class messages. For example, you can handle the WM_NCLBUTTONDBLCLK message. And you can alse reponsible the WM_SYSCOMMAND messages. In particular, the special cases of SC_MINIMIZE and SC_MAXIMIZE are what are called from the system menu, which is
about 2 years ago - No comments
30 Great Tips of CListCtrl Program(1) 8. Get Item Infomation TCHAR szBuf[1024];LVITEM lvi;lvi.iItem = nItemIndex;lvi.iSubItem = 0;lvi.mask = LVIF_TEXT;lvi.pszText = szBuf;lvi.cchTextMax = 1024;m_list.GetItem(&lvi); More infomation: Q173242: Use Masks to Set/Get Item States in CListCtrl 9. Get the header titile of CListCtrl LVCOLUMN lvcol;char str[256];int nColNum;CString strColumnName[MAX_COL];nColNum = 0;lvcol.mask = LVCF_TEXT;lvcol.pszText = str;lvcol.cchTextMax = 256;while(m_list.GetColumn(nColNum, &lvcol)){
about 2 years ago - 1 comment
Without a special note,the listctrl has the default view style of report. 1. CListCtrl style LVS_ICON: for each item displayed great icon LVS_SMALLICON: for each item displayed on the icon LVS_LIST: a show with a small icon on the item LVS_REPORT: Show item details You can inspect the Windows Explorer,
about 2 years ago - No comments
In some case, you need such a control as the following figure: It’s a CListCtrl like control, but it binds a CTreeCtrl in the first column. But you can also consider it as a CTreeCtrl and each of the items has the list style. All roads lead to Rome. But in 1999, David Lantsman has
about 2 years ago - 11 comments
After you modified your reource.h, you may got this error: fatal error RC1004: unexpected end of file found. It’s a bug of the resource compiler. The solution is adding a blank line or two to the end of the file and build again.
about 2 years ago - No comments
Read this article: How to use an derived CListCtrl in CListView
about 2 years ago - No comments
How to sort the items of a CListCtrl or CListView(CReportView)? First, when you add items, you need to call SetItemData to attach an data structure(an integer or a pointer) to the item. Then, define a callback sort function. int CALLBACK SortFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); And here, the prarameters lParam1 and lParam2 are the