VOGONS


First post, by red-ray

User metadata
Rank Oldbie
Rank
Oldbie

I have discovered my CBS_DROPDOWNs do not work on pre XP systems and am wonder if there is some way to make them work please?

I can scroll through the list by using Up/Down Arrow, but both Alt/Down Arrow and selecting the Dropdown don't do anything. The Combo Box Dropdown that is within the ChooseFont() works, so I feel there may be a "magic incantation".

Below is that I get on Windows NT V4.00 SP6a and what happens when I run the same SIV32L on Windows 10 in debug mode using the save file from Windows NT.

file.php?id=217817

Last edited by red-ray on 2025-04-25, 21:20. Edited 2 times in total.

Reply 1 of 3, by red-ray

User metadata
Rank Oldbie
Rank
Oldbie

Progress, I found an incantation, now I need to figure out how to get a vertical scroll bar into the dropdown list.

file.php?id=217821

Reply 2 of 3, by Falcosoft

User metadata
Rank l33t
Rank
l33t

In case of comctl32.dll version 6+ (XP themes enabled) you can send CB_SETMINVISIBLE message for a ComboBox control to set the number of visible items.
But in case of pre-version 6 common control library this does not work. The old way to set dropdown height was to set the required dropdown height as the height of the control in the dialog box template.
E.g. this sets height to 150

 COMBOBOX    IDC_DROPDOWN1,10,10,100,150,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP

Of course you can also set the dropdown height programmatically at runtime by calling SetWindowPos() with the required width/height and SWP_NOMOVE flag set.
The visibility of the vertical scrollbar should be automatic. If you have fewer elements then the set height then there is no vertical scrollbar otherwise there is.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 3 of 3, by red-ray

User metadata
Rank Oldbie
Rank
Oldbie

Thank you for you post. I should have specified I don't use a resource file for the SIV panels, they are all created on-the fly then I call DialogBoxIndirectParam(), well on W9x for the first 255 controls and SIV adds the rest in the init routine.

Looking at your post I noted the WS_VSCROLL, added it and now I get scroll bars. I first used ComboBox_SetMinVisible() when I customised ChooseFont() and use it on the Combo Boxes I create.

file.php?id=217830

It looks like with comctl32.dll version 6+ you can get away with things that won't work pre V6.