I have an array of 1000 strings to load into a combo box. What is the fastest way to load the array of strings into the combo box?
Is there some way other than iterating over the list of strings, putting each string into the combo box one at a time?
And how to copy the combo box data once loaded to some 10 other combo boxes?
If you have 1,000 strings repeated in 10 comboboxes, you may want to consider using an owner drawn combobox, which draws the strings on the fly based on indices into your array, rather than storing them in the combobox at all. Way faster, way more memory efficient. Check out the DrawItem method and DRAWITEMSTRUCT structure in the on-line help. Basically, you would do something like using InitStorage and InsertString (as mentioned by NuSonic) to create your 1000 blank items in your combobx, and override DrawItem to extract and draw the required string, based on index, as it needs to be drawn.