Page 120 - DCAP408_WEB_PROGRAMMING
P. 120

Windows Programming




                    Notes























                                     Notes  We use fg_fontload() to activate a stock font, but we utilize fg_logfont() to turn on
                                     a logical font.

                                   As displayed in the Fontdemo program’s WM_DESTROY message handler, you should use the
                                   Windows API function DeleteObject() to remove any logical fonts you create. It is not essential
                                   to erase stock fonts.

                                   Self Assessment

                                   Fill in the blanks:
                                   10.  The Windows API functions CreateFont() or CreateFontIndirect() generate .........................
                                       fonts.
                                   11.  We use fg_fontload() to activate a stock font, but we utilize ......................... to turn on a
                                       logical font.

                                   7.9 Text Metric

                                   Text Metric is a font structure contains basic information about a physical font.
                                   typedef  struct  tagTEXTMETRIC  {
                                       LONG  tmHeight;
                                       LONG  tmAscent;
                                       LONG  tmDescent;
                                       LONG  tmInternalLeading;
                                       LONG  tmExternalLeading;
                                       LONG  tmAveCharWidth;
                                       LONG  tmMaxCharWidth;
                                       LONG  tmWeight;
                                       LONG  tmOverhang;
                                       LONG  tmDigitizedAspectX;






          114                               LOVELY PROFESSIONAL UNIVERSITY
   115   116   117   118   119   120   121   122   123   124   125