0
J'ai essayé de changer la police de la sortie dans la fenêtre en utilisant l'API Win32. Voici ce que j'ai fait, mais ça ne marche pas. Que devrais-je faire?Changer la police d'un texte dans Win32
hdc = BeginPaint(hWnd, &ps);
hFont = CreateFont(y_position, closest_match, escapement, orientation, FW_DONTCARE,
no_italic, no_ul, no_xout, ANSI_CHARSET,
OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DRAFT_QUALITY, VARIABLE_PITCH,
TEXT("Tekton Pro")/*"SYSTEM_FIXED_FONT"*/);
SetTextColor(hdc, RGB(255, 0, 0));
TextOut(hdc, 50, y_position, TEXT("test"), strlen("test"));
// TODO: Add any drawing code that uses hdc here...
EndPaint(hWnd, &ps);
DeleteObject(hFont);
ressources Leaking grand temps ici –
Oui .... Espérons que vous appelez DeleteObject (hFont); après utilisation – Naidu