CXTPPropertyGridItemFont have no StringToFont ? |
Post Reply |
Author | |
czlai
Groupie Joined: 18 December 2006 Location: Taiwan Status: Offline Points: 35 |
Post Options
Thanks(0)
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 ?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
czlai
Groupie Joined: 18 December 2006 Location: Taiwan Status: Offline Points: 35 |
Post Options
Thanks(0)
|
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |