Print Page | Close Window

CXTPPropertyGridItemFont have no StringToFont ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=8261
Printed Date: 22 November 2024 at 11:37am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGridItemFont have no StringToFont ?
Posted By: czlai
Subject: CXTPPropertyGridItemFont have no StringToFont ?
Date Posted: 02 October 2007 at 4:48am
I use CXTPPropertyGridItemFont::FontToString() to store a font.
But, why it have no StringToFont() that I can restore it ?



Replies:
Posted By: Oleg
Date Posted: 02 October 2007 at 5:53am
Hi,
 
Think you have save/load LOGFONT instead of string. Get and Set it using pItem->GetFont() and pItem->SetFont.


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


Posted By: czlai
Date Posted: 02 October 2007 at 9:07pm

Because of LOGFONT is a binary structure, it is hard to store into a file and edited by general text editor like NotePad.

I wish to use FontToString() that convert the FONT into a String and store it into .ini with ::WritePrivateProfileString(), then restore the FONT with ::GetPrivateProfileString() and StringToFont().
Because I saw CXTPPropertyGridItemColor::RGBToString() and StringToRGB(), I think it's better that codejoke provide FontToString() and StringToFont() pair.



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