Functions of all clistctrl member functions (and a brief description of controls)

Source: Internet
Author: User

Baidu is also doing well in some aspects, such as the content reposted below:

 

Clistctrl

 

Clistctrl

Cobject
└ C0000target
└ Cwnd
└ Clistctrl

The clistctrl class encapsulates the "List View Control" function to display the collection of each containing icon (in List View) and label. In addition to icons and labels, each item can also display information in the column on the Right of icons and labels. This control (and clistctrl class) is only applicable to programs running on Windows 95, Windows NT 3.51, and later. The following is an overview of the clistctrl class. For a detailed and conceptual discussion, see "use clistctrl" and "control topic" in the "Visual C ++ programmer's Guide ". The view List View control can display its content in four different ways, called "View ".

· Each item in the icon view is displayed as a full-size icon (32 × 32 pixels). There is a label below it. You can drag an item to any position in the List View window.
· Each item in the small icon view appears as a small icon (16 × 16 pixels), with a label on the right. You can drag an item to any position in the List View window.
· Each item in the List View appears as a small icon. There is a label below. Items are arranged in columns and cannot be dragged to any position in the List View window.
· Each item in the report view appears on the row, and additional information is arranged in columns on the right. The leftmost column contains icons and labels, and the next column contains the child items specified by the application. Embed the title control to implement these columns. For more information about report view title controls and columns, see "use clistctrl: add columns to controls (Report view)" in the "Visual C ++ programmer Guide )".

The current list view style of the control specifies the current view. For more information about these styles and their usage, see "use clistctrl: change the style of list controls" in the "Visual C ++ programmer Guide ". In addition to the standard list style, the clistctrl class supports a series of extended styles that provide rich functions. Some examples of this function include:

· If the cursor remains on an item for a period of time, this item can be selected automatically.
· If the virtual list view is valid, DWORD items are supported by the control. It is possible to put the management application item data at the top. Except Item Selection and focus information, all item information must be managed by the application. For more information, see "use clistctrl: Virtual list control" in the "Visual C ++ programmer Guide ".
· Click or double-click activation. If activation is effective, hot tracking (item text is automatically highlighted) and click or double-click the highlighted item to activate it.
· If the drag-and-drop LIST command is valid, you can drag and drop records in columns in the List View control. Valid only for the report view.

For more information about how to use the new extended style, see "use clistctrl: change the style of list controls" in the "Visual C ++ programmer Guide" in the online document ". Each item in the item and subitem List View Control contains an icon, a tag, a current status, and an application definition value ("item data "). One or more sub-items can be associated with each item. A "subitem" is a string that can be displayed in the item icon and column on the right of the label in the report view. Each item in the List View control must be the same as the number of subitems. Clistctrl class provides functions for inserting, deleting, searching, and changing these items. For more information, see "use clistctrl: scrolling, sorting, sorting, and searching in the list control" in the "Visual C ++ programmer Guide ". For more information, see clistctrl: getitem, clistctrl: insertitem, and clistctrl: finditem. The List View control stores the icons and text attributes of an item. However, in addition to these item types, clistctrl supports "Callback items ". A "Callback item" is a list view item. Each application date is not the control date to store text, icons, or both. The callback mask is used to specify the attribute (text and/or icon) provided by the application. If the app uses a callback item, it must provide text and/or icon properties as needed. Callback items are helpful when some of the information about your application already exists. For more information, see clistctrl: getcallbackmask and "use clistctrl: callback item and callback mask ". The image list icon, title item image, and application-defined list view item statuses are included in some image lists (implemented by the cimagelist class) and can be created and assigned to List View Controls. Each list view control can have more than four image list types:

· Use the big icon in the icon view to obtain the full-size icon.
· Small icons are used in small icons, lists, and report views to obtain the small version icons used in the icon view.
· The application-defined status includes a status image, which is displayed next to the item icon to indicate an application-defined status.
· The title item is used to obtain a small image that appears in each title Control item in the report view.

The List View control deletes the image list assigned to it (when it is deleted). However, developers can delete the list of images that are no longer used by the application. # Include <afxcen. h> see Member constructors of the cimagelist clistctrl class.

Clistctrl Construct a clistctrl object
Create Create a list control and attach it to the clistctrl object.

Attribute

