I need a property grid item that works like CXTPPropertyGridItem with combo button, but list that created upon pressing on combo button should have a checkboxes. So I created a new class CCustomListItem and inherit it from CXTPPropertyGridItem. Additionally I create a new class CInplaceCheckList, inherit it from CXTCheckListBox and add to it following methods from CXTPPropertyGridInplaceList: Create, DestroyItem, PostNcDestroy, DrawItem, MeasureItem, OnKillFocus, OnKeyDown, OnSysKeyDown, OnMouseActivate. Method Create is copied from CXTPPropertyGridInplaceList as is with only changes that instead of CListBox::CreateEx it calls CXTCheckListBox::CreateEx and some handling of checks is added. DrawItem currently just calls CXTCheckListBox::DrawItem. So, in method OnInplaceButtonDown of CCustomListItem I calls Create methos of my CInplaceCheckList object.
The problem is: In release version on first click on combo box control is showed and momentally resized to one pixel in height (maybe something else happened but it looks like resizing). But all keyboard navigation works as it should (I can select necessary element using UP or DOWN key and check\unckeck it using SPACE). To show control with normal height I need to select any normal property grid item after pressing on combo button of my item. Second problem - CInplaceCheckList control stays empty in all cases. Just white rectangle is showed. But all keyboard and mouse functions works as it should, e.g. I can freely check\uncheck any elements using mouse. In debug build all works well - on first click control has apropriate size and all elements are drawed correctly.
Do I miss something while creating my item? What should I do to make it works correctly in release build?
|