![]() |
CXTPControlPopupColor overloaded member problem |
Post Reply
|
| Author | |
terrym
Senior Member
Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPControlPopupColor overloaded member problemPosted: 26 September 2007 at 9:19pm |
|
I have overloaded the Draw method for CXTPControlPopupColor however it seems to draw strange, I copied the code from the actual XTP library for Draw (so same code), except change m_clr (as it is private) to GetColor() Any ideas why this is drawing strange, below it is drawn wrong (see color group)
![]() and below is drawn correct (see color group)
![]() |
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 September 2007 at 1:10am |
|
Hi,
Show code you have.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
terrym
Senior Member
Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 September 2007 at 7:46am |
|
We have the following code for our draw:
void CMyXTPControlPopupColor::Draw( CDC *pDC )
{ CXTPPaintManager* pPaintManager = GetPaintManager(); CXTPFontDC font (pDC, pPaintManager->GetRegularFont()); pPaintManager->DrawControlEntry(pDC, this); pDC->SetTextColor(pPaintManager->GetControlTextColor(this)); CRect rcText = GetRect(); pPaintManager->DrawControlText(pDC, this, &rcText, TRUE, FALSE, TRUE, FALSE); if ( GetColor() != COLORREF_NULL){ #define XTP_SELECTOR_SIZE 18 CRect rcButton(CPoint(m_rcControl.left + 2, m_rcControl.CenterPoint().y - XTP_SELECTOR_SIZE / 2), CSize(XTP_SELECTOR_SIZE, XTP_SELECTOR_SIZE)); rcButton.DeflateRect(3, 3); if (GetEnabled()) pDC->FillSolidRect(rcButton, GetColor()); pDC->Draw3dRect(rcButton, GetXtremeColor(COLOR_3DSHADOW), GetXtremeColor(COLOR_3DSHADOW));} } |
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
![]() |
|
terrym
Senior Member
Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 September 2007 at 7:59am |
|
Basically rather than the thin coloured line that shows, I want to draw a square coloured image based on the selected colour
|
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
![]() |
|
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 |