Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
popfont.c File Reference
#include <windows.h>
#include <commdlg.h>

Go to the source code of this file.

Functions

BOOL PopFontChooseFont (HWND hwnd)
void PopFontInitialize (HWND hwndEdit)
void PopFontSetFont (HWND hwndEdit)
void PopFontDeinitialize (void)

Variables

static LOGFONT logfont
static HFONT hFont

Function Documentation

Definition at line 49 of file popfont.c.

     {
     CHOOSEFONT cf ;

     cf.lStructSize      = sizeof (CHOOSEFONT) ;
     cf.hwndOwner        = hwnd ;
     cf.hDC              = NULL ;
     cf.lpLogFont        = &logfont ;
     cf.iPointSize       = 0 ;
     cf.Flags            = CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS
                                                  | CF_EFFECTS ;
     cf.rgbColors        = 0L ;
     cf.lCustData        = 0L ;
     cf.lpfnHook         = NULL ;
     cf.lpTemplateName   = NULL ;
     cf.hInstance        = NULL ;
     cf.lpszStyle        = NULL ;
     cf.nFontType        = 0 ;               // Returned from ChooseFont
     cf.nSizeMin         = 0 ;
     cf.nSizeMax         = 0 ;

     return ChooseFont (&cf) ;
     }

Here is the caller graph for this function:

Definition at line 91 of file popfont.c.

     {
     DeleteObject (hFont) ;
     }

Here is the caller graph for this function:

void PopFontInitialize ( HWND  hwndEdit)

Definition at line 73 of file popfont.c.

     {
     GetObject (GetStockObject (SYSTEM_FONT), sizeof (LOGFONT),
                                              (LPSTR) &logfont) ;
     hFont = CreateFontIndirect (&logfont) ;
     SendMessage (hwndEdit, WM_SETFONT, hFont, 0L) ;
     }

Here is the caller graph for this function:

void PopFontSetFont ( HWND  hwndEdit)

Definition at line 81 of file popfont.c.

     {
     HFONT hFontNew ;

     hFontNew = CreateFontIndirect (&logfont) ;
     SendMessage (hwndEdit, WM_SETFONT, hFontNew, 0L) ;
     DeleteObject (hFont) ;
     hFont = hFontNew ;
     }

Here is the caller graph for this function:


Variable Documentation

HFONT hFont [static]

Definition at line 47 of file popfont.c.

LOGFONT logfont [static]

Definition at line 46 of file popfont.c.