OwnerDrawn WC_COMBOBOX, anzahl der angezeigten items in DropList begrenzen
-
Hi leute,
ich habe irgendwie vergessen wie man die anzahl der zu anzuzeigende elemente in einer OwnerDrawn DropDown ListBox begrenzt.... Ich hatte irgendwie in erinnerung das ich das über die höhe einstellen muss,... aber irgendwie klappt das nicht so ganz...
winf.dwExStyle=WS_EX_LEFT; winf.lpClassName=WC_COMBOBOX; winf.lpWindowName=NULL; winf.dwStyle=WS_CHILD | WS_VISIBLE|CBS_DISABLENOSCROLL|CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED|CBS_HASSTRINGS|WS_VSCROLL|WS_TABSTOP; ... //setting the item height for editfield SendMessage(hWnd,CB_SETITEMHEIGHT,(WPARAM)0,(LPARAM)itemHeight); //now we are setting the selection field SendMessage(hWnd,CB_SETITEMHEIGHT,(WPARAM)-1,(LPARAM)itemHeight); //now we are setting the minimum visible items SendMessage(hWnd,CB_SETMINVISIBLE,(WPARAM)minVisible,(LPARAM)0); //Moving the window MoveWindow(hWnd,rct.left,rct.top,rct.right,rct.bottom,TRUE);
könnt ihr mir mal bitte schnell auf die sprünge helfen?
greetz
-
Eigentlich sollte das über
CB_SETMINVISIBLE
funktionieren. Mal (vielleicht) 'ne blöde Frage: Den HinweisMSDN schrieb:
To use CB_SETMINVISIBLE, the application must specify comctl32.dll version 6 in the manifest.
hast du beachtet, oder?
-
Jo hab ich:
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'