Re: Drop down list


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by jim guerber (66.180.141.206) on November 06, 2003 at 00:01:40: Uploaded files: 1

In Reply to: Re: Drop down list posted by Stephen Auerbach on November 05, 2003 at 14:33:04:

Ok. So I spent a couple of hours and I made a sample program for you. I started with the ctldemo combo box demo program. I then discovered how to get notified every character the user types into the edit control part of the combo box. I then reset the contents of the combo box (maybe not necessary), and generate 25 lines starting with whatever the user entered. The trick was to put back the entry into the edit box and position the caret to the end of this data.

When the user clicks ok or cancel, I retrieve whatever is selected and put it up in a message box.

To do this program, I had to consult google, especially the msdn site from microsoft. I also compiled the program with the listing switch on, and looked at the listing file to see what other routines I could call for the combo box. I also used windows.inc from the wdl directory to find messages I could use.

This code may not be entirely correct, but it works the way I wanted. Maybe someone else could look at the code and suggest a better way.


Follow Ups: