Bonjour,
je voudrais changer la police et la taille des characteres dans une edit box. J'ai fait ceci dans mon InitDialog, mais ça n'a aucun effet. Je ne comprend pas trop. Si quelqu'un pouvais m'expliquer ...
HFONT hFont ;
LOGFONT Fonte ;
Fonte.lfHeight=0;
Fonte.lfWidth=0;
Fonte.lfEscapement=0;
Fonte.lfOrientation=0;
Fonte.lfWeight=FW_NORMAL;
Fonte.lfItalic=FALSE;
Fonte.lfUnderline=FALSE;
Fonte.lfStrikeOut=0;
Fonte.lfCharSet=DEFAULT_CHARSET;
Fonte.lfOutPrecision=OUT_RASTER_PRECIS;
Fonte.lfClipPrecision=CLIP_DEFAULT_PRECIS;
Fonte.lfQuality=DEFAULT_QUALITY;
Fonte.lfPitchAndFamily=DEFAULT_PITCH | FF_DONTCARE ;
strcpy(Fonte.lfFaceName, TEXT("Arial"));
hFont=CreateFontIndirect(&Fonte) ;
if (!hFont)
MessageBox(hwnd, "Impossible de charger la fonte... CreateFontIndirect() renvoie NULL", "Erreur", MB_ICONERROR);
else
SendMessage(GetDlgItem(hwnd, IDC_EDIT_HEURE),WM_SETFONT,(WPARAM)hFont,MAKELPARAM(TRUE,0)); ....
Glipper