Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Problem with creating inplace list with checkboxes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with creating inplace list with checkboxes

 Post Reply Post Reply
Author
Message
Xelloss View Drop Down
Newbie
Newbie


Joined: 11 January 2009
Location: Russian Federation
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xelloss Quote  Post ReplyReply Direct Link To This Post Topic: Problem with creating inplace list with checkboxes
    Posted: 22 April 2009 at 3:16am
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?
Back to Top
Xelloss View Drop Down
Newbie
Newbie


Joined: 11 January 2009
Location: Russian Federation
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xelloss Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2009 at 4:26am
No help here...
But I already find solution. Issue happens because lack of #include <XTToolkitPro.rc> in project rc2 file...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.