Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - DrawTextEx : is not a member of "CXTPPaintManager"
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DrawTextEx : is not a member of "CXTPPaintManager"

 Post Reply Post Reply
Author
Message
shanmuganathan View Drop Down
Groupie
Groupie
Avatar

Joined: 01 December 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote shanmuganathan Quote  Post ReplyReply Direct Link To This Post Topic: DrawTextEx : is not a member of "CXTPPaintManager"
    Posted: 08 December 2006 at 5:42am
Hi
 
When we execute our code using latest XtremeToolkit (10.3.1) we face the following error.
 
D:\Sample_Workspace_toTest_Xtreme\Sample workspace\MainFrm.cpp(159) : error C2039: 'DrawTextExA' : is not a member of 'CXTPPaintManager'
D:\Sample_Workspace_toTest_Xtreme\Sample workspace\MainFrm.cpp(207) : error C2039: 'DrawTextExA' : is not a member of 'CXTPPaintManager'
Guide us what to do.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 08 December 2006 at 10:55am
Hello,
Yes, sorry was changed. use DrawControlText method:
 
 
CSize CControlStatic::GetSize(CDC* pDC)
{
 // This function is used to determine the size
 // of the bounding rectangle of the text.  The
 // function returns the size of the rectangle in
 // a CSize object.
 // Determine if the toolbar is docked horizontally or vertically.
 BOOL bVert = GetParent()->GetPosition() == xtpBarRight || GetParent()->GetPosition() == xtpBarLeft;
 // Instantiate an empty CRect object to hold the
 // size of the bounding rectangle of the text.
 CXTPEmptyRect rcText;
 // Function declaration for the DrawTextEx function:
 //  CSize DrawTextEx(
 //      CDC*    pDC,                A pointer to the current device context.
 //      CString str,                A CString object that contains the text to draw.
 //      CRect   rcText,             A CRect object that is used to hold the size of the bounding rectangle of the text.
 //      BOOL    bDraw,              If TRUE, then the text is drawn.  If FALSE, then the function returns the size of the bounding rectangle of the text.
 //      BOOL    bVert,              TRUE if the toolbar is docked in a vertical position.
 //      BOOL    bCentered,          TRUE if the text is drawn centered.
 //      BOOL    bTriangled,         If TRUE, then an arrow is drawn at the end of the text.
 //      BOOL    bEmbosssed = FALSE, TRUE to draw the text embossed.
 //  );
 // Do not draw the text, just get the size of the bounding rectangle of the text.
 CSize sz = GetPaintManager()->DrawControlText(pDC, this, &rcText, FALSE, bVert, FALSE, FALSE);
 // If the toolbar is docked in a vertical position,
 // then the minimum width of the bounding rectangle is 22.
 // The height of the bounding rectangle is the length of the text.
 if (bVert)
  return CSize(max(22, sz.cx), sz.cy);
 // If the toolbar is drawn in a horizontal position, then
 // the length of the bounding rectangle is the length of the text.
 // The height of the bounding rectangle is a minimum of 22.
 return CSize(sz.cx, max(22, sz.cy));
}
void CControlStatic::Draw(CDC* pDC)
{
 // Determine if the toolbar is docked horizontally or vertically.
 BOOL bVert = GetParent()->GetPosition() == xtpBarRight || GetParent()->GetPosition() == xtpBarLeft;
 // Get the bounding rectangle of the control.
 CRect rcText = GetRect();
 // Function declaration for DrawControlEntry:
 // DrawControlEntry(
 //      CDC*            pDC,         Pointer to a valid device context
 //      CRect           rc,          Rectangle to draw.
 //      BOOL            bEnabled,    TRUE if the control is enabled.
 //      BOOL            bSelected,   TRUE if the control is selected.
 //      BOOL            bPressed,    TRUE if the control is pushed.
 //      BOOL            bChecked,    TRUE if the control is checked.
 //      BOOL            bPopuped,    TRUE if the control is popuped.
 //      XTPBarPosition  barPosition, Parent's bar position.
 //  );
 // This method is called to fill the control's face.
 pDC->SetTextColor(GetPaintManager()->GetRectangleTextColor(FALSE, FALSE, GetEnabled(), FALSE, FALSE, GetParent()->GetType(), GetParent()->GetPosition()));
 // Function declaration for the DrawTextEx function:
 //  CSize DrawTextEx(
 //      CDC*    pDC,                A pointer to the current device context.
 //      CString str,                A CString object that contains the text to draw.
 //      CRect   rcText,             A CRect object that is used to hold the size of the bounding rectangle of the text.
 //      BOOL    bDraw,              If TRUE, then the text is drawn.  If FALSE, then the function returns the size of the bounding rectangle of the text.
 //      BOOL    bVert,              TRUE if the toolbar is docked in a vertical position.
 //      BOOL    bCentered,          TRUE if the text is drawn centered.
 //      BOOL    bTriangled,         If TRUE, then an arrow is drawn at the end of the text.
 //      BOOL    bEmbosssed = FALSE, TRUE to draw the text embossed.
 //  );
 // GetEnabled() returns TRUE if the control is enabled; otherwise FALSE.
 GetPaintManager()->DrawControlText(pDC, this, &rcText, TRUE, bVert, TRUE, FALSE);
}
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.031 seconds.