I am developing an application to Windows Mobile(WM 5). Using CAB am installing the application on the mobile. My problem is that I have to use a different FONT in my application.

Can anyone provide me the code to install the font using c++/vc++?

What i know regarding this is
1. Copy the TTF file to windows\fonts file
2. Reboot the system.

But i couldn't do this.

Pls give me some solution.

Thanks & Regards
Prithvi

Hi mitrmkar
Thanks for your reply.
How to copy the TTF to windows\fonts folder.

Hi mitrmkar
Thanks for your reply.
How to copy the TTF to windows\fonts folder.

- select the file
- ctrl-c
- goto c:\windows\fonts with explorer
- ctrl-v

:)

Hi niek_e
Thanks for your reply.

I think I have done a mistake while replying for mitrmkar's post.

How i can copy a TTF to windows\fonts folder through my application. I meant through code.

TTF file will be on my desktop & this application can be installed on any windows mobile. This may be a silly question. But I could not solve this.

Hi

I was able to solve this.

Hope the solution may help for others also.

We have a CAB file. So goto vc++ editor.

Right click on CAB project(EX: APP_CAB)

Select View -> File System.

Add windows Folder.(If have not added it previously)

Create a Folder with Name 'Fonts'

Right Click on Fonts

Add your TTF file to this folder.

Build the application and install it on Mobile.

You can use ::AddFontResource(L"FontName") . For more info regarding this API see msdn.

But this gives prob while uninstalling. without this API also Application works fine.

cheers,
Prithvi