Subject |
Author |
Date |
|
Offer Har
|
Mar 7, 2008 - 12:19 PM
|
Dear Support,
As you are already painting the combo-box yourself - can you please add item color support like in the combo-box cell?
Thanks, Ron.
|
|
Offer Har
|
Mar 17, 2008 - 5:28 AM
|
How about the flicker were you able to fix this bug for 2.83?
|
|
Offer Har
|
Mar 9, 2008 - 3:28 PM
|
Dear Support,
Thanks. However there are terrible flicker problems now with this combo - as I reported in the past. Were you able to fix this for the coming version? Also - is it possible to add an icon in this cells? I could not see any such function.
Thanks, Ron.
|
|
Technical Support
|
Mar 9, 2008 - 11:51 AM
|
|
|
Mike Van Duzee
|
Mar 6, 2008 - 11:47 AM
|
When loading a saved UI state, there is a bug with the visibility of floating bars that occurs in some situations. Follow these steps exactly to reproduce the problem using the StateInFile sample:
- Delete HKEY_CURRENT_USER\Software\Foss\StateInFile to get a fresh start. - Run the StateInFile sample (Unicode Release, VS 7.1) - Dock bar 0 to bottom with bar 1 (tabbed) - Make sure bar 1 visible in the tabs - Save to a file called "state1" - Undock bar 0 so that it becomes floating. - Save to a file called "state2" - Load file "state1" - Load file "state2"
At this point, bar 1 is docked at the bottom and bar 0 is no where to be found. Bar 0 should have been floating and visible.
|
|
Mike Van Duzee
|
Apr 11, 2008 - 6:53 AM
|
Its been a little over a month since I reported this problem and still have no reply. Has this problem been fixed? Is anyone looking into it?
|
|
Technical Support
|
Apr 12, 2008 - 4:32 AM
|
We are sorry but we are still working on this issue.
|
|
Ralf Matthes
|
Mar 6, 2008 - 7:24 AM
|
Hello support team, I’d like to ask if it’s possible to use more than one paint manager at the same time? Example: Use the CExtPaintManagerStudio2008 in general and the CExtPaintManagerNativeXP for CExtButtons to have the buttons in the ’normal’ XP style. Thanks
|
|
Technical Support
|
Mar 7, 2008 - 2:54 AM
|
Yes, you can do that. Here is a ready-to-use solution. The below CExtPaintManagerCustomT template is designed to add custom paint manager capabilities to any Prof-UIS control. Just wrap a class with this template and then use SetCustomPM() : CExtPaintManagerCustomT < CExtButton > m_wndButton;
m_wndButton.SetCustomPM( RUNTIME_CLASS( CExtPaintManagerNativeXP ) ); The template itself //////////////////////////////////////////////////////////////////////////
// template CExtPaintManagerCustomT
template < class _BT >
class CExtPaintManagerCustomT : public _BT
{
public:
CExtPaintManagerCustomT(
CExtPaintManager * pCustomPM = NULL
)
: m_pCustomPM( NULL )
{
SetCustomPM( pCustomPM );
}
?CExtPaintManagerCustomT()
{
if( m_pCustomPM != NULL )
delete m_pCustomPM;
m_pCustomPM = NULL;
}
CExtPaintManager * GetCustomPM() const
{
return m_pCustomPM;
}
bool SetCustomPM(
CExtPaintManager * pCustomPM = NULL
)
{
if( m_pCustomPM != NULL )
{
if( pCustomPM == m_pCustomPM )
return false;
if( m_pCustomPM != NULL )
{
delete m_pCustomPM;
m_pCustomPM = NULL;
}
}
if( pCustomPM == NULL )
{
m_pCustomPM = new __DEFAULT_PAINT_MANAGER_CLASS;
if( ! m_pCustomPM->IsKindOf( RUNTIME_CLASS( CExtPaintManager ) ) )
{
ASSERT( FALSE );
return false;
}
}
else
{
m_pCustomPM = pCustomPM;
}
m_pCustomPM->SyncSysColors();
m_pCustomPM->InitTranslatedColors();
m_pCustomPM->InitHelperBrushes();
return true;
}
bool SetCustomPM(
CRuntimeClass * pRTCCustomPM
)
{
if( pRTCCustomPM == NULL )
return SetCustomPM( (CExtPaintManager *)NULL );
CObject * pObj = pRTCCustomPM->CreateObject();
if( pObj == NULL )
{
ASSERT( FALSE );
return false;
}
ASSERT_VALID( pObj );
CExtPaintManager * pPaintManager = DYNAMIC_DOWNCAST( CExtPaintManager, pObj );
if( pPaintManager == NULL )
{
delete pObj;
ASSERT( FALSE );
return false;
}
return SetCustomPM( pPaintManager );
}
virtual CExtPaintManager * PmBridge_GetPM() const
{
CExtPaintManager * pPM = GetCustomPM();
if( pPM != NULL )
return pPM;
else
return _BT::PmBridge_GetPM();
}
protected:
CExtPaintManager * m_pCustomPM;
};
|
|
howard liu
|
Mar 5, 2008 - 11:16 PM
|
Dear support, I would like to skin my interface using the Themes of Prof-UI, I am fine with painting most of the non client region , but when I add a splitter window to an SDI application the splitter window`s separator still appears to be painted in the classical MFC way. How to make it get applied with the theme given by Prof-UIs themes,
Also give me an idea how can i attach screen shots of the problem i am facing with the application with the query.
Thanks, Raghavendra
|
|
howard liu
|
Mar 6, 2008 - 4:16 AM
|
Hey , I found the way for it on my self. I just used the Prof-UI’s counter part for the CSplitterWnd in MFC that solved my problem.
ie... //CSplitterWnd m_splitter; instead of this line of code, i replaced it with the next line of code in my CMainFrame class
CExtSplitterWnd m_splitter;
|
|
howard liu
|
Mar 5, 2008 - 11:08 PM
|
Dear support, I would like to skin my interface using the profiles of Prof-UI, I am fine with painting most of the non client region , but when I add a splitter window to an SDI application the splitter window`s separator still appears to be painted in the classical MFC way. How do i do it for my application?
Thanks, Raghavendra
|
|
Jon Ort
|
Mar 5, 2008 - 2:29 PM
|
In several previous postings it has been stated that one can use CExtControlBar::_CalcDesiredMinVH() and the CExtControlBar::_CalcDesiredMinHW() methods to set the minimum size of the control bars. I have been experimenting with these virtual functions as well as _CalcDesiredMinFloatedSize and am confused as to just what they do and how they interact.
The function _CalcDesiredMinFloatedSize seems to control the minimum size while floating, unless one of the other functions returns a value that is larger than the dimension returned in _CalcDesiredMinFloatedSize. Also it seems that ...MinHW controls both the width and height of a window that can be docked on all four corners while ...MinVH has some impact as well but seeming not as separate horizontal vs. vertical inputs. Can you please supply a summary of what each of these functions are supposed to do?
Thanks Jon Ort
|
|
Jon Ort
|
Mar 20, 2008 - 1:36 PM
|
|
|
Damien Castelltort
|
Mar 5, 2008 - 10:10 AM
|
Hi, I am facing a problem using a CExtPropertyGridCtrl. I am using the PropertyStore as a dynamic container. It means I add and remove properties. I’m trying to restore the selection.
I did a sample to illustrate how I use your component and to help you to solve my issue. (http://aurelien.loizeau.free.fr/profuis/PropertyGridSample.rar)
To make it crash, use it as following: 1. Launch the sample :) 2. Select the last property 3. Click the remove button 4. Select a property -> Throwes an assert
I tried many things to solve this problem, but I failed. I hope you will solve it easily.
ps: Will you have a attach feature in your support forum soon ?
|
|
Damien Castelltort
|
Mar 6, 2008 - 2:18 AM
|
Great, the problem is gone. Thanks.
|
|
Technical Support
|
Mar 5, 2008 - 1:15 PM
|
We tried to reproduce the crash with the latest code (we are working on) but failed. Would you download the latest code from our ftp site and let us know if the problem is gone? Please drop us an email if you don’t know the download details.
|
|
Damien Castelltort
|
Mar 5, 2008 - 10:11 AM
|
|
|
Offer Har
|
Mar 4, 2008 - 7:04 AM
|
Dear Support,
I see that RowHide is not implemented for trees. How can I hide a row in a tree then?
Thanks, Ron.
|
|
Offer Har
|
Mar 4, 2008 - 7:12 AM
|
Found a the replacement - ItemHide...
|
|
Offer Har
|
Mar 4, 2008 - 5:45 AM
|
Dear Support,
I see that a CExtTreeGridWnd has function to hide a specific row - RowHide, but there is no RowUnHide to a specific row, only RowUnHideAll. Am I missing something?
Regards, Ron.
|
|
Offer Har
|
Mar 4, 2008 - 7:12 AM
|
Found a the replacement - ItemHide...
|
|
Phillip Bernard
|
Mar 4, 2008 - 3:17 AM
|
Hi, i trying to create RTF inplace editor I create MyRTFEditor derived from CRichEditCtrl with context menu and MyRTFCell derived from CExtGridCell Than i override MyRTFCell::OnInplaceControlCreate(...) { retrun CreateRTFEditor(); } It’s working normally. If I make right mouse click on activated MyRTFEditor my context menu show but focus sets to GridWnd and I lost focus on my MyRTFEditor. I try to override MyRTFCell::OnInplaceControlWindowProc() and MyRTFCell::OnInplaceControlPreTranslateMessage() but they never call. What I do wrong ?
|
|
Offer Har
|
Mar 10, 2008 - 7:05 AM
|
Hello there Phillip,
I am facing a similar problem - can you explain what was your solution?
Thanks, Ron.
|
|
Phillip Bernard
|
Mar 4, 2008 - 6:59 AM
|
Sorry, problem solved I show context menu on OnRButtonDown() and event WM_RBUTTONUP received from Menu break inplace control loop in GbwBeginEditCell
|
|
Richard Gardner
|
Mar 1, 2008 - 10:42 AM
|
HI I have a dialog derived from class CDlgForex : public CExtNCW <CExtResizableDialog> what I want to achieve is to make its background black. I tried to write such code
BOOL CDlgForex::OnEraseBkgnd(CDC* pDC) { CRect rc; GetClientRect(&rc); pDC->FillRect(&rc, &m_brush); return TRUE;
//return CExtNCW<CExtResizableDialog>::OnEraseBkgnd(pDC); } HBRUSH CDlgForex::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CExtNCW<CExtResizableDialog>::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetBkColor(RGB(0, 0, 0));
// TODO: Return a different brush if the default is not desired
return (HBRUSH)m_brush; }
where CBrush m_brush; m_brush.CreateSolidBrush(RGB(0, 0, 0));
but with no luck, background is always drawn with the color for currently selected UI theme.
What would be the steps to achieve this goal?
Thx
|
|
Technical Support
|
Mar 3, 2008 - 2:34 PM
|
The Win32/MFC custom dialog background approach is based on HBRUSH queries through WM_CTLCOLOR messages. This is convenient if you need to implement some single color or bitmap pattern based background. But Prof-UIS themes often use themed backgrounds with gradients and rule based skin bitmap paintings stretched into entire client area of dialog window. The entire dialog background should be automatically inherited by dialog child windows deeply and not only one level. The same is related to frame and other windows. Prof-UIS classes does not use WM_CTLCOLOR messages, they use paint manager based inherited background painting algorithm instead. You can see it in action in the TabbedBars sample application where you can configure background painting options in the third tab page of the One Note tab page container created as SDI child view. The algorithm is based on the CExtPaintManager::g_nMsgPaintInheritedBackground message sent by the paint manager to windows. If windows in your project does not handle this message like demonstrated in the TabbedBars sample application, then the default themed background will be painted.
|
|
Offer Har
|
Mar 1, 2008 - 5:19 AM
|
Dear Support,
I have a cell with a check box text and button. I would like that when the check-box is unchecked, the text will appear read-only and the button will be disabled.
Can this be done? If yes, can you please explain, if not, can this feature be added to next releases?
Thanks, Ron.
|
|
Technical Support
|
Mar 17, 2008 - 5:09 AM
|
We have just checked our implementation of the check box and came to a conclusion that you should not apply the __EGCS_READ_ONLY style if you want to leave the check box enabled and clickable. Instead, apply the __EGCS_NO_INPLACE_CONTROL cell style in the CMyGridCell::OnSetCheck() method , set the cell’s text color to COLOR_3DSHADOW and make the button disabled.
You can control if a cell button is enabled or disabled by overriding CExtGridCell::OnQueryButtonInfo() virtual bool OnQueryButtonInfo(
INT nButtonType,
bool * p_bEnabled,
bool * p_bPressed = NULL,
bool * p_bStayPressed = NULL,
UINT * p_nTimerElapseValue = NULL
) const;
|
|
Offer Har
|
Mar 12, 2008 - 6:57 PM
|
Wouldn’t this make the check-box disabled as well? I want the check-box to remain enabled even when it is un-checked.
|
|
Technical Support
|
Mar 4, 2008 - 2:37 AM
|
You should handle the event fired when the check state of a grid cell is changed by the user. You can use a derived cell class whose the OnSetCheck() virtual method is overridden. Here is a sample code: void CMyGridCell::OnSetCheck(
INT nCheck,
CExtGridWnd & wndGrid,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell
)
{
ASSERT_VALID( this );
ASSERT_VALID( (&wndGrid) );
DWORD dwCellStyle = GetStyle();
if( (dwCellStyle&__EGCS_CHK_MASK) == 0 )
return;
CBaseGridCell::OnSetCheck(
nCheck,
wndGrid,
nColNo,
nRowNo,
nColType,
nRowType,
rcCellExtra,
rcCell
);
// place your code here
} The nCheck parameter specifies whether the check box is checked ( nCheck==1 ), unchecked ( nCheck==0 ) or undetermined ( nCheck==2 ). Please note you can also override the CExtGridWnd::OnGridCellSetCheck() virtual method in the grid class. Inside your overridden method just analyze the nCheck parameter and make the cell read-only (and add the button) when it equal to 0. Otherwiese remove the button and read-only style.
|
|
Offer Har
|
Mar 1, 2008 - 4:55 AM
|
Dear Support,
I would like to display a tootlip, but I don’t want it to be automatically hidden, on timeout or on any other default mouse/keyboard inputs. I could not find a way how to force the tooltip to be displayed. What I eventually did is derive mo class from CExtPopupMenuTipWnd, and added these two function:
virtual void Hide() {}
virtual void ForceHide() { CExtPopupMenuTipWnd::Hide(); } This works, but it is not optimized, as all the timers of the tootlip are craeted anyhow. Is there a better solution to this problem? If not can this feature be added to the CExtPopupMenuTipWnd class? Thanks, Ron.
|
|
Offer Har
|
Mar 24, 2008 - 5:03 AM
|
|
|
Offer Har
|
Mar 17, 2008 - 5:27 AM
|
|
|
Offer Har
|
Mar 12, 2008 - 11:21 AM
|
|
|
Offer Har
|
Feb 29, 2008 - 8:20 PM
|
Dear Support,
I need to display two buttons in one cell, and change their appearance. I know how to do it with one (I add __EGCS_BUTTON_ELLIPSIS and in OnPaintButton I set __EGCPF_NO_BUTTON_ELLIPSIS_DOTS) I added __EGCS_BUTTON_DROPDOWN, but I faced the glyph removal problem - I couldn’t find a matching __EGCPF_NO_BUTTON_XXX flag
I looked into and I see this code:
...
if( nButtonType == INT(__EBTT_DROPDOWN) )
pGlyph =
CExtPaintManager::g_DockingCaptionGlyphs[
(INT) CExtPaintManager::__DCBT_ARROW_DOWN
];
else if( nButtonType == INT(__EBTT_ELLIPSIS) )
{
if( (dwHelperPaintFlags&__EGCPF_NO_BUTTON_ELLIPSIS_DOTS) == 0 )
pGlyph =
CExtPaintManager::g_DockingCaptionGlyphs[
(INT) CExtPaintManager::__DCBT_ELLIPSIS
];
}
else if( nButtonType == INT(__EBTT_UPDOWN_UP) )
pGlyph =
CExtPaintManager::g_DockingCaptionGlyphs[
(INT) CExtPaintManager::__DCBT_ARROW_SMALL_UP
];
... So, there is no way to get rid of the arrow glyph. What I did is that before the call to the Base OnPaintButton, I added this: if (nButtonType==__EBTT_DROPDOWN) nButtonType = 10;// Shome out of range value... This is ugly, but it works... Can a flag for not drawing the dropdown glyph be added to the next release? Thanks, Ron.
|
|
Technical Support
|
Mar 4, 2008 - 2:42 AM
|
Thank you for your advice. We have just added a new style __EGCPF_NO_BUTTON_DROPDOWN_ARROW . When this style is applied, the default drop-down button is painted with no arrow. You can either wait for the next release or request the updated sources right now.
|
|
Offer Har
|
Feb 29, 2008 - 1:41 PM
|
Dear Support,
I have a multi-line edit box. The scroll-bars are not skinned. Is this a known problem? Is it going to be fixed in 2.83?
Thanks, Ron.
|
|
Mitsuhiko Yamada
|
Jun 18, 2008 - 3:28 AM
|
Dear Support I want to stick CMyWnd (class CMyWnd: public CExtNCSB <CWnd>) on CExtControlBar.
CExtControlBar crashes in Focus.
Some kind of container such as CExtTabPageContainerWnd is necessary.
Is not there any good method? Thanks
|
|
Offer Har
|
Mar 19, 2008 - 6:53 AM
|
That’s true for CEdit, CRichEditCtrl and CListBox etc, but why for have it by default for CExtEdit ? If a user it using CExtEdit I’m sure he want ALL the elements to be skinned.
Other users are welcomed to put their though here as well....
|
|
Technical Support
|
Mar 19, 2008 - 6:46 AM
|
We guess the user should have a choice whether to apply skinned scroll bars or not.
|
|
Offer Har
|
Mar 18, 2008 - 11:06 AM
|
Asking again....: Why isn’t it applied by default to CExtEdit? don’t we all use CExtEdit in a skinned environment?
|
|
Offer Har
|
Mar 1, 2008 - 9:37 AM
|
These are great news... One question - Why isn’t it applied by default to CExtEdit? don’t we all use CExtEdit in a skinned environment?
|
|
Technical Support
|
Mar 1, 2008 - 9:09 AM
|
There is a new CExtNCSB template class introduced in v.2.83. So you can use it for that in the way like as follows:
- CExtNCSB < CExtEdit should be used instead of CExtEdit - CExtNCSB < CEdit > instead of CEdit - CExtNCSB < CRichEditCtrl > instead of CRichEditCtrl - CExtNCSB < CListBox > instead of CListBox - and so on
CExtNCSB is applied to CExtComboBoxBase and CExtComboBox in the code so you should do nothing here..
|
|
Bangjun Lei
|
Feb 29, 2008 - 11:43 AM
|
Dear Sir./Madam.,
I’m using the trick at http://www.codeproject.com/KB/cpp/ProfUIS_Dialogs.aspx to have a nice skin for AfxMessageBox. This works pretty well on XP. However, when I run my system on Vista, the buttuons on the message box are not shown. Do you know why? Can you please help me on this?
Thank you very much!
|
|
Technical Support
|
Mar 1, 2008 - 12:04 PM
|
Unfortunately we do not support that article on CodeProject and cannot say why it is not working under Vista. You can contact Leshchuk Aleksey directly. Maybe he has some new updates for that code.
|
|
Thomas Maurer
|
Feb 29, 2008 - 8:37 AM
|
Hello
I am using V2.54 of the library so maybe certain things are only available in later versions.
Our customers ask for the following features:
- Is it possible to add an icon to the right side of the tab in order to close a tabbed window (as in the tabs of Firefox)?
- Is it possible to rearrange the tabbed windows by dragging the tab to another location?
Thanks in advance
Thomas
|
|
Technical Support
|
Mar 1, 2008 - 12:02 PM
|
1) We added support for a Close button in every tab in Prof-UIS 2.62 (read more about this in the version history)
2) Yes, it is possible. There is a __ETWS_ITEM_DRAGGING style and two methods (ItemDraggingSet() and ItemDraggingGet() ) in the tab page container class (CExtTabPageContainerWnd ), which allows the user to change the position of any tab with the mouse (in other words, by drag-and-dropping it)
In the MDI tabs you can add the __ETWS_ITEM_DRAGGING style as follows: m_wndMdiTabs.ModifyTabWndStyle( 0, __ETWS_ITEM_DRAGGING );
|
|
Offer Har
|
Feb 29, 2008 - 7:23 AM
|
Dear Support,
There is a small bug in CExtTreeGrid:
1) Have a tree grid with 2 resizeable columns 2) Have another control in the same dialog 3) Have the focus move to that other control 4) Hover over the columns separator and start drag the width of the column.
You will notice that in the first draw, the first cell is computed wrongly - the cell ignores the presence of the Tree box, and draws itself from the beginning of the cell, but in the coming draws it jumps back to the right place.
Note that this happens only if the tree control does not have focums while starting to drag the column width.
Regards, Ron.
|
|
Offer Har
|
Mar 18, 2008 - 11:07 AM
|
AGAIN:
Dear Support,
Did you get my clip? Were you able to reproduce the problem?
Regards, Ron.
|
|
Offer Har
|
Mar 24, 2008 - 5:09 AM
|
Dear Support, You can reproduce this bug using the above steps in the sample application I sent you fro the ItemHide bug I found. Please let me know if you received the mail with the sample application. Please let me know if you were able to reproduce both bugs. Ron.
|
|
Offer Har
|
Mar 3, 2008 - 2:59 PM
|
Dear Support,
Did you get my clip? Were you able to reproduce the problem?
Regards, Ron.
|
|
Offer Har
|
Mar 1, 2008 - 8:50 AM
|
Dear Support,
I was able to catch it in a video. I am sending it to you via mail.
Regards, Ron.
|
|
Offer Har
|
Mar 1, 2008 - 8:37 AM
|
I am only talking about the separator between the the two columns. Because this is a flicker, this is not something I can send you in a capture. I am sure that if you try it several times you will see it. This is a bug that needs some work for reproducing...
|
|
Technical Support
|
Mar 1, 2008 - 8:30 AM
|
The tree outline is present in the first column. You can resize the first column by dragging its right margin. You cannot drag its left margin near the outline. Please provide us with more details and/or screenshots demonstrating the problem.
|
|
Offer Har
|
Feb 29, 2008 - 5:03 AM
|
Dear Support,
I would like to remove the dotted lines between nodes. Can this be done?
Thanks, Ron.
|
|
Offer Har
|
Mar 18, 2008 - 11:08 AM
|
Asking AGAIN:
So I cannot remove the line that comes like from above the beginning of tree? What is then the benefit of having the function OnTreeGridQueryDrawOutline ?
|
|
Offer Har
|
Mar 1, 2008 - 8:39 AM
|
So I cannot remove the line that comes like from above the beginning of tree? What is then the benefit of having the function OnTreeGridQueryDrawOutline ?
|
|
Technical Support
|
Mar 1, 2008 - 8:31 AM
|
The CExtTreeGridWnd::ItemGetRoot() method returns a HTREEITEM handle to the root item which is un-removable. It’s always expanded and it always have a NULL parent item. All the other items can be expanded/collapsed and have non-NULL parent item. So, the outline painting algorithm is exactly the same for any level.
|
|
Offer Har
|
Feb 29, 2008 - 8:00 AM
|
One problem regarding this function: I would like to know if the line drawing is for the first level items, I don’t see the HTREEITEM of the line being drawn, so I don’t know how it get its parent.
I guess it’s the same question of how to get an HTREEITEM from a row & cell -correct?
|
|
Offer Har
|
Feb 29, 2008 - 7:56 AM
|
Got it - OnTreeGridQueryDrawOutline
|
|
Offer Har
|
Feb 29, 2008 - 4:55 AM
|
Dear Support,
I created a tree which should support sorting, but when the header is clicked I get into this assert:
bool CExtTreeGridDataProvider::SortOrderGet(
CExtGridDataSortOrder & _gdso,
bool bColumns // true = sort order for columns, false - for rows
) const
{
ASSERT_VALID( this );
_gdso;
bColumns;
// this method must never be invoked
ASSERT( FALSE );
return true;
} Obviously something is missing, but what? Thanks, Ron.
|
|
Technical Support
|
Mar 28, 2008 - 9:19 AM
|
Thank you for reporting the tree item hiding problem. It was not difficult to fix but was quite hard to find it. Please update the source code for the following method: void CExtTreeGridCellNode::TreeNodeHiddenSet(
CExtTreeGridDataProvider & _DP,
bool bHide
)
{
ASSERT_VALID( this );
ASSERT_VALID( (&_DP) );
ASSERT_KINDOF( CExtTreeGridDataProvider, (&_DP) );
bool bHidden = TreeNodeHiddenGet();
if( ( bHidden && bHide ) || ( (!bHidden) && (!bHide) ) )
return;
if( bHide )
{
if( TreeNodeIsDisplayed() )
{
ULONG nOffset = TreeNodeCalcOffset( true, false );
if( nOffset != ULONG(-1L) )
{
ASSERT( _DP.m_arrGridVis[ nOffset ] == this );
INT nCountToRemove = _ContentWeight_Get( true );
_DP.m_arrGridVis.RemoveAt( nOffset, nCountToRemove + 1 );
CExtTreeGridCellNode * pNodeParent = TreeNodeGetParent();
if( pNodeParent != NULL )
{
ASSERT_VALID( pNodeParent );
pNodeParent->_ContentWeight_Decrement( nCountToRemove + 1, true );
}
}
}
ModifyStyleEx( __EGCS_EX_HIDDEN_TREE_NODE, 0 );
} // if( bHide )
else
{
ModifyStyleEx( 0, __EGCS_EX_HIDDEN_TREE_NODE );
if( TreeNodeIsDisplayed() )
{
ULONG nOffset = TreeNodeCalcOffset( true, false );
if( nOffset != ULONG(-1L) )
{
INT nCountToInsert = _ContentWeight_Get( true );
_DP.m_arrGridVis.InsertAt( nOffset, NULL, nCountToInsert + 1 );
_DP.m_arrGridVis.SetAt( nOffset, this );
nOffset ++;
_Content_FillVisibleArray( _DP.m_arrGridVis, nOffset );
CExtTreeGridCellNode * pNodeParent = TreeNodeGetParent();
if( pNodeParent != NULL )
{
ASSERT_VALID( pNodeParent );
pNodeParent->_ContentWeight_Increment( nCountToInsert + 1, true );
}
}
}
} // else from if( bHide )
}
|
|
Offer Har
|
Mar 28, 2008 - 3:21 PM
|
Thanks - problem solved Now, what about the original question of this thread?...
|
|
Technical Support
|
Mar 31, 2008 - 11:58 AM
|
It would be easier for us to regard the root question in this thread as a feature request and implement tree sorting on a column header click as built-in behavior of the CExtTreeGridWnd class.
|
|
Offer Har
|
Mar 1, 2008 - 8:41 AM
|
Can you please explain what I should do so that the clicking of the column header will call the ItemSortChildren function? As I explained it crashes now, and you say there is a ItemSortChildren function, but it is not utilized when the header is clicked.
|
|
Technical Support
|
Mar 1, 2008 - 8:33 AM
|
The CExtTreeGridWnd::ItemSortChildren() method sorts child items of the specified tree item (root or any other). This method sorts only the children of one level and does not affect deeper level items. It’s possible to code some recursive method based on CExtTreeGridWnd::ItemSortChildren() method for any custom sorting of all the tree grid or its particular branches. But the CExtTreeGridWnd class does not support any kind of automatic sorting action as a reaction to the mouse click on some header cell at top/bottom because we have no idea which rows to sort or not in according to particular customer needs.
|
|
Offer Har
|
Mar 24, 2008 - 5:13 AM
|
Dear Support, How do I attach this to the existing columns header sorting mechanism? This is a tree grid hybrid, so when the user presses the columns header I need to sort according to the column the user pressed. This is when I get the assert. Regards, Ron,
|