Compartilhar via


CMFCToolBarComboBoxButton::Compare

Compares two strings.

virtual int Compare(
   LPCTSTR lpszItem1,
   LPCTSTR lpszItem2 
);

Parameters

  • [in] lpszItem1
    The first string to compare.

  • [in] lpszItem2
    The second string to compare.

Return Value

A value that indicates the case-sensitive lexicographic relationship between the strings. The following table lists the possible values:

Value

Description

<0

The first string is less than the second.

0

The first string equals the second.

>0

The first string is greater than the second.

Remarks

Override this method to change how items are sorted in the list box.

The comparison is case-sensitive.

This method is called only from the AddSortedItem method.

Requirements

Header: afxtoolbarcomboboxbutton.h

See Also

Reference

CMFCToolBarComboBoxButton Class

Hierarchy Chart

CMFCToolBarComboBoxButton::AddSortedItem