Print Page | Close Window

SetFont doesn't work

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=23862
Printed Date: 19 April 2024 at 4:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SetFont doesn't work
Posted By: navap
Subject: SetFont doesn't work
Date Posted: 11 June 2019 at 6:21am
I am using CXTPToolTipContext object to display tooltip in my code, However when I try to create a new font and try to set font it fails to display any tooltip . However when I comment out the set font ,everything works fine . 

Code : 
 CFont *cf =new CFont();  
 cf->CreateFont(-12, 5, 0, 0, FW_LIGHT, 0, 0, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 0, "MS UI Gothic");
  m_ToolTip.SetFont(cf);


-------------
Thanks,
Navap



Replies:
Posted By: BobC
Date Posted: 28 June 2019 at 6:38pm
The code you posted is not checking the return code of CreateFont(), so are you sure the font was created?



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