こんにちは
HFONT について教えてください
HFONT を(中身の構造)保存して、呼び出したいのですが、
HFONTからLOGFONT を取り出して、その構造体をテキストファイルに書き出しているのですが、
ofstream of;
LOGFONT hont;
of.open(filename,ios::out);
of << dec << hont.lfHeight << endl;
of << dec << hont.lfWidth << endl;
of << dec << hont.lfEscapement << endl;
of << dec << hont.lfOrientation << endl;
of << dec << hont.lfWeight << endl;
of << hex <<hont.lfItalic << endl;
of << hex << hont.lfUnderline << endl;
of << hex << hont.lfStrikeOut << endl;
of << hex << hont.lfCharSet << endl;
of << hex << hont.lfOutPrecision << endl;
of << hex << hont.lfClipPrecision << endl;
of << hex << hont.lfQuality << endl;
of << hex << hont.lfPitchAndFamily << endl;
of << hont.lfFaceName << endl;
こんな感じで
テキストファイルにはlfItalic とlfUnderline lfStrikeOut
は空白です。それを読み込んで、LOGFONT として、
それをHFONT に一つ筒今度は渡しているのですが、
アンダーラインも取り消し先もすべて、ついてしまうのです。
どうすればフォントの保存ができるのでしょうか。教えてください。