CXTPPropertyGridItemColor and No Fill |
Post Reply |
Author | |
AliRafiee
Groupie Joined: 06 May 2004 Status: Offline Points: 32 |
Post Options
Thanks(0)
Posted: 18 June 2004 at 10:01am |
I am trying to use a CXTPPropertyGridItemColor for a fill color property. In the OnInplaceButtonDown method I create a CXTColorPopup derived class with the CPS_XT_NOFILL style. Within that class I catch the CPN_XT_SELNOFILL message. Here is where I am having problems. What value would I set the CXTPPropertyGridItemColor's value to in order for the grid item to display a no color indicator? Thanks Ali |
|
AliRafiee
Groupie Joined: 06 May 2004 Status: Offline Points: 32 |
Post Options
Thanks(0)
|
I ended up modifing CXTPPropertyGridItemColor in order to solve the problem. If anyone knows a better way please let me know. Ali I have defined No fill as 0xFFFFFFFF, and made the following changes: //Draw a box with an X for No Fill BOOL CXTPPropertyGridItemColor::OnDrawItemValue(CDC& dc, CRect rcValue) dc.DrawText( m_strValue, rcText, DT_SINGLELINE|DT_VCENTER); return TRUE;
CString strRed, strGreen, strBlue; return RGB(__min(_ttoi(strRed), 255), __min(_ttoi(strGreen), 255), __min(_ttoi(strBlue), 255)); CString CXTPPropertyGridItemColor::RGBToString(COLORREF clr) CString str; |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |