Bonjour,

Je voudrais fixer la hauteur de la combobox et non celui de sa liste (la liste fait 100 pixels de hauteur).

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
hCombo=CreateWindow("COMBOBOX","",WS_CHILD|WS_VISIBLE| CBS_DROPDOWN,10,10,100,100,hWnd,NULL,hInstance,NULL);

   COMBOBOXINFO info={0};
   info.cbSize=sizeof(COMBOBOXINFO);
   GetComboBoxInfo(hCombo,&info);

   RECT rc;
   GetClientRect(info.hwndCombo,&rc);
   SetWindowPos(info.hwndCombo,NULL,0,0,rc.right,50,SWP_NOMOVE);
    GetClientRect(info.hwndCombo,&rc);
à la fin rc.bottom est toujours égal à celui attribuer par windows au moment de sa création.

Comment le forcer ?

Merci