Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridItemFont have no StringToFont ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridItemFont have no StringToFont ?

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

Joined: 18 December 2006
Location: Taiwan
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote czlai Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridItemFont have no StringToFont ?
    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 ?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
czlai View Drop Down
Groupie
Groupie
Avatar

Joined: 18 December 2006
Location: Taiwan
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote czlai Quote  Post ReplyReply Direct Link To This Post 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.
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.