Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridInplaceList - derivation.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridInplaceList - derivation.

 Post Reply Post Reply
Author
Message
Kevin6 View Drop Down
Groupie
Groupie


Joined: 13 May 2005
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kevin6 Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridInplaceList - derivation.
    Posted: 05 October 2005 at 7:35am

Oleg,

I would like to be able to customise some of the functionality of the ListBox control in the PropertyGrid.

I do not understand how I am supposed to do this as the class construction makes this difficult to understand.

There are no examples that I can find in the Samples to help me with this.

I would appreciate some advice.

regards

Richard

Kevin.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 October 2005 at 8:05am

in 9.80 was added CXTPPropertyGrid::SetInplaceList to set custom inplace list

m_wndGrid.SetInplaceList (new CMyInplaceList);

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kevin6 View Drop Down
Groupie
Groupie


Joined: 13 May 2005
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kevin6 Quote  Post ReplyReply Direct Link To This Post Posted: 05 October 2005 at 8:30am

Dear Oleg,

 As ever many thanks for your reply - I am able to continue with my development.

I have search for -: SetInplaceList

in the help/documentation but it is not documented. Please can you add it to the documentation list.

regards

Richard

ps. I am using ver 9.70

Kevin.
Back to Top
Cedric View Drop Down
Newbie
Newbie


Joined: 27 October 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cedric Quote  Post ReplyReply Direct Link To This Post Posted: 25 January 2006 at 5:36am

Hye. I tried to inherit CTXPropertyGridInplaceList, to draw something different than text. drawing of GridItem is fine. But when I to show my InplaceList when AddString message is occur i got an execption error.

Where I'm wrong ?

I join a sample with my problem

2006-01-25_053544_GridSample.zip

PS: My Item is "Style" in global setting and I worked with 9.80

Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 January 2006 at 9:31am

Standard List created with LBS_STRING style.

I suggest you to change logic something like:

CStyleItem::CStyleItem( CString _Caption )
 : CXTPPropertyGridItem( _Caption )
{
 m_nFlags = xtpGridItemHasComboButton;
 m_StyleList.m_pItem = this;

 //SOLID epaisseur 1 a cause du system NT
 AddStyleItem(PS_SOLID,1);
 
 //Traits exotiques

 AddStyleItem( PS_DOT, 2 );
 AddStyleItem( PS_DASH, 2 );
 AddStyleItem( PS_DASHDOT, 2 );
 AddStyleItem( PS_DASHDOTDOT, 2 );

 //Ajouter les Úpaisseurs "SOLID" >1
 AddStyleItem( PS_SOLID, 2 );
 AddStyleItem( PS_SOLID, 3 );
 AddStyleItem( PS_SOLID, 4 );
 AddStyleItem( PS_SOLID, 5 );
 AddStyleItem( PS_SOLID, 7 );
 AddStyleItem( PS_SOLID, 9 );
 AddStyleItem( PS_SOLID, 11 );
}

void CStyleItem::AddStyleItem(int style,int epaisseur)
{
 // add a listbox item
 DWORD stockval = MAKELONG((style & PS_STYLE_MASK)|PS_GEOMETRIC, epaisseur);
 GetConstraints()->AddConstraint(_T("Item"), stockval);
}

to move items to constraints of Items.

and drawing:

void CStyleItemList::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct )
{
 CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
 CXTPPropertyGridItemConstraint* p = (CXTPPropertyGridItemConstraint*)lpDrawItemStruct->itemDa ta;
 DWORD a = p->m_dwData;

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Cedric View Drop Down
Newbie
Newbie


Joined: 27 October 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cedric Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2006 at 3:32am
Thanks it's worked.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.