15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


WM_COMPAREITEM and owner drawn list boxes

DFPav@aol.com
Tuesday, February 25, 1997

Environment: VC++ 1.52, Win95

All:
I recently developed a class for an owner drawn list box.  I am using the
LBS_SORT
style in my resource file, yet I do not receive a WM_COMPAREITEM message,
therefore my custom sorting is not implemented.  I used the SPY++ to look at
all windows in the system, looking for that WM_COMPAREITEM message and I
never see one sent.  Is there a style I have to change to get this message to
be sent.  Is this message just a Windows hoax?  Any help, please?
Dan




Andreas Epple -- Andreas.Epple@munich.netsurf.de
Wednesday, February 26, 1997

[Mini-digest: 2 responses]

Hello !!

Do you use the LBS_HASSTRINGS - style ? An owner drawn list box and
LBS_SORT only work, if you don't use this style. Look at the documentation
of CListBox::AddString().



----------
> Von: DFPav@aol.com
> An: mfc-l@netcom.com
> Betreff: WM_COMPAREITEM and owner drawn list boxes
> Datum: Dienstag, 25. Februar 1997 14:53
> 
> Environment: VC++ 1.52, Win95
> 
> All:
> I recently developed a class for an owner drawn list box.  I am using the
> LBS_SORT
> style in my resource file, yet I do not receive a WM_COMPAREITEM message,
> therefore my custom sorting is not implemented.  I used the SPY++ to look
at
> all windows in the system, looking for that WM_COMPAREITEM message and I
> never see one sent.  Is there a style I have to change to get this
message to
> be sent.  Is this message just a Windows hoax?  Any help, please?
> Dan
> 
-----From: "Dmitry A. Dulepov" 

        [Mailer: "Groupware E-Mail". Version 1.03.000]

>        [From: DFPav@aol.com
>
>Environment: VC++ 1.52, Win95
>
>All:
>I recently developed a class for an owner drawn list box.  I am using the
>LBS_SORT
>style in my resource file, yet I do not receive a WM_COMPAREITEM message,
>therefore my custom sorting is not implemented.  I used the SPY++ to look at
>all windows in the system, looking for that WM_COMPAREITEM message and I
>never see one sent.  Is there a style I have to change to get this message to
>be sent.  Is this message just a Windows hoax?  Any help, please?
>Dan

MFC will call CYourDerivedListBox::CompareItem() for the WM_COMPAREITEM. Do you use it ? If no, how do you implement WM_COMPAREITEM handling ?


Dmitry A. Dulepov
Samsung Electronics Co., Ltd.
Russian Research Center
Phone: +7 (095) 213-9207
Fax: +7 (095) 213-9196
E-mail: dima@src.samsung.ru
====================================





Become an MFC-L member | Вернуться в корень Архива |