|
When user click the item of the CListCtrl, I create a CTreeCtrl dynamicly to let use the data,
but the CTreeCtrl is disabled, I do not know why.
Is there anyone know why it is.
modified 15-Jan-13 10:31am.
|
|
|
|
|
yu-jian wrote: but the CTreeCtrl is disabled, I do not know why. Is there anyone know why it is. Without seeing some of your code we cannot even begin to guess what may be happening.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Sorry
CPoint point;
GetCursorPos(&point);
this->ScreenToClient(&point);
CRect rect;
rect.top = point.y;
rect.left = point.x;
rect.right = rect.left + 200;
rect.bottom = rect.top + 300;
CComboBox* pComboBox = new CComboBox();
pComboBox->Create(WS_VISIBLE, rect, this, NULL);
pComboBox->ShowWindow(SW_SHOW);
CDeviceInfoArray arrDeviceInfo;
...
for(int i = 0; i < arrDeviceInfo.GetCount(); ++i)
{
CString strDevice;
strDevice.Format("%d", arrDeviceInfo[i]);
pComboBox->AddString(strDevice);
}
|
|
|
|
|
Is your CTreeCtrl being disguised as a CComboBox ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Firstly, I use the CTreeCtrl, but failed, then I use the CComboBox, but also failed, too.
I thought that it's the same problem.
|
|
|
|
|
I don't know what this has to do with a tree control, but your Create() call is missing some windows styles (specifically WS_CHILD ), and your control does not have an id. See the documentation[^] for more details.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
At least show us the code you use to create the Tree Control
|
|
|
|
|
please show your CTreeListCtrl creation code. without seeing code how we can predict issue?
|
|
|
|