Standard Choose Font Window.

Standard Choose Font Window.

ChooseFont

See version :

Pas de dépendances

Download :

#include <windows.h>
#include <tchar.h>
#include <stdio.h>

int main()
{
    int res;
    CHOOSEFONT  f;
    LOGFONT lf;
    ZeroMemory (&f, sizeof ( CHOOSEFONT ) );
    f.lStructSize = sizeof ( CHOOSEFONT );
    f.lpLogFont = &lf;
    f.Flags = CF_SCREENFONTS | CF_EFFECTS;
    res = ChooseFont(&f); 
    printf("code de sortie : %d\n",res);
    if (res==1)
    {
        _tprintf(_T("Nom font : %s\n"),lf.lfFaceName);
        printf("italic : %d\n",lf.lfItalic);
        printf("souligne : %d\n",lf.lfUnderline);
        printf("epaisseur(gras) : %d\n",lf.lfWeight);
        printf("taille : %d\n",f.iPointSize/10);
        printf("couleur : %X\n",f.rgbColors);
    }
    return 0;
}




Explanations

	No explanations yet.