Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - SetFont doesn't work
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetFont doesn't work

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

Joined: 11 June 2019
Location: India
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote navap Quote  Post ReplyReply Direct Link To This Post Topic: SetFont doesn't work
    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
Back to Top
BobC View Drop Down
Groupie
Groupie


Joined: 28 April 2017
Location: Longmont, CO
Status: Offline
Points: 55
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobC Quote  Post ReplyReply Direct Link To This Post 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?
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.188 seconds.