 |
|
 |
finally find out !! thx, it's simple and useful.
|
|
|
|
 |
|
 |
Is there a way to implement it in C/C++ using the Win32 API? If so, How?
|
|
|
|
 |
|
 |
Very very good and according to my deeds the combobox. Thanks for implementing it.
My problem is I am using C#. Can any body tell me the same thing in C#? I have got other samples too but they use just show/hide tree view. it does not appear as drop-down like Simon.W has implemented. Please guide me the same thing in C#.
Bundle of thanks in advance
Regards
Rizwan
|
|
|
|
 |
|
 |
Hi,
Can I change the Item Data with the SetItemData method without influencing the functionality of the code.
thx
|
|
|
|
 |
|
 |
I add DWORD_PTR member into ITEMDATA struct and override SetItemData and GetItemData function.
typedef struct tagITEMDATA
{
WORD wParantOriginIdx;//the root item's parent is nRootIndex
WORD wOriginIdx;//Original index when first insert to listbox
BYTE cType;
BYTE cLevel;
DWORD_PTR dwData;
}ITEMDATA,*LPITEMDATA;
DWORD_PTR CWzComboBox::GetItemData(int nIndex) const
{
LPITEMDATA pData = (LPITEMDATA)CComboBox::GetItemData(nIndex);
if(pData == NULL)
return NULL;
return pData->dwData;
}
int CWzComboBox::SetItemData(int nIndex, DWORD_PTR dwItemData)
{
LPITEMDATA pData = (LPITEMDATA)CComboBox::GetItemData(nIndex);
if(pData == NULL)
return CB_ERR;
pData->dwData = dwItemData;
return CComboBox::SetItemData(nIndex, (DWORD_PTR)pData);
}
http://rapidshare.com/files/123472424/CwzCombox.zip.html[^]
You can download CWzComboBox class modified.
IT!
|
|
|
|
 |
|
 |
Hi
Thanx Simon & 10/10
Can u help 2 add some nodes (i.e, the main nodes) as unselectable?
Thanx again
Good code day
|
|
|
|
 |
|
 |
Am... Sorry
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Thanks for the quality code! One thing to keep in mind for those using this. Because the return index from the AddCTString method is not unique, you need to fill the tree in a depth first fashion (unless I'm missing something). Indexes within the tree can be duplicated so something like this:
WORD wParentIdx1 = m_comboType.AddCTString(nRootIndex,nTypeTYM,"66kv Concrete Single Pole"); //==0
WORD wParentlevel1 = m_comboType.AddCTString(wParentIdx1,nTypeTYC,"5/160");//==1
WORD wParentlevel2 = m_comboType.AddCTString(wParentIdx1,nTypeTYC,"5/180");//==2
WORD wParentlevel3 = m_comboType.AddCTString(wParentIdx1,nTypeTYC,"5/200");//==3
WORD wParentlevel4 = m_comboType.AddCTString(wParentIdx1,nTypeTYC,"5/220");//==4
m_comboType.AddCTString(wParentlevel1,nTypeTYX,"21.5m80kN-C+5/160+G-MS"); //returns an index of 2
m_comboType.AddCTString(wParentlevel1,nTypeTYX,"21.5m60kN-C+5/160+G-M2"); //returns an index of 3. But we added it to a parent of 2. Which one is that?
m_comboType.AddCTString(wParentlevel1,nTypeTYX,"21.5m24kN-C+5/160+G-M2");//returns an index of 4
m_comboType.AddCTString(wParentlevel2,nTypeTYX,"21.5m80kN-C+5/180+");//returns an index of 3
m_comboType.AddCTString(wParentlevel2,nTypeTYX,"21.5m24kN-C+5/180+");//returns an index of 4
m_comboType.AddCTString(wParentlevel2,nTypeTYX,"21.5m60kN-C+5/180+");//returns an index of 5
Will result in some odd results.
However, if you fill the tree depth first, it seems to work great. I started looking for a non-invasive fix but gave up and just filled the tree the way it expects.
|
|
|
|
 |
|
 |
Hello,
very impressive anf thanks for sharing it with us.
I was wondering , is it possible to owner-draw the down-arrow button that drops the list?
thanks
vd
|
|
|
|
 |
|
 |
Really cool control! Great work!
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
 |
|
 |
Useful general purpose tool, looks like it is well done, and probably many people can use it. Is it ok to remove the bitmap in the center of the dialog?
David Spain
|
|
|
|
 |
|
 |
use it freely as your wish!
your letter:
Useful general purpose tool, looks like it is well done, and probably many people can use it. Is it ok to remove the bitmap in the center of the dialog?
David Spain
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
 |
|
 |
Good Job!!
William
|
|
|
|
 |