 |
|
 |
Thanks for your PropTree first, I like it! It seems to have something wrong with "DrawText()...." Do you have the new version working well in VS2008? Thank you very much!
|
|
|
|
 |
|
 |
This is a great control. We try to use it in our product. But I am not sure the license. Can we use it free or should we pay for it?
Thanks, Lou.
|
|
|
|
 |
|
 |
when click color item, pop color select dialog, click "more colors" button, pop pick color dialog. then close it. click color item again. at this time,click other blank area, color dialog doesn`t disappear.
if you click big color palette `s OK button. this problem does`t appear.
void CPropTreeItemColor::OnLButtonDown(UINT, CPoint point) { if (m_nSpot!=-1) { m_cColor = _crColors[m_nSpot].color; CommitChanges(); } else if (m_rcButton.PtInRect(point)) { CHOOSECOLOR cc; COLORREF clr[16];
ZeroMemory(&cc, sizeof(CHOOSECOLOR)); cc.Flags = CC_FULLOPEN|CC_ANYCOLOR|CC_RGBINIT; cc.lStructSize = sizeof(CHOOSECOLOR); cc.hwndOwner = m_hWnd; cc.rgbResult = m_cColor; cc.lpCustColors = s_pColors ? s_pColors : clr;
memset(clr, 0xff, sizeof(COLORREF) * 16); clr[0] = m_cColor;
m_bInDialog = TRUE;
ASSERT(m_pProp!=NULL); m_pProp->DisableInput();
ShowWindow(SW_HIDE);
if (ChooseColor(&cc)) m_cColor = cc.rgbResult;
m_pProp->DisableInput(FALSE); CommitChanges();
m_bInDialog = FALSE; //add here. } }
|
|
|
|
 |
|
 |
It's a good job any way, thanks first! but a bug is found.
When i used it with a sizing control bar, the treelist was not displayed normally. and found that, it was the sake of this function :
void CPropTreeList::RecreateBackBuffer(int cx, int cy)
did not work correctly. for sometimes, cx & cy is very big, and m_BackBuffer bitmap can't be created. although the following size changes of the bar comes, but cx and cy are not bigger than the original size, so the buffer bitmap will never be created, and there will be no imagination of properties list can be displayed.
Infact, the return value of "CreateBitmap" function should be judged, and recreation job is also needed, till the buffer bitmap is built.
Two changes are listed as follow, it will work on a sizing control bar then.
void CPropTreeList::RecreateBackBuffer(int cx, int cy) { if (m_BackBufferSize.cx<cx || m_BackBufferSize.cy<cy) { m_BackBufferSize = CSize(cx, cy);
CWindowDC dc(NULL);
int nPlanes = dc.GetDeviceCaps(PLANES); int nBitCount = dc.GetDeviceCaps(BITSPIXEL);
m_BackBuffer.DeleteObject(); if(!m_BackBuffer.CreateBitmap(cx, cy, nPlanes, nBitCount, NULL)) m_BackBufferSize = CSize(0,0); } }
modified on Thursday, May 7, 2009 5:21 PM
|
|
|
|
 |
|
 |
The recursive delete function does not delete any item, it just recursivley call the Delete Item.
So when you call DeleteAllitems it does not actually delete the memory for all the items.
Here is the modified code
void CPropTree::Delete(CPropTreeItem* pItem) { if (pItem && pItem!=&m_Root && SendNotify(PTN_DELETEITEM, pItem)) return;
// passing in a NULL item is the same as calling DeleteAllItems if (!pItem) pItem = &m_Root;
// delete children
CPropTreeItem* pIter; CPropTreeItem* pNext;
pIter = pItem->GetChild(); while (pIter) { pNext = pIter->GetSibling(); DeleteItem(pIter); delete pIter // <------------------------------Added this line to original code pIter = pNext; }
// unlink from tree if (pItem->GetParent()) { if (pItem->GetParent()->GetChild()==pItem) pItem->GetParent()->SetChild(pItem->GetSibling()); else { pIter = pItem->GetParent()->GetChild(); while (pIter->GetSibling() && pIter->GetSibling()!=pItem) pIter = pIter->GetSibling();
if (pIter->GetSibling()) pIter->SetSibling(pItem->GetSibling()); } }
if (pItem!=&m_Root) { if (pItem==GetFocusedItem()) SetFocusedItem(NULL); delete pItem; } }
modified on Thursday, October 23, 2008 7:52 PM
|
|
|
|
 |
|
 |
Hello,
I am using the Treelist control on a dialog box with some buttons at the bottom of this control. But for some reason the whole dialog box comes with white background and all my buttons have painting issue.
I am just adding some CPropTreeItemEdit items to the control.
Any help is greately appreciated.
Thanks Shashi
|
|
|
|
 |
|
 |
Great tool, I'm using it and find it quite lovely, however my one complaint is that checkbox tree items display the checkbox in the left column for some reason. For every other property, the left column is the parameter name, and the right column is the value. Other than that nice work -John Krajewski
|
|
|
|
 |
|
 |
Hello! How could I implement tab (WS_TABSTOP) for the tree control elements? I have tried
m_Tree.ModifyStyle(0,WS_TABSTOP); but it doesn't work
Any idea? Ioan
|
|
|
|
 |
|
 |
Hello! I try to use this tree control but in debug Unicode mode at the following line:
m_Tree.Create(dwStyle, rc, this, IDC_PROPERTYTREE);
I got an assertion error:
in the CPropTree::Create(..) at line: LPCTSTR pszCreateClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW, ::LoadCursor(NULL, IDC_ARROW));
PS: in Release mode the code is working fine.. Any idea? Ioan
-- modified at 16:42 Monday 19th November, 2007
|
|
|
|
 |
|
 |
I solved that problem.
change Use of MFC in Property Pages
"Use MFC in a Static Library"
To
"Use MFC in a Shared DLL"
|
|
|
|
 |
|
 |
but we need to link the static library to make it work in user's enviroment. right?
|
|
|
|
 |
|
 |
I want the node icon of my tree to flash ,when the node is clicked. but I don't konw how to reailize this function,please help me. Thank you for your response!
PlainZeng
|
|
|
|
 |
|
 |
1. I notice the stringtable combo entries. How would you support translations into other languages? it would look odd some of my languages having english wording. i use resource only dll files for my app interface. just wondered how you would deal with it.
2. Can you have custom combo content?
Andy
|
|
|
|
 |
|
 |
Any plans to port this to 64-bit?
Currently, I'm passing a pointer into CPropTreeItem::SetCtrlID(). The problem is that function takes a UINT argument, which is 32-bit even in a 64-bit compiler (if my understanding is correct). So Visual Studio 2003 (with SP1) is giving me C4311 pointer truncation warnings.
|
|
|
|
 |
|
 |
Yes i had the same problem.
1. WPARAM and LPARAM data types are of the same size on 64-bits applications. 2. WPARAM and LPARAM are inverted in all function calls. You have to switch them yourself.
Regards.
|
|
|
|
 |
|
 |
Seems when you focus on an item and such it reappears. I made a quick fix in PropTree.cpp for any who are interested. Replace ShowInfoText with the following code.
void CPropTree::ShowInfoText(BOOL bShow) { m_bShowInfo = bShow;
CRect rc;
if(::IsWindow(m_Info.m_hWnd)) m_Info.ShowWindow(bShow ? SW_NORMAL : SW_HIDE);
GetClientRect(rc); ResizeChildWindows(rc.Width(), rc.Height()); }
|
|
|
|
 |
|
 |
I'm trying to port your code to WinCE.net4.2 using embedded vc++4.0 + sp4,
but I meet with a problem which I can't resolve it, so can you give me some help?
I can send the sourcecode modified by me to you also,if you give me a email.
thanks a lot!
the compiling error:
PropTree.obj : error LNK2001: unresolved external symbol "protected: static class CPropTreeItem * CPropTree::s_pFound" (?s_pFound@CPropTree@@1PAVCPropTreeItem@@A) emulatorDbg/PropTree.dll : fatal error LNK1120: 1 unresolved externals
|
|
|
|
 |
|
 |
I want to use a special CTreeCtrl placed on the right side of my application. And I hope the root node of the tree can be placed on the right side and all the subtreeitem on the left side. If any one can help me? my email: wjg1979@hotmail.com
|
|
|
|
 |
|
 |
I just started a thread on the COptionTree discussion:
Extending COptionTree
You may have to scroll down to the bottom to see it. Anyway, I mention that post here because I'd like to have the same feedback, but oriented towards CPropTree.
Thanks,
-Brent
|
|
|
|
 |
|
 |
I want to have a check box before each root level of the property tree and allow the user to delete the root level items( and the corresponding sub level items in that root level).So far I could get to the point where I could identify which root level item's check boxes are checked. Now I have to delete these checked root levels. Can some one help me on how to do this??
Thanks a lot
|
|
|
|
 |
|
 |
is there a way to implement SetColumnWidth likely in CListCtrl?
Popy ----------------------- popy@popyweb.com http://www.popyweb.com
|
|
|
|
 |
|
 |
Hi
This Property Tree Control, works fine for me.... but I want to add one more requirement.
How do I set the TVS_HASLINES |TVS_LINESATROOT Styles in the Property Tree Control.
Any help would be greatly appritiated...
Thanks and Regards
Manoj
|
|
|
|
 |
|
 |
I have a restricted area for the PropTree control, and now I want to reduce the unnecessary width for the Color Item, can anybody tell me how to do with it? Thanks a lot!
|
|
|
|
 |
|
 |
Hi.
I'm quite new to dll's, so how do I for e.g. create the dlgsample project in VS 6.0?
When I tries to compile my project the compiler says:
Fatal error C1083: Cannot open include file: 'PropTree.h': No such file or directory
Do I have to set any project settings so the compiler finds the PropTree.dll?
By the way, this tree-view really seams to be usable for my small project!
_____________________________
...and justice for all
APe
|
|
|
|
 |
|
 |
I've found that inside the function: void CPropertyTreeList::RecreateBackBuffer(int cx, int cy) if I comment-out the following line, like so: // if (m_BackBufferSize.cxsuch that the back buffer is recreated whenever the control is resized, this seems to be alot more stable, and negates the need to use SetWindowPosition to change the control size. I had issues when resizing my control. Whenever I resized, the list would disappear, but the information box would still be visible. Can you (or others) confim this? Was there an explicit reason why do this conditional resizing of the back buffer? Apart from that, This is a great control. Really good stuff!
|
|
|
|
 |