Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Install Font

Status
Not open for further replies.

JRudisill

Programmer
Aug 4, 2003
54
US
I am trying to install a barcode font. I copy the font to Fonts Directory then use AddFontResource(). All this works except I have to exit the program and then launch it again to be able to use the Barcode. I hope someone can take a look at this and tell me where I am going wrong. Any help is appreciated.


EX:
string cFont = GetPath()+(@"\3OF9.TTF");
const int WM_FONT = 0x001D;
IntPtr HW_BROAD = (IntPtr) 0xFFFF;

SendMessage(HW_BROAD,WM_FONT,0,0);
AddFontResource(cFont);
SendMessage(HW_BROAD,WM_FONT,0,0);
 
Maybe there is a need to call RemoveFontResource(cFont); or post more code.
obislavu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top