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