Petit probleme avec l'API win32
bonjour
Voila je desire implémenter une "listbox" pour ma petite application et je voudrais pouvoir modifier la police (font) du texte a afficher dans la "liste box". Le truc c'est que je n'y arrive pas ...
voici un bout de mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| hlistBox = CreateWindow("listbox" , ... );
hDC = GetDC(hlistBox);
font = CreateFont( -MulDiv(12,GetDeviceCaps(hDC,LOGPIXELSY),72) ,
0 ,
0 , 0 ,
FW_NORMAL ,
FALSE , FALSE , FALSE ,
DEFAULT_CHARSET ,
OUT_DEFAULT_PRECIS ,
CLIP_DEFAULT_PRECIS ,
ANTIALIASED_QUALITY ,
FF_ROMAN ,
"Times New Roman" );
SelectObject(hDC,font); |
Mais ce code ne marche pas
Quelqu'un peut m'aider svp ?
Re: Petit probleme avec l'API win32