gamecocks
February 16th, 2005, 03:38 PM
I have two combo box, One depends on other. I choose different type in first one. Second one show different list. How to make them related each other. Thanks.
|
Click to See Complete Forum and Search --> : how to do? gamecocks February 16th, 2005, 03:38 PM I have two combo box, One depends on other. I choose different type in first one. Second one show different list. How to make them related each other. Thanks. indiocolifa February 16th, 2005, 04:47 PM It's not difficult. See the Combobox control reference in the Platform SDK. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/comboboxes/comboboxes.asp TO handle the first combobox changes, handle the CBN_SELCHANGE message. In this handling code, you can checkup what element was selected with the CB_GETCURSEL message. According to this info, you can set the second combo selection sending a CB_SETCURSEL message to it. You can use CB_SETITEMDATA to associate a value with each item -- this way, it's easier to checkout what's selected on the combo. Hope this helps. gamecocks February 16th, 2005, 05:02 PM Do you provide some example? Thanks gamecocks February 16th, 2005, 05:07 PM how to let first combobox to issue CBN_SELCHANGE? In Class Wizard Message Tap. In Object ID box, I can't find first combobox ID. Thanks JohnCz February 18th, 2005, 05:02 PM Something tells me that you are using MFC not Windows API. Are you? codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |