Windows sends the WM_COMPAREITEM message to determine the relative position of a new item in the sorted list of an owner-drawn combo box or list box. Whenever the application adds a new item, Windows sends this message to the owner of a combo box or list box created with the CBS_SORT or LBS_SORT style.
WM_COMPAREITEM idCtl = wParam; // control identifier lpcis = (LPCOMPAREITEMSTRUCT) lParam; // structure with items
The return value indicates the relative position of the two items. It may be any of the following:
Value |
Meaning |
-1 |
Item 1 precedes item 2 in the sorted order. |
0 |
Items 1 and 2 are equivalent in the sorted order. |
1 |
Item 1 follows item 2 in the sorted order. |
When the owner of an owner-drawn combo box or list box receives this message, the owner returns a value indicating which of the items specified by the COMPAREITEMSTRUCT structure will appear before the other. Typically, Windows sends this message several times until it determines the exact position for the new item.
file: /Techref/os/win/api/win32/mess/src/msg22_19.htm, 2KB, , updated: 2000/4/7 11:20, local time: 2024/11/23 14:22,
52.15.136.223:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/os/win/api/win32/mess/src/msg22_19.htm"> WM_COMPAREITEM</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.