home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1523 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!mips!darwin.sura.net!jvnc.net!nuscc!iti.gov.sg!news
  2. From: kwanghan@iti.gov.sg (Tan Kwang Han)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Loading Fonts created with Font Editor
  5. Keywords: Loading FONTS
  6. Message-ID: <1992Aug27.120508.12307@iti.gov.sg>
  7. Date: 27 Aug 92 12:05:08 GMT
  8. Sender: news@iti.gov.sg (News Admin)
  9. Organization: Information Technology Institute, National Computer Board, S'pore
  10. Lines: 20
  11.  
  12. I created some new characters using the font editor in WINSDK
  13. After decalring them  in my .RC file  as 999 FONT MyFont.FNT
  14. I proceed to load the font resource with
  15. handle = LoadResource(hInstance, FindResource(hInstance,"#999",RT_FONT));
  16. hFont = (LPHANDLE) LockResource(handle);
  17.  
  18. SelectObject(hDC,hFont);
  19. TextOut(hDC,x,y,szMsg,sizeof(szMsg));
  20.  
  21. The output defaulted to the system fonts.
  22.  
  23. I substituted the LoadResource().. LockResource() 
  24. to AddFontResource("MyFont.Fnt") to no relief either.
  25.  
  26. Can someone help or better still any sample code :)
  27. ---
  28. TAN Kwang Han                       /* All comments are mine alone */
  29. Information Technology Institute,      National Computer Board, Singapore
  30. Internet : kwanghan@iti.gov.sg       | Voice : (65) 7720 548
  31. Bitnet   : kwanghan@itivax.bitnet    | Fax   : (65) 7795 966
  32.