How can i Install TTF font through program
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, How can i Install TTF font through program in RunTime.??? Thanks
-
Hi, How can i Install TTF font through program in RunTime.??? Thanks
TCHAR chFontPath[MAX_PATH] = { 0 }; ExpandEnvironmentStrings( _T( "%windir%\\fonts\\"), chFontPath, MAX_PATH); if( S_OK == StringCchCat( chFontPath, MAX_PATH, _T("samplefont.ttf"))) { CopyFile( _T("path_samplefont.ttf"),chFontPath, TRUE ); }
You may need administrator permission to do this operation-Sarath. "Great hopes make everything great possible" - Benjamin Franklin
My blog - Sharing My Thoughts, An Article - Understanding Statepattern