Getbkcolor Obtain the background color of the List View control.
Setbkcolor Set the background color of the List View control.
Getimagelist Obtains the handle of the image list used to draw a list view item.
Setimagelist Specifies an image list to the List View control.
Getitemcount Obtain the number of items in the List View control.
Getitem Obtains the attributes of a list view item.
Getcallbackmask Obtain the callback mask of the List View control.
Setcallbackmask Set the callback mask of the List View control.
Getnextitem Queries the List View items of the relationship between a specified feature and a specified item.
Getfirstseleteditemposition Obtain the position of the first selected list view item in the List View control.
Getnextseleteditem Obtain the List View of the next selection for repetition
Getitemrect Obtain the bounded rectangle of an item.
Setitemposition Move one item to the specified position in the List View Control
Getitemposition Obtain the position of the List View Item
Getstringwidth Specify the minimum column width of all specified strings to be displayed
Geteditcontrol Obtains the handle of the Edit Control used to edit an item text.
Getcolumn Obtains the attributes of a control column.
Setcolumn Set the attribute of the List View column
Getcolumnwidth Obtain the column width in the report view or list view.
Setcolumnwidth Change the column width in the report view or List View
Getcheck Obtains the current display status of a State Image related to a certain item.
Setcheck Sets the current display status of a State Image related to a certain item.
Getviewrect Obtains the bounded rectangle of all items in the List View control.
Gettextcolor Obtain the text color of the List View control.
Settextcolor Set the text color of the List View control.
Gettextbkcolor Obtains the text background color of the List View control.
Settextbkcolor Set the text background color of the List View Control
Gettopindex Obtain the index of the highest level
Getcountperpage Calculates the number of items that can be placed vertically in the List View control.
Getorigin Obtain the initial current view of the List View control.
Setitemstate Changes the status of items in the List View control.
Getitemstate Obtains the status of the items in the List View control.
Getitemtext Obtains the text of a list view item or subitem.
Setitemtext Set the text of a list view item or subitem
Setitemcount Prepare a list view control to add a large number of items
Getitemdata Obtains the value specified by an application.
Setitemdata Set the value specified by the application of the item
Getselectedcount Obtain the number of items selected in the List View control.
Setcolumnorderarray Set the column Order (left or right) of the List View Control)
Getcolumnorderarray Obtain the column Order (left or right) of the List View control)
Seticonspacing Set the icon distance in the List View control.
Getheaderctrl Obtains the title control of the List View control.
Gethotcursor Obtain the cursor used when the List View control is valid for hot debugging.
Sethotcursor Set the cursor used when hot debugging is effective for List View Controls
Getsubitemrect Obtains the bounded rectangle of an item in the List View control.
Gethotitem Obtains the List View items under the current cursor.
Sethotitem Set the current hot item of the List View Control
Getselectionmark Obtain the selection and shielding of the List View Control
Setselectionmark Set the selection and shielding of the List View Control
Getextendedstyle Obtains the current extended style of the List View control.
Setextendedstyle Set the current extended style of the List View Control
Subitemhittest Specifies which list view item is in the specified position. If yes
Getworkareas Obtains the current Workspace of the List View control.
Getnumberofworkareas Obtains the current workspace quantity of the List View control.
Setitemcountex Set the number of items in the virtual List View control.
Setworkareas Set the areas that can be displayed by icons in the List View control.
Approximateviewrect Specify the width and height required for displaying the control items in the list view.
Getbkimage Obtains the current background image of the List View control.
Setbkimage Set the current background image of the List View Control
Gethovertime Obtains the current stay time of the List View control.
Sethovertime Set the current stay time of the List View Control

Operation

Insertitem Insert a new item in the List View control.
Deleteitem Delete an item from the control
Deleteallitems Delete all items from the control
Finditem Search for list view items with specified characters
Sortitems View items of the sort list using the comparison function defined by the application
Hittest Which list view is located?
Ensurevisible Ensure items are visible
Scroll Scroll List View control content
Redrawitems Force the List View control to refresh some items
Update Force the control to refresh a specified item
Arrange Adjust items in the column
Editlabel Edit the item text here
Insertcolumn Insert a new column in the List View control.
Deletecolumn Delete a column from the List View Control
Createdragimage Creates a drag image list for the specified item

Covering Functions

Drawitem Called when the visible part of the self-drawn control changes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.