Use of virtual list

zhaozj2021-02-08  237

This article translated from http://www.microsoft.com/msj/archive/s2061.aspx

This article may include a valid network connection when publishing, but now you may now connect to a website or web page that is not present. To keep the integrity of the article, we keep the text of the connection, but disable connections.

November 1996 Preview IE4.0 The general control provided by IE4.0, the second part Strohm Armstrong Strohm Armstrong is a Microsoft's technical support engineer, expertise is user and housing technology. Click here to open or copy the file of the ListView project. Click here to open or copy files for the VlistView project. In the first part of this series, I describe some of the new features of the public control-as part of Microsoft® Internet Explorer (IE) 4.0. I mainly discuss new features, such as self-painting and new controls, such as the Coolbar and Date / Time Selector (DATE / TIME Picker). I will discuss the improvement of existing controls this month. I will describe the Improved List Control (ListView), it seems to accommodate unlimited list items; improved title controls, tag controls, tooltip controls, slider controls. In addition, I will provide two sample programs to demonstrate the correct usage of the list control and use some of the new controls discussed in some first part. Like the first part, you need to get a new version of public controls (just install IE4.0 to get IE4 public controls - Yes, what you read is correct. This dynamic connection library is not available, so IE download IE4 .0 is the only way to get it). (Translator Note: From Windows 98 and WindowsNT4.0, IE is integrated into the Windows operating system, the current version of IE is the IE6.0 second beta. It is expected that Windows XP will integrate IE6.0.) Magic list column There is a method called a virtual list that allows for a large number of list items. In addition to your LVS_OWNERDATA style, the creation of controls and other list controls is the same. After you create, you tell how many items inside by sending a LVM_SETITETETITETETETETETETETETETETETETETET message. At this time, you tell how many items do it seem to be in the control, but don't really insert any items. This parameter has a integer WPARAM parameter, which is the number of list items that will contain. LPARAM is a combination of 0 or some flags, the option to display: lvsicf_noinvalidateAll means that the list control is not heavy, unless the object being affected is currently displayed; lvsicf_noscroll means that when the number of list items is changed, the list control is not Change the position of the slider on the scroll bar. From this time, any display list item will work based on the callback mechanism: send LVN_GETDISPINFO notification for each display list item; you are like providing a list item to the standard list to process this notification. This notification LPARAM is a pointer to the LV_Dispinfo structure. The MASK member of this structure specifies the information you need. Two notices are unique to the virtual list. The first, lvn_odfindItem, is sent when the control is to find a specific item; for example, when the input focus is on the control, the user enters something. This notification LPARAM is a pointer to the NMLVFindItem structure. This structure contains an NMHDR structure (HDR), an index of the start item and a LVFINDINFO structure (LVFI) structure (LVFI). This information is provided to you so you can find the specified list item. You should return the index of the list item that is found, or -1 (if not found). The second notification is lvn_odcachehint. This notification is sent when the list will display a list item within a range. This notification LPARAM is a pointer to the NMLVCachehint structure. This structure contains an NMHDR structure (HDR), an integer indicating the beginning of the range, and an integer indicating the end of the range. Processing this notification, you need to load the specified list item to a local cache if you are maintaining such a cache.

转载请注明原文地址:https://www.9cbs.com/read-1862.html

New Post(0)