Originally posted by: Danny Wang
this avoid the assert error of CControlBar::AssertValid() ;
on implementation of CSizingControlBar::Create()
modify the dwstyle assignation,
replace
/* dwStyle &= ~CBRS_ALL;
dwStyle |= CCS_NOMOVEY|CCS_NODIVIDER|CCS_NORESIZE;
*/
by
SetBarStyle(dwStyle & CBRS_ALL);
Originally posted by: angler
Disable all line error occured. and compile in release mode in VC 6:
1)CoolTreeCtrl.h
/* int SetBorder(DWORD dwFlags, int xBorder, int yBorder)
{ ASSERT(::IsWindow(m_hWnd));
return (int)SendMessage(TVM_SETBORDER, (WPARAM)dwFlags, (LPARAM)MAKELPARAM(xBorder, yBorder)); }
int GetBorder()
{ ASSERT(::IsWindow(m_hWnd));
return (int)SendMessage(TVM_GETBORDER, (WPARAM)0, (LPARAM)0); }
*/
2)Sidepane.cpp
// m_pControl->GetTreeMenuCtrl()->SetBorder(TVSBF_XBORDER|TVSBF_YBORDER, 2, 0);
3)TreeMenuDemo.cpp
// m_TreeMenu.m_tree.SetBorder(TVSBF_XBORDER|TVSBF_YBORDER, 2, 0);
4)sidepane.h
//#include "flatbmpbtn.h"
Reply
Originally posted by: subrosa
it would be nice if it wasn't so tied to the custom drawn CTreeMenu. There are lots of other controls that could be used instead of CTreeMenu, like a CtreeCtrl or a ClistCtrl etc
ReplyOriginally posted by: rinix
Hi !
I run with VC5 sp3
and when I compile, I've got these errors :
CoolTreeCtrl.h(198) : error C2061: syntax error : identifier 'LPLVBKIMAGE'
CoolTreeCtrl.h(202) : error C2061: syntax error : identifier 'LPLVBKIMAGE'
maybe a limitation of the VC5 sdk, but how to compile this with VC5 ?
Thanks ;o)
PS : still a very good work
ReplyOriginally posted by: Guo Hung
error :Undeclared identifier TVSBF_XBORDER, TVSBF_YBORDER
TVM_SETBORDER,TVM_GETBORDER
How to solve it?
Originally posted by: CMM
the CSizingControlBar has some style errors, I can only delete the bar and this program run well.
ReplyOriginally posted by: Gabriel Zerbib
Hi.
This control looks cute !
But I just downloaded the zip file, tried to run the demo exe, and got an "illegal operation"...
Any help ?
ReplyOriginally posted by: Kevin Savitskoff
1) For VC 6:
2) Remove the #include "flatbmpbtn.h" from sidepane.h
3) Change the CSidePane::OnCreate() function, by replacing the line:
To:
Do this on Line 85 of SidePane.cpp
BOOL CSizingControlBar::Create(CWnd* pParentWnd, CSize sizeDefault, UINT nID, DWORD dwStyle)
// save the style
dwStyle &= ~CBRS_ALL;
m_sizeHorz = sizeDefault;
CString wndclass = AfxRegisterWndClass(CS_DBLCLKS, LoadCursor(NULL, IDC_ARROW),
if (!CWnd::Create(wndclass, NULL, dwStyle, CRect(0,0,0,0),
return TRUE;
I like a few other people had problems compiling this project, but eventually
was able to. Here's how I did it:
Add the following include to stdafx.h:
#include <afxdtctl.h>
This will solve the TVS_GETBORDER and TVS_SETBORDER errors
For VC 5:
YOU WILL NEED THE INET SDK FROM MICROSOFT
m_pControl->GetTreeMenuCtrl()->SetBorder(TVBF_SIZEX , 2, 0); //Or something like that, I can't
quite remember exactley what it was
m_pControl->GetTreeMenuCtrl()->SetBorder(16 | 12, 2, 0);
4) If you're using VC6 then replace the CSizingControlBar::OnCreate function:
{
ASSERT_VALID(pParentWnd); // must have a parent
ASSERT (!((dwStyle & CBRS_SIZE_FIXED) && (dwStyle & CBRS_SIZE_DYNAMIC)));
m_dwStyle = dwStyle & CBRS_ALL;
dwStyle |= CCS_NOPARENTALIGN|CCS_NOMOVEY|CCS_NODIVIDER|CCS_NORESIZE;
m_sizeVert = sizeDefault;
m_sizeFloat = sizeDefault;
CreateSolidBrush(GetSysColor(COLOR_BTNFACE)), 0);
pParentWnd, nID))
return FALSE;
}
Originally posted by: dejan savic
Source is incomplete !
ReplyOriginally posted by: Justin Rudd
I downloaded the demo for the "cool tree menu" and it is missing a file flatbmpbtn.h in the zip file. I didn't notice on the page that I had to
download any additional files to get this to work. So if you could update the zip file that would be great.
Also I got compile errors ( besides the header file ) for the tree view messages TVM_SETBORDER and TVM_GETBORDER.
Reply