Self-Drawn Listbox control and DeleteItem()
Lars Schouw -- ls@cybernet.dk Wednesday, July 17, 1996 I have a problem with recieving the WM_DELETEITEM message in my self-drawn listbox control. The listbox is a reuasble c++ class that is suposed to handle all the control of the listbox derived contol. I have made my implementation of the class i have been making my own instances of the DeleteItem() CompareItem() MeasureItem() and DrawItem() functions as i am supposed to do. My problem is that when i call the DeleteString() function when i want to delete a an item in the listbox the DeleteItem() function in the class is never called! What is the difference between handeling the W and V classes in the ClassWizard? These are the messages in the ClassWizard that has the equal sign in front of the message name like this: =WM_DELETEITEM. In the description it stands that it's the message reflected from the control, but none of the messages that i map down to my class derived from the CListBox baseclass does work. Environment: VC++ 4.1 / Win 95 Any help or sample code would be helpful, PLEASE. Lars Schouw Software Engineer
Wolfgang Loch -- Wolfgang.Loch@RZ.TU-Ilmenau.DE Wednesday, July 24, 1996 Lars Schouw wrote: > My problem is that when i call the DeleteString() function when i > want to delete a an item in the listbox the DeleteItem() function in > the class is never called! Hi Lars. Have you checked the "Owner Draw" and "Has Strings" styles in the resource of your Listbox? Wolfgang -- /-------------------------------------------------\ | Wolgang Loch (Technical University of Ilmenau) | | e-mail: Wolfgang.Loch@rz.TU-Ilmenenau.DE | | www : http://www.rz.tu-ilmenau.de/~wolo | \-------------------------------------------------/
Lars Schouw -- ls@cybernet.dk Sunday, July 28, 1996 Hi Wolfgang. Yes the setting in the recource editor is a following: Selection: Extended. Owner draw: Variable. But the OnDelete() fuction is never called :(( Lars Schouw Software Engineer
Mike Blaszczak -- mikeblas@nwlink.com Thursday, August 01, 1996 At 03:57 PM 7/28/96 +1, you wrote: >But the OnDelete() fuction is never called :(( Does Spy++ say that the message is being sent? .B ekiM http://www.nwlink.com/~mikeblas/ These words are my own. I do not speak on behalf of Microsoft.
| Вернуться в корень Архива |