Duplicate entries in drop down box
- From: "whiskers" <whisk3rs@xxxxxxx>
- Date: 18 Aug 2006 15:14:16 -0700
I have several predefined values in the properties dialog of a drop
down CComboBox which get duplicated at run time.
I tracked the number of elements in the drop down box via
CComboBox.GetCount() and discovered that when my program creates a
thread, which receives a pointer to the dialog, the number of elements
in the drop down box doubles when I cast the dialog:
void Thread(void *lpParam)
{
CInstrumentStatusDlg * pIS = (CInstrumentStatusDlg *)lpParam;
then pIS->dropBox.GetCount() returns 2x the number of required
elements
I'm guessing that when I call (CInstrumentStatusDlg*), it repopulates
the values in the drop down box... which is strange, I'd suppose MFC
would not allow that to happen. How do I prevent this from happening?
Singleton implementation? Manual addition of values to the drop down
box? Something else?
.
- Follow-Ups:
- Re: Duplicate entries in drop down box
- From: Ajay Kalra
- Re: Duplicate entries in drop down box
- From: Joseph M . Newcomer
- Re: Duplicate entries in drop down box
- From: Tom Serface
- Re: Duplicate entries in drop down box
- Prev by Date: Re: base class virtual destructor not resolving inherited virtual functions
- Next by Date: Re: Dialog Editor Shows the previous name (not ID) of the resource
- Previous by thread: Re: CMemoryException
- Next by thread: Re: Duplicate entries in drop down box
- Index(es):
Relevant Pages
|
Loading