Print Page | Close Window

ASSERTION in Version 10

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4034
Printed Date: 10 November 2025 at 10:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ASSERTION in Version 10
Posted By: Uwe Keim
Subject: ASSERTION in Version 10
Date Posted: 20 April 2006 at 3:40am

The following line generates an ASSERTion:

------------------------------------
> ToolkitPro1010vc71UD.dll!CXTPFontDC::SetFont(CFont * pFont=0x00000000)  Zeile 303 + 0x19 C++
  ToolkitPro1010vc71UD.dll!CXTPFontDC::CXTPFontDC( CDC * pDC=0x00127410, CFont * pFont=0x00000000)  Zeile 280 C++
  ToolkitPro1010vc71UD.dll!CXTButtonTheme::DrawBut tonText(CDC * pDC=0x00127410, unsigned int nState=0x00000000, CRect & rcItem={...}, CXTButton * pButton=0x05d28a28)  Zeile 210 + 0x25 C++
  ToolkitPro1010vc71UD.dll!CXTButtonTheme::DrawIte m(tagDRAWITEMSTRUCT * lpDIS=0x001270dc, CXTButton * pButton=0x05d28a28)  Zeile 493 + 0x1d C++
  ToolkitPro1010vc71UD.dll!CXTButton::DrawItem(tag DRAWITEMSTRUCT * lpDIS=0x001270dc)  Zeile 156 + 0x29 C++
------------------------------------

It is the first ASSERT in the following function:

-------------------------------------
void CXTPFontDC::SetFont(CFont* pFont)
{
ASSERT(pFont);
ASSERT(m_pDC);
if(m_pDC && pFont)
{
CFont* pFontPrev = m_pDC->SelectObject(pFont);
if(!m_pOldFont && pFontPrev)
{
m_pOldFont = pFontPrev;
}
}
}
-------------------------------------

Could you tell me how to avoid this?

Thanks
Uwe




Replies:
Posted By: Oleg
Date Posted: 20 April 2006 at 3:55pm

Hello,

It just mean that CButton::GetFont returns NULL.

Just create some font and apply it to button.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Uwe Keim
Date Posted: 20 April 2006 at 10:22pm

Well, again doing unnecessary modifications .

I really love your library, but I do hate that lots of extra-work that I have to perform after every version-update.

How can I sell this to my customers that I have to spend hours again, just after updating a GUI-library...




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net