09-08-2015, 01:02 PM
Ahhh. For some silly reason, I checked stack overflow but didn't go directly to MSDN. I am a big boy now and should be able to do some of these things myself!
https://msdn.microsoft.com/en-us/library...s.85).aspx
Here are a few CB extensions from just a few minutes of work on the MSDN site:
Function CB_ShowDropDown
Function CB_GetDroppedState
Function CB_ToggleDroppedState
Function CB_SetItemHeight
I could do more when I have more time.
Stuart
https://msdn.microsoft.com/en-us/library...s.85).aspx
Here are a few CB extensions from just a few minutes of work on the MSDN site:
Function CB_ShowDropDown
;/
function# hwnd [flags] ;;flags: 0 open dropdown (default), 1 close dropdown
;;Show or hide the list box of a combo box that has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.
;hwnd - control handle.
if(flags&1)
,SendMessage(hwnd CB_SHOWDROPDOWN 0 0)
else
,SendMessage(hwnd CB_SHOWDROPDOWN 1 0)
Function CB_GetDroppedState
;/
function# hwnd
,;Determines whether the list box of a combo box is dropped down.
;hwnd - control handle.
ret SendMessage(hwnd CB_GETDROPPEDSTATE 0 0)
,
Function CB_ToggleDroppedState
;/
function# hwnd
,;Toggles dropped state of list box of a combo box
;hwnd - control handle.
;Return value = toggled state (1 open, 2 closed)
if(SendMessage(hwnd CB_GETDROPPEDSTATE 0 0))
,CB_ShowDropDown(hwnd 1)
,ret 0
else
,CB_ShowDropDown(hwnd)
,ret 1
,
,
Function CB_SetItemHeight
;/
function# hwnd CbComponent height;; CbComponent: -1 set height of selection field, 0 height of list items, zero-based index of a specific list item (combo box must have CBS_OWNERDRAWVARIABLE style).
;Set height of list items or selection field in a combo box
;Returns 0 if successfully set, -1 if error
,
;hwnd - control handle.
ret SendMessage(hwnd CB_SETITEMHEIGHT CbComponent height)
,
I could do more when I have more time.
Stuart