Here's how I was able to fix this:
For the first problem, just add UpdateWindow(); as the last line in CXTPSyntaxEditCtrl::OnSize
The second problem do as following:
Add support to CXTPSyntaxEditView to subclass the edit control
1. Replace CXTPSyntaxEditCtrl m_wndEditCtrl; with CXTPSyntaxEditCtrl *m_pwndEditCtrl; in CXTPSyntaxEditView.h
2. Replace all m_wndEditCtrl with m_pwndEditCtrl in CXTPSyntaxEditView.cpp
3. Replace line 751 with return *m_pwndEditCtrl; in CXTPSyntaxEditView.cpp
4. Add the following method to CXTPSyntaxEditView
virtual CXTPSyntaxEditCtrl* OnCreateSyntaxEditCtrl() const
{
CXTPSyntaxEditCtrl* pCtrl = new CXTPSyntaxEditCtrl();
ASSERT_VALID( pCtrl );
return pCtrl;
}
5. Replace line 344 in with CXTPSyntaxEditView.cpp
m_pwndEditCtrl = OnCreateSyntaxEditCtrl();
ASSERT_VALID( m_pwndEditCtrl );
m_bScrollBars = m_bScrollBars || !m_pwndEditCtrl->CreateScrollbarOnParent();
if( !m_pwndEditCtrl->Create(this, m_bScrollBars, m_bScrollBars, pDataManager, pContext))
{
TRACE0("Failed to create edit control.\n");
return -1;
}
6. Add delete m_pwndEditCtrl; to the CXTPSyntaxEditView destructor
Prevent the control from adding a scrollbar to a parent splitter.
1. Add the following method to CXTPSyntaxEditCtrl
virtual bool CreateScrollbarOnParent() const { return true; }
2. Replace the lines 2952, 2964, 2978, 2992, 3004, 3016, 3028, 3040, 3052, 3066, 3080, 3094, and 3106 in CXTPSyntaxEditCtrl.cpp with:
if( pParentWnd != NULL && CreateScrollbarOnParent() )
3. Replace the following line in CXTPSyntaxEditView.cpp
761 - if( pSplitterWnd != NULL && m_pwndEditCtrl->CreateScrollbarOnParent() )
900 - if (!pSplitterWnd || !m_pwndEditCtrl->CreateScrollbarOnParent() )
1295 - if (pSplitterWnd && m_pwndEditCtrl->CreateScrollbarOnParent() )
4. Create a class that subclasses CXTPSyntaxEditCtrl, override CreateScrollbarOnParent, in the view override OnCreateSyntaxEditCtrl to return a instance of your edit control.
Can someone from CodeJock please implement this or something similar?
Thanks,
Italo
|