Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Alastair Watts
|
Sep 6, 2010 - 9:24 AM
|
How do I insert a row into a filtered tree grid whilst honouring if/where the new row should be inserted, other than to: 1. Save filters 2. Clear filters 3. Insert item 4. restore filters
|
|
Alastair Watts
|
Sep 7, 2010 - 7:18 AM
|
It crashes calling ItemInsert(ItemGetRoot(), nIndex) when nIndex is greater than the number of visible rows, so I assumed nIndex was a visible index. Any sugestions?
|
|
Technical Support
|
Sep 8, 2010 - 7:26 AM
|
Could you show the call stack listing at the assertion time?
|
|
Alastair Watts
|
Sep 7, 2010 - 3:42 AM
|
Thanks for that. I manage my own sorting and want to insert an item between rows that may be hidden, can I do this without saving/clearing/restoring the filter? I would be nice if ItemInsert() could take a HTREEITEM instead of a visible row index & insert into the full grid whilst filters are applied - the new item only being displayed if it meets the filters criteria.
|
|
Technical Support
|
Sep 7, 2010 - 5:47 AM
|
The CExtTreeGridWnd::ItemInsert() method does what you need. The nIdxInsertBefore parameter is an index in the array of all child nodes including the hidden ones. The CExtTreeGridWnd::ItemGetSiblingIndexOf() method allows you to convert a tree item handle into its sibling index.
|
|
Technical Support
|
Sep 7, 2010 - 12:49 AM
|
You should insert a new row and initialize grid cells first. You don’t need to save/restore filters. The CExtGridWnd::OnGridFilterUpdateForColumns() / CExtGridWnd::OnGridFilterUpdateForRows() methods should be invoked to re-filter the grid control. The grid control uses these methods to re-filter edited data when the in-place grid cell editing is complete (CExtGridWnd::OnGridCellInputComplete() ).
|
|
Fransiscus Herry
|
Sep 5, 2010 - 2:13 PM
|
Dear Support, I have upgrade the Prof-uis Library to the current version. I would like to use your ResizablePropertySheet dialog and i love it. However, i found that the sample of ResizablePropertySheet you have provided is too much flicker. Especially when i resize the dialog box. The other think is when i click the mouse over the dialog is also create flicker at the first time. Do you have any suggestion as to how eliminate the flickering. I do not mind if the property dialog box stay on fix size. Please give me your advice. I am looking forward to hearing your respond. Thank you.
|
|
Technical Support
|
Sep 27, 2010 - 12:14 PM
|
Yes, it’s present in 2.90. We fixed it in 2.91 and we can provide you with the source code update.
|
|
Robert Fox
|
Sep 27, 2010 - 10:19 AM
|
We are experiencing this as well and are on 2.9.0
|
|
Technical Support
|
Sep 6, 2010 - 6:20 AM
|
Both flicker and layout problems already fixed in the Prof-UIS 2.91 pre-release version. Please drop us an e-mail to the support mail box at this web site so we will provide you with the source code update.
|
|
John Ritzenthaler
|
Aug 31, 2010 - 3:12 PM
|
I have a complex control inside a CExtResizableDialog. When this control has the focus, I use the tab key to navigate inside of it. This works fine inside a CDialog. But inside CExtResizableDialog, I’m not getting any OnKey or OnChar events for VK_TAB. Instead the dialog is moving the focus to another control in the dialog. The control returns DLGC_WANT_ALL_KEYS for OnGetDlgCode()
Is there any way to override this?
|
|
John Ritzenthaler
|
Sep 1, 2010 - 10:41 AM
|
Can you direct me to some place I could set a breakpoint and see if I can determine what’s happening?
|
|
Technical Support
|
Sep 2, 2010 - 11:12 AM
|
The CExtResizableDialog::PreTranslateMessage() method handles VK_TAB key pressing and invokes the CExtResizableDialog::stat_GetNextItemZ() method for searching for the next dialog item to focus.
|
|
Technical Support
|
Sep 1, 2010 - 7:19 AM
|
The CExtResizableDialog class uses a VK_TAB key processing code based on thread wide hooks. It is written from scratch. We tried to make this algorithm working exactly like the default dialog’s algorithm. It sends WM_GETDLGCODE messages to dialog controls and analyzes WS_TABSTOP , DS_CONTROL , WS_VISIBLE , WS_DISABLED and WS_EX_CONTROLPARENT styles (see the CExtResizableDialog::stat_GetNextItemZ() method’s source code). We carefully tested this algorithm and it worked like the standard dialog’s algorithm. We had to code it because the standard algorithm does not work with owner-draw skinned button controls like CExtButton , CExtCheckBox , CExtRadioButton and CExtHyperLinkButton . We had several issue reports about this algorithm more than year ago just when it appeared in Prof-UIS. All of them were fixed and nobody reported any new issues. So, it would be very interesting to re-check this algorithm and fix it if needed. Please provide us with more details or, even better, with some test project reproducing this issue.
|
|
John Ritzenthaler
|
Sep 3, 2010 - 2:37 PM
|
Turns out your logic onlty checks for DLGC_WANT_TAB. I had used DLGC_WANTALLKEYS, thinking that ALL keys would include VK_TAB. The Windows documentation is pretty ambiguous. Anyway, I OR’ed together all the flags and everything’s working fine. Thanks for your help.
|
|
Offer Har
|
Aug 31, 2010 - 5:34 AM
|
Dear Support, If I have 3 control-bars floating one next to each other (not touching each other, with some space between them) and I resize them, each one I resize gets a focus caption (in silver theme, an orange title). It seems that you do not refresh their title unless they overlap or something like this. Thanks, Ron.
|
|
Technical Support
|
Aug 31, 2010 - 12:54 PM
|
We cannot reproduce this with Prof-UIS 2.90.
|
|
Offer Har
|
Aug 29, 2010 - 8:38 AM
|
Hi, We upgraded to 2.90 from 2.87, and now, when we have a control-bar and we try to resize it by dragging its borders there is a delay of about a second between the start of the dragging until the dragging actualy begins. * This does not happen if the control-bar is the focused control-bar. It seems that you need to repaint it or something like this prior to moving it, and it causes a notable delay. * This was all tested in release version. Please fix. Thanks, Ron.
|
|
Technical Support
|
Aug 31, 2010 - 3:04 AM
|
We tried simple CExtControlBar control bars and dynamic CExtDynamicControlBar control bars on Windows XP SP3 and Office 2007 themes. The 200...300 millisecond delay can be reproduced only if:
1) Computer is not new and enough slow. The LG M1 Pro notebook for instance.
2) Debug application version is used.
3) Application creates many control bars and all of them are visible and docked inside the main frame and not auto-hidden. We used MDI_DynamicBars sample application.
The 200...300 millisecond delay in this case is the frame layout recalculation after un-docking the control bar. We can programmatically increase this delay using heavy timer handler code or heavy idle time processing code.
|
|
Offer Har
|
Aug 31, 2010 - 3:55 AM
|
Dear Support, 1) The computer is OK, but not new. 2) I am only testing in release mode. 3) How much is any? 10? 20? 30? 100? can you give me a number? My main input is that if prior to resizing, the control-bar had focus there is no delay, but if it does not have focus there is a delay - how can this be? why does it matter? We use some timers in our application, as it needs to update the UI, but why does it generates delays in Prof-UIS’s focus changing algorithms?
|
|
Technical Support
|
Aug 31, 2010 - 11:06 AM
|
30..50 bars is enough. The focus affects the OnCmdMsg() and PreTranslateMessage() routing. Some of these method implementations can be slower than other.
|
|
Technical Support
|
Aug 30, 2010 - 10:07 AM
|
Which sample app should we try to reproduce this? Which UI theme should be selected? Which Windows version?
|
|
Offer Har
|
Aug 31, 2010 - 2:30 AM
|
We are using Win XP SP3, with CExtPaintManagerOffice2007_Silver. We saw it in our application, I will try and reproduce it in a sample application, please try as well.
|
|
Offer Har
|
Aug 28, 2010 - 5:49 AM
|
Hi, Please see the 2 pictures below - these are two separate instances where tab control is used in 2010 black theme. The first one is just two docking bars filled with a grid control that they are tabbed together. You can see that the tab control have some dark-grey space beteween the grids and the tabs - this makes the tabs to look our of place. The second one is a CExtTabPageContainerWnd with two dialogs in it. Again, it seems a little off - there is no separation between the tab and contained dialogs, which makes it looks like the tabs are in mid-air. Please fix. Thanks, Ron.
|
|
Technical Support
|
Aug 31, 2010 - 12:52 PM
|
|
|
Technical Support
|
Aug 31, 2010 - 3:03 AM
|
We haven’t received it. Sorry. Please try to send it from other e-mail address or to our second email account profuis at gmail com.
|
|
Technical Support
|
Aug 30, 2010 - 6:00 AM
|
Fixed. Please send us e-mail so we will provide you with the source code update download.
|
|
Offer Har
|
Aug 31, 2010 - 2:28 AM
|
Dropped you an e-mail - didn’t get a reply...
|
|
Bogdan Munteanu
|
Aug 27, 2010 - 4:24 AM
|
The print preview feature in the project PropertyGrid, colors the property names in black. Is there a setup one could use to change that and make the info visible? I sent you also an email with a snapshot showing this issue ( I used VS 2008 on Windows XP Ultimate with the latest patches). Thank you, Bogdan
|
|
Bogdan Munteanu
|
Aug 29, 2010 - 7:36 PM
|
|
|
Offer Har
|
Aug 28, 2010 - 5:51 AM
|
This is the call-stack when it crashes with the dialog enlarged so no scrolling is needed to cause a crash:
> ProfUIS290md.dll!CExtTreeGridDataProvider::_Tree_MapRowToCache(unsigned long nRowNo=11) Line 2237 + 0x9 bytes C++
ProfUIS290md.dll!CExtTreeGridDataProvider::_Tree_NodeGetByVisibleRowIndex(unsigned long nRowNo=12) Line 970 + 0x16 bytes C++
ProfUIS290md.dll!CExtTreeGridDataProvider::TreeNodeGetByVisibleRowIndex(unsigned long nRowNo=12) Line 955 + 0x16 bytes C++
ProfUIS290md.dll!CExtTreeGridWnd::ItemGetByVisibleRowIndex(long nRowNo=12) Line 3073 + 0xc bytes C++
ProfUIS290md.dll!CExtTreeGridWnd::OnSiwQueryItemExtentV(long nRowNo=11, int * p_nExtraSpaceBefore=0x00000000, int * p_nExtraSpaceAfter=0x00000000) Line 5123 + 0x16 bytes C++
ProfUIS290md.dll!CExtGridBaseWnd::OnSiwCalcPageMetrics(int nDirection=0) Line 7480 + 0x1d bytes C++
ProfUIS290md.dll!CExtScrollItemWnd::OnSiwGetVisibleRange() Line 7159 + 0x18 bytes C++
ProfUIS290md.dll!CExtScrollItemWnd::OnSwUpdateScrollBars() Line 5801 + 0x1d bytes C++
ProfUIS290md.dll!CExtGridBaseWnd::OnSwUpdateScrollBars() Line 13048 C++
ProfUIS290md.dll!CExtTreeGridWnd::ItemInsert(_TREEITEM * hTreeItemParent=0x02cfa9a4, unsigned long nIdxInsertBefore=4294967295, unsigned long nInsertCount=1, bool bRedraw=true) Line 3531 + 0x12 bytes C++
TreeGridBug.exe!CComboProblemDlg::OnClick2() Line 399 + 0x2c bytes C++
|
|
Offer Har
|
Aug 28, 2010 - 5:51 AM
|
|
|
Technical Support
|
Aug 27, 2010 - 10:30 AM
|
Thank you for reporting this issue. Please update the source code for the following two methods:
void CExtPPVW < CExtPropertyGridCtrl > :: OnPreparePrinting_RenderCategoryName(
CPrintInfo * pInfo,
const CArray < CExtPropertyItem *, CExtPropertyItem * & > & arrPrintableItems,
const CArray < INT, INT & > & arrPrintableParents,
const INT * arrColumnWidths,
const CArray < INT, INT & > & arrRowHeights,
CExtGridWnd * pWndGrid,
INT nPageIndex,
LONG nRowNoFrom,
LONG nRowNoTo,
LONG nRowNo,
CDC & dc,
CExtPropertyCategory * pPropertyItem,
CRect & rcName,
__EXT_MFC_SAFE_LPCTSTR strName,
INT nIndentExt
)
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
ASSERT_VALID( pPropertyItem );
ASSERT( LPCTSTR(strName) != NULL );
ASSERT( 0 <= nRowNo && nRowNo < LONG(arrPrintableItems.GetSize()) );
ASSERT( LPVOID(arrPrintableItems[nRowNo]) == LPVOID(pPropertyItem) );
pInfo;
nPageIndex;
nRowNoFrom;
nRowNoTo;
arrPrintableItems;
arrPrintableParents;
arrColumnWidths;
arrRowHeights;
pPropertyItem;
pWndGrid;
nIndentExt;
nRowNo;
// { // BLOCK: begin (test custom background with lines)
// CRect rcLines = rcCategoryName;
// rcLines.right ++;
// rcLines.bottom ++;
// HGDIOBJ hOldBrush = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(WHITE_BRUSH) );
// HGDIOBJ hOldPen = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(NULL_PEN) );
// dc.Rectangle( &rcLines );
// ::SelectObject( dc.m_hDC, hOldPen );
// ::SelectObject( dc.m_hDC, hOldBrush );
// } // BLOCK: end (test custom background with lines)
INT nNameLen = nNameLen = INT( _tcslen( LPCTSTR(strName) ) );
COLORREF clrOldText = dc.SetTextColor( RGB(0,0,0) );
INT nOldBkMode = dc.SetBkMode( TRANSPARENT );
CExtRichContentLayout::stat_DrawText( dc.m_hDC, strName, nNameLen, &rcName, DT_SINGLELINE|DT_LEFT|DT_VCENTER|DT_NOCLIP, 0 );
dc.SetBkMode( nOldBkMode );
dc.SetTextColor( clrOldText );
// { // BLOCK: begin (test custom background with lines)
// CRect rcLines = rcCategoryName;
// rcLines.right ++;
// rcLines.bottom ++;
// HGDIOBJ hOldBrush = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(NULL_BRUSH) );
// HGDIOBJ hOldPen = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(BLACK_PEN) );
// dc.Rectangle( &rcLines );
// ::SelectObject( dc.m_hDC, hOldPen );
// ::SelectObject( dc.m_hDC, hOldBrush );
// } // BLOCK: end (test custom background with lines)
if( m_bDrawSimpleBlackOutline )
{
CExtPropertyStore * pPS = PropertyStoreGet();
ASSERT_VALID( pPS );
if( LPVOID(pPropertyItem->ItemParentGet()) != LPVOID(pPS) )
{
CExtPropertyItem * pWalkItem = pPropertyItem;
INT nIndentLevel = 1;
INT nWalkRowNo = INT(nRowNo);
for( ; LPVOID(pWalkItem) != LPVOID(pPS); )
{
INT nParentWalkRowNo = arrPrintableParents[ nWalkRowNo ];
nWalkRowNo = nParentWalkRowNo;
if( nWalkRowNo < 0 )
break;
pWalkItem = arrPrintableItems[ nWalkRowNo ];
ASSERT_VALID( pWalkItem );
nIndentLevel ++;
}
if( nIndentLevel > 1 )
{
HGDIOBJ hOldBrush = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(NULL_BRUSH) );
HGDIOBJ hOldPen = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(BLACK_PEN) );
COLORREF clrDots = RGB( 0, 0, 0 );
CRect rcIndent(
rcName.left,
rcName.top,
rcName.left,
rcName.bottom
);
pWalkItem = pPropertyItem;
nWalkRowNo = INT(nRowNo);
INT nPxIndent = rcName.left / (nIndentLevel-1);
for( ; LPVOID(pWalkItem) != LPVOID(pPS); )
{
ASSERT( pWalkItem != NULL );
INT nParentWalkRowNo = arrPrintableParents[ nWalkRowNo ];
if( nParentWalkRowNo >= 0 && LPVOID(arrPrintableItems[ nParentWalkRowNo ]) == LPVOID(pPS) )
break;
rcIndent.right = rcIndent.left;
rcIndent.left -= nPxIndent;
INT nMetricH = rcIndent.Width();
INT nMetricH2 = nMetricH / 2;
INT nMetricV = rcIndent.Height();
INT nMetricV2 = min( nMetricH, nMetricV );
nMetricV2 /= 2;
bool bDrawUpperLineV = false;
if( LPVOID(pPropertyItem) == LPVOID(pWalkItem) )
{
if( m_bDrawSimpleBlackOutlineUsingDots )
CExtPaintManager::stat_DrawDotLineH(
dc,
rcIndent.left + nMetricH2,
rcIndent.right,
rcIndent.top + nMetricV2,
clrDots
);
else
{
dc.MoveTo(
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2
);
dc.LineTo(
rcIndent.right,
rcIndent.top + nMetricV2
);
}
bDrawUpperLineV = true;
}
CExtPropertyItem * pWalkItemNext = NULL;
if( nParentWalkRowNo >= 0 )
{
// CExtPropertyItem * pParent = arrPrintableItems[ nParentWalkRowNo ];
CExtPropertyItem * pParent = pWalkItem->ItemParentGet();
ASSERT_VALID( pParent );
INT nWalkRealSiblingIndex = pParent->ItemGetIndexOf( pWalkItem );
ASSERT( nWalkRealSiblingIndex >= 0 );
INT nRealSiblingCount = pParent->ItemGetCount();
if( nWalkRealSiblingIndex < ( nRealSiblingCount - 1 ) )
pWalkItemNext = pParent->ItemGetAt( nWalkRealSiblingIndex + 1 );
}
if( pWalkItemNext != NULL )
{
if( m_bDrawSimpleBlackOutlineUsingDots )
CExtPaintManager::stat_DrawDotLineV(
dc,
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2,
rcIndent.bottom,
clrDots
);
else
{
dc.MoveTo(
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2
);
dc.LineTo(
rcIndent.left + nMetricH2,
rcIndent.bottom
);
}
bDrawUpperLineV = true;
}
if( bDrawUpperLineV )
{
if( m_bDrawSimpleBlackOutlineUsingDots )
CExtPaintManager::stat_DrawDotLineV(
dc,
rcIndent.left + nMetricH2,
rcIndent.top,
rcIndent.top + nMetricV2,
clrDots
);
else
{
dc.MoveTo(
rcIndent.left + nMetricH2,
rcIndent.top
);
dc.LineTo(
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2
);
}
}
nWalkRowNo = nParentWalkRowNo;
if( nWalkRowNo < 0 )
break;
pWalkItem = arrPrintableItems[ nWalkRowNo ];
ASSERT_VALID( pWalkItem );
} // for( ...
::SelectObject( dc.m_hDC, hOldPen );
::SelectObject( dc.m_hDC, hOldBrush );
} // if( nIndentLevel > 1 )
} // if( LPVOID(pPropertyItem->ItemParentGet()) != LPVOID(pPS) )
} // if( m_bDrawSimpleBlackOutline )
}
void CExtPPVW < CExtPropertyGridCtrl > :: OnPreparePrinting_RenderPropertyItemCaption(
CPrintInfo * pInfo,
const CArray < CExtPropertyItem *, CExtPropertyItem * & > & arrPrintableItems,
const CArray < INT, INT & > & arrPrintableParents,
const INT * arrColumnWidths,
const CArray < INT, INT & > & arrRowHeights,
CExtGridWnd * pWndGrid,
INT nPageIndex,
LONG nRowNoFrom,
LONG nRowNoTo,
LONG nRowNo,
CDC & dc,
CExtPropertyItem * pPropertyItem,
CRect & rcName,
__EXT_MFC_SAFE_LPCTSTR strName,
INT nIndentExt
)
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
ASSERT_VALID( pPropertyItem );
ASSERT( LPCTSTR(strName) != NULL );
ASSERT( 0 <= nRowNo && nRowNo < LONG(arrPrintableItems.GetSize()) );
ASSERT( LPVOID(arrPrintableItems[nRowNo]) == LPVOID(pPropertyItem) );
pInfo;
nPageIndex;
nRowNoFrom;
nRowNoTo;
arrPrintableItems;
arrPrintableParents;
arrColumnWidths;
arrRowHeights;
pPropertyItem;
pWndGrid;
nIndentExt;
nRowNo;
if( m_bDrawSimpleWhiteBackground )
{
CRect rcLines = rcName;
rcLines.right ++;
rcLines.bottom ++;
HGDIOBJ hOldBrush = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(WHITE_BRUSH) );
HGDIOBJ hOldPen = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(NULL_PEN) );
dc.Rectangle( &rcLines );
::SelectObject( dc.m_hDC, hOldPen );
::SelectObject( dc.m_hDC, hOldBrush );
} // if( m_bDrawSimpleWhiteBackground )
INT nNameLen = nNameLen = INT( _tcslen( LPCTSTR(strName) ) );
COLORREF clrOldText = dc.SetTextColor( RGB(0,0,0) );
INT nOldBkMode = dc.SetBkMode( TRANSPARENT );
CExtRichContentLayout::stat_DrawText( dc.m_hDC, strName, nNameLen, &rcName, DT_SINGLELINE|DT_LEFT|DT_VCENTER|DT_NOCLIP, 0 );
dc.SetBkMode( nOldBkMode );
dc.SetTextColor( clrOldText );
if( m_bDrawSimpleBlackBorders )
{
CRect rcLines = rcName;
rcLines.left = 0;
rcLines.right ++;
rcLines.bottom ++;
HGDIOBJ hOldBrush = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(NULL_BRUSH) );
HGDIOBJ hOldPen = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(BLACK_PEN) );
dc.Rectangle( &rcLines );
::SelectObject( dc.m_hDC, hOldPen );
::SelectObject( dc.m_hDC, hOldBrush );
} // if( m_bDrawSimpleBlackBorders )
if( m_bDrawSimpleBlackOutline )
{
CExtPropertyStore * pPS = PropertyStoreGet();
ASSERT_VALID( pPS );
if( LPVOID(pPropertyItem->ItemParentGet()) != LPVOID(pPS) )
{
CExtPropertyItem * pWalkItem = pPropertyItem;
INT nIndentLevel = 1;
INT nWalkRowNo = INT(nRowNo);
for( ; LPVOID(pWalkItem) != LPVOID(pPS); )
{
INT nParentWalkRowNo = arrPrintableParents[ nWalkRowNo ];
nWalkRowNo = nParentWalkRowNo;
if( nWalkRowNo < 0 )
break;
pWalkItem = arrPrintableItems[ nWalkRowNo ];
ASSERT_VALID( pWalkItem );
nIndentLevel ++;
}
if( nIndentLevel > 1 )
{
HGDIOBJ hOldBrush = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(NULL_BRUSH) );
HGDIOBJ hOldPen = ::SelectObject( dc.m_hDC, (HGDIOBJ)::GetStockObject(BLACK_PEN) );
COLORREF clrDots = RGB( 0, 0, 0 );
CRect rcIndent(
rcName.left,
rcName.top,
rcName.left,
rcName.bottom
);
pWalkItem = pPropertyItem;
nWalkRowNo = INT(nRowNo);
INT nPxIndent = rcName.left / (nIndentLevel-1);
for( ; LPVOID(pWalkItem) != LPVOID(pPS); )
{
ASSERT( pWalkItem != NULL );
INT nParentWalkRowNo = arrPrintableParents[ nWalkRowNo ];
if( nParentWalkRowNo >= 0 && LPVOID(arrPrintableItems[ nParentWalkRowNo ]) == LPVOID(pPS) )
break;
rcIndent.right = rcIndent.left;
rcIndent.left -= nPxIndent;
INT nMetricH = rcIndent.Width();
INT nMetricH2 = nMetricH / 2;
INT nMetricV = rcIndent.Height();
INT nMetricV2 = min( nMetricH, nMetricV );
nMetricV2 /= 2;
bool bDrawUpperLineV = false;
if( LPVOID(pPropertyItem) == LPVOID(pWalkItem) )
{
if( m_bDrawSimpleBlackOutlineUsingDots )
CExtPaintManager::stat_DrawDotLineH(
dc,
rcIndent.left + nMetricH2,
rcIndent.right,
rcIndent.top + nMetricV2,
clrDots
);
else
{
dc.MoveTo(
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2
);
dc.LineTo(
rcIndent.right,
rcIndent.top + nMetricV2
);
}
bDrawUpperLineV = true;
}
CExtPropertyItem * pWalkItemNext = NULL;
if( nParentWalkRowNo >= 0 )
{
// CExtPropertyItem * pParent = arrPrintableItems[ nParentWalkRowNo ];
CExtPropertyItem * pParent = pWalkItem->ItemParentGet();
ASSERT_VALID( pParent );
INT nWalkRealSiblingIndex = pParent->ItemGetIndexOf( pWalkItem );
ASSERT( nWalkRealSiblingIndex >= 0 );
INT nRealSiblingCount = pParent->ItemGetCount();
if( nWalkRealSiblingIndex < ( nRealSiblingCount - 1 ) )
pWalkItemNext = pParent->ItemGetAt( nWalkRealSiblingIndex + 1 );
}
if( pWalkItemNext != NULL )
{
if( m_bDrawSimpleBlackOutlineUsingDots )
CExtPaintManager::stat_DrawDotLineV(
dc,
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2,
rcIndent.bottom,
clrDots
);
else
{
dc.MoveTo(
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2
);
dc.LineTo(
rcIndent.left + nMetricH2,
rcIndent.bottom
);
}
bDrawUpperLineV = true;
}
if( bDrawUpperLineV )
{
if( m_bDrawSimpleBlackOutlineUsingDots )
CExtPaintManager::stat_DrawDotLineV(
dc,
rcIndent.left + nMetricH2,
rcIndent.top,
rcIndent.top + nMetricV2,
clrDots
);
else
{
dc.MoveTo(
rcIndent.left + nMetricH2,
rcIndent.top
);
dc.LineTo(
rcIndent.left + nMetricH2,
rcIndent.top + nMetricV2
);
}
}
nWalkRowNo = nParentWalkRowNo;
if( nWalkRowNo < 0 )
break;
pWalkItem = arrPrintableItems[ nWalkRowNo ];
ASSERT_VALID( pWalkItem );
} // for( ...
::SelectObject( dc.m_hDC, hOldPen );
::SelectObject( dc.m_hDC, hOldBrush );
} // if( nIndentLevel > 1 )
} // if( LPVOID(pPropertyItem->ItemParentGet()) != LPVOID(pPS) )
} // if( m_bDrawSimpleBlackOutline )
}
|
|
Offer Har
|
Aug 27, 2010 - 1:07 AM
|
Dear Support, We found a bug after calling ItemHide in 2.87. We are also sending you an application to reproduce the crash. The crash happens in the following squence: 1) Adding a few nodes with leafs, expanding the node (ItemExpand ) 2) Hiding one node from the middle of the tree, and adding leafs to the last node If the whole tree is visible, the crash will happen when adding the leaf to the last node when OnSwUpdateScrollBars is called. If the last node is not visible, the crash will happen as soon as you scroll to the last node. Please let us know that you received the application via mail. Thanks, Ron.
|
|
Technical Support
|
Aug 27, 2010 - 10:29 AM
|
Thank you for providing us with the test project. It crashes with Prof-UIS 2.87. It works with Prof-UIS 2.90. So, the fix is Prof-UIS 2.90.
|
|
Offer Har
|
Aug 28, 2010 - 5:52 AM
|
Dear Support, This is the crash when the dialog is enlarged before pressing the two buttons, and causing the crash right at the button 2 clicking:
> ProfUIS290md.dll!CExtTreeGridDataProvider::_Tree_MapRowToCache(unsigned long nRowNo=11) Line 2237 + 0x9 bytes C++
ProfUIS290md.dll!CExtTreeGridDataProvider::_Tree_NodeGetByVisibleRowIndex(unsigned long nRowNo=12) Line 970 + 0x16 bytes C++
ProfUIS290md.dll!CExtTreeGridDataProvider::TreeNodeGetByVisibleRowIndex(unsigned long nRowNo=12) Line 955 + 0x16 bytes C++
ProfUIS290md.dll!CExtTreeGridWnd::ItemGetByVisibleRowIndex(long nRowNo=12) Line 3073 + 0xc bytes C++
ProfUIS290md.dll!CExtTreeGridWnd::OnSiwQueryItemExtentV(long nRowNo=11, int * p_nExtraSpaceBefore=0x00000000, int * p_nExtraSpaceAfter=0x00000000) Line 5123 + 0x16 bytes C++
ProfUIS290md.dll!CExtGridBaseWnd::OnSiwCalcPageMetrics(int nDirection=0) Line 7480 + 0x1d bytes C++
ProfUIS290md.dll!CExtScrollItemWnd::OnSiwGetVisibleRange() Line 7159 + 0x18 bytes C++
ProfUIS290md.dll!CExtScrollItemWnd::OnSwUpdateScrollBars() Line 5801 + 0x1d bytes C++
ProfUIS290md.dll!CExtGridBaseWnd::OnSwUpdateScrollBars() Line 13048 C++
ProfUIS290md.dll!CExtTreeGridWnd::ItemInsert(_TREEITEM * hTreeItemParent=0x02cfa9a4, unsigned long nIdxInsertBefore=4294967295, unsigned long nInsertCount=1, bool bRedraw=true) Line 3531 + 0x12 bytes C++
TreeGridBug.exe!CComboProblemDlg::OnClick2() Line 399 + 0x2c bytes C++
|
|
Technical Support
|
Aug 28, 2010 - 9:11 AM
|
Fixed. Please update the source code for the following method:
CExtTreeGridCellNode * CExtTreeGridDataProvider::_Tree_NodeInsert(
CExtTreeGridCellNode * pNodeParent,
ULONG nIdxInsertBefore, // = (ULONG(-1L)) // if (ULONG(-1L)) - insert to end
ULONG nInsertCount // = 1
) // returns pointer to first inserted
{
__EXT_DEBUG_GRID_ASSERT_VALID( this );
if( nInsertCount == 0 )
return NULL;
CExtGridDataProvider & _DP = _Tree_GetCacheDP();
CExtTreeGridCellNode * pNodeRoot = _Tree_NodeGetRoot();
if( pNodeParent == NULL )
{
pNodeParent = pNodeRoot;
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeParent );
} // if( pNodeParent == NULL )
else
{
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeParent );
__EXT_DEBUG_GRID_ASSERT( LPCVOID(pNodeParent->DataProviderGet()) == LPCVOID(&_DP) );
} // else from if( pNodeParent == NULL )
ULONG nParentChildCount = pNodeParent->TreeNodeGetChildCount();
if( nIdxInsertBefore == ULONG(-1L)
|| nIdxInsertBefore > nParentChildCount
)
nIdxInsertBefore = nParentChildCount;
ULONG nReservedRowCount = 0;
_DP.CacheReservedCountsGet( NULL, &nReservedRowCount );
ULONG nAdditionalOffsetTotal = 0;
ULONG nAdditionalOffsetVisible = 0;
ULONG nVisibleOffset = 0;
ULONG nInsertOffset = nReservedRowCount;
CExtTreeGridCellNode * pNodeCompute = pNodeParent;
if( nIdxInsertBefore != 0 )
{
__EXT_DEBUG_GRID_ASSERT( nIdxInsertBefore <= nParentChildCount );
if( nIdxInsertBefore == nParentChildCount )
{
nAdditionalOffsetTotal =
pNodeParent->_ContentWeight_Get( false );
nAdditionalOffsetVisible =
pNodeParent->_ContentWeight_Get( true );
if( pNodeParent != pNodeRoot )
{
nAdditionalOffsetTotal ++;
nAdditionalOffsetVisible ++;
}
}
else
pNodeCompute = pNodeParent->TreeNodeGetChildAt( nIdxInsertBefore );
}
else
{
if( pNodeParent != pNodeRoot )
{
nAdditionalOffsetTotal = 1;
nAdditionalOffsetVisible = 1;
}
}
nInsertOffset += pNodeCompute->TreeNodeCalcOffset( false );
if( pNodeParent->TreeNodeIsDisplayed()
&& pNodeParent->TreeNodeIsExpanded()
)
nVisibleOffset += pNodeCompute->TreeNodeCalcOffset( true, false ) + nAdditionalOffsetVisible;
else
nVisibleOffset = ULONG(-1L);
nInsertOffset += nAdditionalOffsetTotal;
if( ! _DP.RowInsert( nInsertOffset, nInsertCount ) )
return NULL;
CExtTreeGridCellNode * pNodeRetVal = NULL;
ULONG nIdx = 0;
for( ; nIdx < nInsertCount; nIdx++ )
{
ULONG nEffectiveIdx = nInsertOffset + nIdx;
CExtTreeGridCellNode * pNodeCurr =
STATIC_DOWNCAST( CExtTreeGridCellNode, _DP.CellGet( 0, nEffectiveIdx, _Tree_NodeGetRTC() ) );
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeCurr );
_Tree_NodeAdjustProps( pNodeCurr );
m_arrGridRef.InsertAt( nEffectiveIdx - nReservedRowCount, pNodeCurr );
if( nVisibleOffset != ULONG(-1L) )
m_arrGridVis.InsertAt( nVisibleOffset + nIdx, pNodeCurr );
pNodeCurr->m_pNodeParent = pNodeParent;
ULONG nSiblingIdx = nIdxInsertBefore + nIdx;
pNodeParent->m_arrChildren.InsertAt( nSiblingIdx, pNodeCurr, 1 );
pNodeCurr->m_nOptIndex = nSiblingIdx;
if( nIdx == 0 )
pNodeRetVal = pNodeCurr;
CExtTreeGridCellNode * pNodePrev = NULL, * pNodeNext = NULL;
if( nSiblingIdx > 0 )
{
pNodePrev = pNodeParent->m_arrChildren.GetAt( nSiblingIdx - 1 );
__EXT_DEBUG_GRID_ASSERT_VALID( pNodePrev );
} // if( nSiblingIdx > 0 )
if( nSiblingIdx < ULONG(pNodeParent->m_arrChildren.GetSize()-1) )
{
pNodeNext = pNodeParent->m_arrChildren.GetAt( nSiblingIdx + 1 );
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeNext );
} // if( nSiblingIdx < ULONG(pNodeParent->m_arrChildren.GetSize()-1) )
if( pNodePrev != NULL )
{
pNodePrev->m_pNodeNext = pNodeCurr;
pNodeCurr->m_pNodePrev = pNodePrev;
} // if( pNodePrev != NULL )
if( pNodeNext != NULL )
{
pNodeNext->m_pNodePrev = pNodeCurr;
pNodeCurr->m_pNodeNext = pNodeNext;
} // if( pNodeNext != NULL )
} // for( ; nIdx < nInsertCount; nIdx++ )
ULONG nResetIdx, nResetCnt = ULONG(pNodeParent->m_arrChildren.GetSize());
for( nResetIdx = nIdxInsertBefore; nResetIdx < nResetCnt; nResetIdx++ )
{
CExtTreeGridCellNode * pNode = (CExtTreeGridCellNode *) pNodeParent->m_arrChildren.GetAt( nResetIdx );
__EXT_DEBUG_GRID_ASSERT_VALID( pNode );
__EXT_DEBUG_GRID_ASSERT_KINDOF( CExtTreeGridCellNode, pNode );
pNode->m_nOptIndex = nResetIdx;
} // for( nResetIdx = nIdxInsertBefore; nResetIdx < nResetCnt; nResetIdx++ )
if( nVisibleOffset != ULONG(-1L) )
pNodeParent->_ContentWeight_Increment( nInsertCount, false );
else
pNodeParent->_ContentWeight_IncrementNonExpanded( nInsertCount );
return pNodeRetVal;
}
|
|
Offer Har
|
Aug 28, 2010 - 12:28 AM
|
Dear Support, It crashes in 2.90 as well - please check with the official version you released. Below is the call stack with the sample application I sent you when crashing it 2.90. Please fix this - we need this feature. Thanks, Ron. > ProfUIS290md.dll!CExtTreeGridDataProvider::_Tree_MapRowToCache(unsigned long nRowNo=11) Line 2237 + 0x9 bytes C++
ProfUIS290md.dll!CExtTreeGridDataProvider::_Tree_NodeGetByVisibleRowIndex(unsigned long nRowNo=12) Line 970 + 0x16 bytes C++
ProfUIS290md.dll!CExtTreeGridDataProvider::TreeNodeGetByVisibleRowIndex(unsigned long nRowNo=12) Line 955 + 0x16 bytes C++
ProfUIS290md.dll!CExtTreeGridWnd::ItemGetByVisibleRowIndex(long nRowNo=12) Line 3073 + 0xc bytes C++
ProfUIS290md.dll!CExtTreeGridWnd::OnSiwQueryItemExtentV(long nRowNo=11, int * p_nExtraSpaceBefore=0x00000000, int * p_nExtraSpaceAfter=0x00000000) Line 5123 + 0x16 bytes C++
ProfUIS290md.dll!CExtGridBaseWnd::OnSiwCalcPageMetrics(int nDirection=0) Line 7480 + 0x1d bytes C++
ProfUIS290md.dll!CExtScrollItemWnd::OnSwGetPageSize(int nDirection=0) Line 6200 + 0x1a bytes C++
ProfUIS290md.dll!CExtGridBaseWnd::OnSwDoScrollBy(CSize sizeScroll={...}, bool bDoScroll=true) Line 7527 + 0x18 bytes C++
ProfUIS290md.dll!CExtScrollItemWnd::OnSwDoScroll(unsigned int nScrollCode=1535, unsigned int nPos=1, bool bDoScroll=true) Line 6997 + 0x33 bytes C++
ProfUIS290md.dll!CExtScrollWnd::OnVScroll(unsigned int nSBCode=5, unsigned int nPos=1, CScrollBar * pScrollBar=0x0012fd44) Line 4855 + 0x30 bytes C++
mfc80d.dll!CWnd::OnWndMsg(unsigned int message=277, unsigned int wParam=65541, long lParam=2496342, long * pResult=0x0012d1d0) Line 2118 C++
mfc80d.dll!CWnd::WindowProc(unsigned int message=277, unsigned int wParam=65541, long lParam=2496342) Line 1741 + 0x20 bytes C++
ProfUIS290md.dll!CExtScrollWnd::WindowProc(unsigned int message=277, unsigned int wParam=65541, long lParam=2496342) Line 4974 C++
ProfUIS290md.dll!CExtGridBaseWnd::WindowProc(unsigned int message=277, unsigned int wParam=65541, long lParam=2496342) Line 13197 C++
mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x0012f38c, HWND__ * hWnd=0x000816f0, unsigned int nMsg=277, unsigned int wParam=65541, long lParam=2496342) Line 240 + 0x1c bytes C++
mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x000816f0, unsigned int nMsg=277, unsigned int wParam=65541, long lParam=2496342) Line 389 C++
mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x000816f0, unsigned int nMsg=277, unsigned int wParam=65541, long lParam=2496342) Line 411 + 0x15 bytes C++
user32.dll!7e418734()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!7e418816()
user32.dll!7e428ea0()
user32.dll!7e428eec()
ntdll.dll!7c90e473()
user32.dll!7e4194be()
user32.dll!7e42c174()
user32.dll!7e42f40b()
ProfUIS290md.dll!CExtScrollBar::_SetScrollPos(int nPos=1, bool bTrackPos=true, bool bRedraw=false, bool bSendScrollingNotification=true) Line 687 + 0x54 bytes C++
ProfUIS290md.dll!CExtScrollBar::ScrollBar_TrackMouseLButtonDown(tagMSG * pMSG=0x0012da7c) Line 2353 + 0x1f bytes C++
ProfUIS290md.dll!CExtScrollBar::ScrollBar_OnMouseClickMsg(tagMSG * pMSG=0x0012da7c) Line 1735 + 0x16 bytes C++
ProfUIS290md.dll!CExtScrollBar::OnLButtonDown(unsigned int nFlags=1, CPoint point={...}) Line 1791 C++
mfc80d.dll!CWnd::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=2162696, long * pResult=0x0012dbf8) Line 2169 C++
mfc80d.dll!CWnd::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=2162696) Line 1741 + 0x20 bytes C++
ProfUIS290md.dll!CExtScrollBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=2162696) Line 455 + 0x14 bytes C++
mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x0012fd44, HWND__ * hWnd=0x00261756, unsigned int nMsg=513, unsigned int wParam=1, long lParam=2162696) Line 240 + 0x1c bytes C++
mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00261756, unsigned int nMsg=513, unsigned int wParam=1, long lParam=2162696) Line 389 C++
mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00261756, unsigned int nMsg=513, unsigned int wParam=1, long lParam=2162696) Line 411 + 0x15 bytes C++
user32.dll!7e418734()
user32.dll!7e418816()
user32.dll!7e4189cd()
user32.dll!7e4196c7()
mfc80d.dll!AfxInternalPumpMessage() Line 183 C++
mfc80d.dll!CWinThread::PumpMessage() Line 896 C++
mfc80d.dll!AfxPumpMessage() Line 190 + 0xd bytes C++
mfc80d.dll!CWnd::RunModalLoop(unsigned long dwFlags=4) Line 4322 + 0x5 bytes C++
ProfUIS290md.dll!CExtResDlg::_DoModalImpl() Line 6394 + 0xc bytes C++
ProfUIS290md.dll!CExtResDlg::DoModal() Line 6338 + 0x12 bytes C++
TreeGridBug.exe!CComboProblemApp::InitInstance() Line 65 + 0xe bytes C++
mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f2a, int nCmdShow=1) Line 37 + 0xd bytes C++
TreeGridBug.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f2a, int nCmdShow=1) Line 33 C++
TreeGridBug.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C
TreeGridBug.exe!WinMainCRTStartup() Line 414 C
kernel32.dll!7c817077()
ProfUIS290md.dll!CExtDynTabControlBar::OnCreate(tagCREATESTRUCTA * lpCreateStruct=0x00730065) Line 1302 + 0xc bytes C++
ProfUIS290md.dll!CExtCustomizeCmdScreenTip::_GetBaseClass() Line 117 + 0xf bytes C++
81f0558b()
|
|
Technical Support
|
Aug 28, 2010 - 9:11 AM
|
Fixed. Please update the source code for the following method:
CExtTreeGridCellNode * CExtTreeGridDataProvider::_Tree_NodeInsert(
CExtTreeGridCellNode * pNodeParent,
ULONG nIdxInsertBefore, // = (ULONG(-1L)) // if (ULONG(-1L)) - insert to end
ULONG nInsertCount // = 1
) // returns pointer to first inserted
{
__EXT_DEBUG_GRID_ASSERT_VALID( this );
if( nInsertCount == 0 )
return NULL;
CExtGridDataProvider & _DP = _Tree_GetCacheDP();
CExtTreeGridCellNode * pNodeRoot = _Tree_NodeGetRoot();
if( pNodeParent == NULL )
{
pNodeParent = pNodeRoot;
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeParent );
} // if( pNodeParent == NULL )
else
{
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeParent );
__EXT_DEBUG_GRID_ASSERT( LPCVOID(pNodeParent->DataProviderGet()) == LPCVOID(&_DP) );
} // else from if( pNodeParent == NULL )
ULONG nParentChildCount = pNodeParent->TreeNodeGetChildCount();
if( nIdxInsertBefore == ULONG(-1L)
|| nIdxInsertBefore > nParentChildCount
)
nIdxInsertBefore = nParentChildCount;
ULONG nReservedRowCount = 0;
_DP.CacheReservedCountsGet( NULL, &nReservedRowCount );
ULONG nAdditionalOffsetTotal = 0;
ULONG nAdditionalOffsetVisible = 0;
ULONG nVisibleOffset = 0;
ULONG nInsertOffset = nReservedRowCount;
CExtTreeGridCellNode * pNodeCompute = pNodeParent;
if( nIdxInsertBefore != 0 )
{
__EXT_DEBUG_GRID_ASSERT( nIdxInsertBefore <= nParentChildCount );
if( nIdxInsertBefore == nParentChildCount )
{
nAdditionalOffsetTotal =
pNodeParent->_ContentWeight_Get( false );
nAdditionalOffsetVisible =
pNodeParent->_ContentWeight_Get( true );
if( pNodeParent != pNodeRoot )
{
nAdditionalOffsetTotal ++;
nAdditionalOffsetVisible ++;
}
}
else
pNodeCompute = pNodeParent->TreeNodeGetChildAt( nIdxInsertBefore );
}
else
{
if( pNodeParent != pNodeRoot )
{
nAdditionalOffsetTotal = 1;
nAdditionalOffsetVisible = 1;
}
}
nInsertOffset += pNodeCompute->TreeNodeCalcOffset( false );
if( pNodeParent->TreeNodeIsDisplayed()
&& pNodeParent->TreeNodeIsExpanded()
)
nVisibleOffset += pNodeCompute->TreeNodeCalcOffset( true, false ) + nAdditionalOffsetVisible;
else
nVisibleOffset = ULONG(-1L);
nInsertOffset += nAdditionalOffsetTotal;
if( ! _DP.RowInsert( nInsertOffset, nInsertCount ) )
return NULL;
CExtTreeGridCellNode * pNodeRetVal = NULL;
ULONG nIdx = 0;
for( ; nIdx < nInsertCount; nIdx++ )
{
ULONG nEffectiveIdx = nInsertOffset + nIdx;
CExtTreeGridCellNode * pNodeCurr =
STATIC_DOWNCAST( CExtTreeGridCellNode, _DP.CellGet( 0, nEffectiveIdx, _Tree_NodeGetRTC() ) );
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeCurr );
_Tree_NodeAdjustProps( pNodeCurr );
m_arrGridRef.InsertAt( nEffectiveIdx - nReservedRowCount, pNodeCurr );
if( nVisibleOffset != ULONG(-1L) )
m_arrGridVis.InsertAt( nVisibleOffset + nIdx, pNodeCurr );
pNodeCurr->m_pNodeParent = pNodeParent;
ULONG nSiblingIdx = nIdxInsertBefore + nIdx;
pNodeParent->m_arrChildren.InsertAt( nSiblingIdx, pNodeCurr, 1 );
pNodeCurr->m_nOptIndex = nSiblingIdx;
if( nIdx == 0 )
pNodeRetVal = pNodeCurr;
CExtTreeGridCellNode * pNodePrev = NULL, * pNodeNext = NULL;
if( nSiblingIdx > 0 )
{
pNodePrev = pNodeParent->m_arrChildren.GetAt( nSiblingIdx - 1 );
__EXT_DEBUG_GRID_ASSERT_VALID( pNodePrev );
} // if( nSiblingIdx > 0 )
if( nSiblingIdx < ULONG(pNodeParent->m_arrChildren.GetSize()-1) )
{
pNodeNext = pNodeParent->m_arrChildren.GetAt( nSiblingIdx + 1 );
__EXT_DEBUG_GRID_ASSERT_VALID( pNodeNext );
} // if( nSiblingIdx < ULONG(pNodeParent->m_arrChildren.GetSize()-1) )
if( pNodePrev != NULL )
{
pNodePrev->m_pNodeNext = pNodeCurr;
pNodeCurr->m_pNodePrev = pNodePrev;
} // if( pNodePrev != NULL )
if( pNodeNext != NULL )
{
pNodeNext->m_pNodePrev = pNodeCurr;
pNodeCurr->m_pNodeNext = pNodeNext;
} // if( pNodeNext != NULL )
} // for( ; nIdx < nInsertCount; nIdx++ )
ULONG nResetIdx, nResetCnt = ULONG(pNodeParent->m_arrChildren.GetSize());
for( nResetIdx = nIdxInsertBefore; nResetIdx < nResetCnt; nResetIdx++ )
{
CExtTreeGridCellNode * pNode = (CExtTreeGridCellNode *) pNodeParent->m_arrChildren.GetAt( nResetIdx );
__EXT_DEBUG_GRID_ASSERT_VALID( pNode );
__EXT_DEBUG_GRID_ASSERT_KINDOF( CExtTreeGridCellNode, pNode );
pNode->m_nOptIndex = nResetIdx;
} // for( nResetIdx = nIdxInsertBefore; nResetIdx < nResetCnt; nResetIdx++ )
if( nVisibleOffset != ULONG(-1L) )
pNodeParent->_ContentWeight_Increment( nInsertCount, false );
else
pNodeParent->_ContentWeight_IncrementNonExpanded( nInsertCount );
return pNodeRetVal;
}
|
|
Lars Mohr
|
Aug 26, 2010 - 4:13 AM
|
Dear Support Team,
a stupid question concerning the TVN_ENDLABELEDIT notify message. Why do you send the "old text" with this message and not the edited text? in conformity with msdn: - Pointer to an structure. The item member of this structure is a structure whose hItem, lParam, and pszText members contain valid information about the item that was edited. If label editing was canceled, the pszText member of the TVITEM structure is NULL; otherwise, pszText is the address of the edited text.
void CExtTreeCtrl::OnInplaceControlComplete(
...
_data.hdr.code = TVN_ENDLABELEDIT;
_data.item.mask = TVIF_CHILDREN|TVIF_HANDLE|TVIF_PARAM|TVIF_STATE;
_data.item.hItem = hti;
GetItem( &_data.item );
strItemText = GetItemText( hti );
bool bModeNotNULL = true;
if( strItemText == LPCTSTR(strEditedText) )
{
bModeNotNULL = false;
_data.item.cchTextMax = 0;
_data.item.pszText = 0;
}
else
{
_data.item.cchTextMax = INT(strItemText.GetLength());
_data.item.pszText = strItemText.IsEmpty() ? _T("") : LPTSTR(LPCTSTR(strItemText));
_data.item.mask |= TVIF_TEXT;
} You send the strItemText (old text) not the strEditedText (edited text).
|
|
Technical Support
|
Aug 26, 2010 - 5:18 AM
|
Thank you for reporting this issue. Please update the source code for the following two methods: bool CExtTreeCtrl::CInplaceEdit::OnHookSpyKeyMsg(
MSG * pMSG
)
{
if( pMSG->hwnd == m_hWnd
&& ( GetStyle() & WS_VISIBLE ) != 0
)
{
if( pMSG->message == WM_KEYDOWN )
{
if( pMSG->wParam == VK_RETURN || pMSG->wParam == VK_ESCAPE )
{
HWND hWndParent = ::GetParent( m_hWnd );
HWND hWndOwn = m_hWnd;
if( hWndParent != NULL )
{
CString strText;
GetWindowText( strText );
if( pMSG->wParam == VK_ESCAPE )
{
m_bCancelMode = true;
((CExtTreeCtrl*)CWnd::FromHandlePermanent(hWndParent)) ->
OnInplaceControlComplete( LPCTSTR(strText), m_bEditingLabel );
}
else if( pMSG->wParam == VK_RETURN )
{
if( ! m_bResultSaved )
{
m_bResultSaved = true;
((CExtTreeCtrl*)CWnd::FromHandlePermanent(hWndParent)) ->
OnInplaceControlComplete( LPCTSTR(strText), m_bEditingLabel );
}
}
::InvalidateRect( hWndParent, NULL, FALSE );
}
if( ::IsWindow( hWndOwn ) )
DestroyWindow();
::SendMessage( hWndParent, WM_CANCELMODE, 0L, 0L );
return true;
}
}
}
return false;
}
void CExtTreeCtrl::OnInplaceControlComplete(
__EXT_MFC_SAFE_LPCTSTR strEditedText,
bool bEditingLabel
)
{
ASSERT_VALID( this );
HTREEITEM hti = GetInPlaceEditedItem();
if( hti == NULL )
return;
if( ! bEditingLabel )
{
TREEITEMINFO_t & _TII = TreeItemInfoGet( hti );
_TII.m_strEditText = LPCTSTR(strEditedText);
} // if( ! bEditingLabel )
else
{
HWND hWndParent = ::GetParent( m_hWnd );
UINT nOwnID = GetDlgCtrlID();
CExtSafeString strItemText;
TV_DISPINFO _data;
::memset( &_data, 0, sizeof(TV_DISPINFO) );
_data.hdr.hwndFrom = m_hWnd;
_data.hdr.idFrom = nOwnID;
_data.hdr.code = TVN_ENDLABELEDIT;
_data.item.mask = TVIF_CHILDREN|TVIF_HANDLE|TVIF_PARAM|TVIF_STATE;
_data.item.hItem = hti;
GetItem( &_data.item );
strItemText = GetItemText( hti );
bool bModeNotNULL = true;
if( strItemText == LPCTSTR(strEditedText) )
{
bModeNotNULL = false;
_data.item.cchTextMax = 0;
_data.item.pszText = NULL;
}
else
{
_data.item.cchTextMax = ( strEditedText != NULL ) ? INT( _tcslen(strEditedText) ) : 0;
_data.item.pszText = ( strEditedText != NULL ) ? LPTSTR(LPCTSTR(strEditedText)) : _T("");
_data.item.mask |= TVIF_TEXT;
}
if( ! ::SendMessage( hWndParent, WM_NOTIFY, WPARAM(nOwnID), LPARAM(&_data) ) != 0 )
{
if( bModeNotNULL )
return;
}
SetItemText( hti, LPCTSTR(strEditedText) );
} // else from if( ! bEditingLabel )
}
|
|
Sebastian Leopold
|
Aug 25, 2010 - 2:35 AM
|
Hello, I have a Dialog (CExtResizableDialog) wich is contained in a CExtControlBar. The Dialog contains a vertical slider. If I add an Anchor like the following to it:
AddAnchor(IDC_SLIDER_HEIGHTANGLE, CPoint(0,0), CPoint(0, 100));
The application crashes with an assertion.
regards Sebastian
|
|
Technical Support
|
Aug 25, 2010 - 9:56 AM
|
The AddAnchor() method can generate assertion if there is no dialog control with the IDC_SLIDER_HEIGHTANGLE identifier on your dialog template resource. But this assertion should not cause any crashes. Your dialog should run again. Could you please provide us with the call stack listing?
|
|
Alastair Watts
|
Aug 24, 2010 - 3:59 AM
|
Having deleted all items from the grid using ItemRemove() for each item, the following code reports a row is focused, even though there are no rows in the grid. CPoint pt = FocusGet(); if(pt.x != -1 && pt.y != -1) return true; return false;
|
|
Technical Support
|
Aug 24, 2010 - 6:20 AM
|
This can happen only if the focused item changing is locked (CExtTreeGridWnd::ItemFocusLock() ). The focus changing can be locked if your app tries to remove tree rows wile handling the focus changing event (CExtGridBaseWnd::OnGbwFocusChanging() , CExtGridBaseWnd::OnGbwFocusChanged() ). Could you please provide us with the call stack listing?
|
|
Alastair Watts
|
Aug 20, 2010 - 5:18 AM
|
|
|
Technical Support
|
Aug 20, 2010 - 11:49 AM
|
The selection is implemented as an array of rectangles with zero-based row/column indexes. You can access or modify these rectangles through CExtGridWnd::Selection***() methods. The single selection model assumes only one single row or column rectangle is present in this array. You can access the rectangles covering the row you want to unselect, remove them and insert new rectangles which do not cover the row that should not be selected.
|
|
Alastair Watts
|
Aug 19, 2010 - 9:52 AM
|
I’m currently using the following code to update the UI state. How can I do this outside of ::OnCmdMsg()
BOOL CPlantingLibrariesDlg::OnCmdMsg(UINT nID, INT nCode,
void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) // update UI
{
{
case ID_LIBRARY_DELETE:
pCmdUI->Enable(m_wndLibraryList.SelectionIsEmpty() ? FALSE : TRUE);
} break;} if(nCode == CN_UPDATE_COMMAND_UI)switch(nID) { CCmdUI * pCmdUI = (CCmdUI*)pExtra;
|
|
Technical Support
|
Aug 20, 2010 - 11:50 AM
|
Here is how to make your toolbar to perform the command updating requests for all the buttons through its parent dialog window:
CExtToolControlBar * pToolBar = . . .
CExtResizableDialog * pDialog = . . .
pToolBar->OnUpdateCmdUI( (CFrameWnd*) pDialog, TRUE );
|
|
Alastair Watts
|
Aug 20, 2010 - 4:07 AM
|
I’m handling MFC command updating though CExtResizableDialog::OnCmdMsg(). Having deleted all items from a list I need to update the toolbar to disable a button. How do I force OnCmdMsg() to update?
|
|
Technical Support
|
Aug 19, 2010 - 12:18 PM
|
We suspect the code snippet was pasted incorrectly. There are only two ways to handle MFC command and command updating queries: 1) Override the CCmdTarget::OnCmdMsg() virtual method. 2) Use the ON_COMMAND , ON_COMMAND_EX and ON_UPDATE_COMMAND_UI message map entries. We suspect you should route OnCmdMsg() virtual method invocations from the CPlantingLibrariesDlg class to other classes where you need to handle particular commands.
|
|
tera tera
|
Aug 17, 2010 - 6:51 PM
|
|
|
Technical Support
|
Aug 26, 2010 - 4:43 AM
|
Please send us an e-mail and tell us when to connect to your desktop to debug this issue.
|
|
tera tera
|
Aug 17, 2010 - 6:46 PM
|
Hello. I set variable declaration of CheckBox in CExtCheckBox.
The setting of the standard button does not work. I declare CheckBox in CButton
When I assign a focus to CheckBox and push Return Key, DefPushButton is pushed.
However,
I declare CheckBox in CExtCheckBox
Even if I assign a focus to CheckBox and push Return Key, DefPushButton does not become effective. Because the setting of the standard button does not work, I cannot close a dialog. IDD_SAMPLEDLGMFC_DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "SampleDlgMFC"
FONT 9, "ļ¼ļ¼³ ļ¼°ć“ć·ććÆ"
BEGIN
DEFPUSHBUTTON "OK",IDOK,260,7,50,14 <--- This does not work
PUSHBUTTON "CANCEL",IDCANCEL,260,23,50,14
LTEXT "TODO: ",IDC_STATIC,87,32,200,
8
PUSHBUTTON "Button1",IDC_BUTTON1,17,15,36,17
PUSHBUTTON "Button2",IDC_BUTTON2,14,46,51,28
PUSHBUTTON "Button3",IDC_BUTTON3,17,94,45,26
CONTROL "Check1",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,92,103,80,16
CONTROL "Check2",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,90,119,96,18
CONTROL "Check3",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,91,137,83,25
END
Even if it is declared in CExtCheckBox,
Please teach me the method that DefPushButton becomes effective
Or please revise it Please answer immediately.
|
|
Technical Support
|
Aug 26, 2010 - 4:42 AM
|
We are sorry for the delay with this answer. The default button issue is already fixed. Please drop us an e-mail to the support mail box at this web site and we will provide you with the source code update.
|
|
Andreas Spachtholz
|
Aug 17, 2010 - 9:18 AM
|
Hi,
I would like to get some buttons into the title bar of the MDI child views of my MDI application. I thought, that perhaps I can use the ribbon bar to do this.
Is it possible to imlement a ribbon bar to a MDI CHild View?
Thanks.
Regards, Andreas
|
|
Technical Support
|
Aug 17, 2010 - 10:59 AM
|
The CExtRibbonBar control is designed to integrate with its parent window’s caption. I.e. the parent window caption should be always visible. This is true in the case of WS_POPUP windows floating on the desktop. It’s not true in the case of MDI child frames. The window caption of the maximized MDI child frame is not visible. We think you can use the CExtRibbonPage control instead (see the RibbonPage sample application). The CExtRibbonPage control is the simplified version of the CExtRibbonBar control. The CExtRibbonPage control does not have tab pages and a quick access toolbar.
|
|
Robert Webb
|
Aug 17, 2010 - 2:43 AM
|
Hi, We have a dialog box, based on a resource, where the title contains "&", eg "This & That". But in the dialog box title it appears as "This && That", doubling the "&". How should I stop that? Thanks, Rob.
|
|
Robert Webb
|
Aug 23, 2010 - 12:16 AM
|
Thanks, but I’m afraid with this change I now get an assertion when I start up my app. Here’s the Prof-UIS part of the call-stack:
cadwind.exe!CExtCustomizeSite::CCmdMenuInfo::Initialize(CWnd * pWndTop=0x087f47e8, unsigned int nResourceID=10005, bool bDefaultMenu=false, bool bPopupMenu=false) Line 2164 + 0x1c bytes C++
cadwind.exe!CExtCustomizeSite::MenuInfoAdd(CWnd * pWndTop=0x087f47e8, const char * strName=0x053f368c, unsigned int nResourceID=10005, bool bDefaultMenu=false, bool bPopupMenu=false, CRuntimeClass * pRtcFrame=0x02adeaf4, CRuntimeClass * pRtcView=0x00000000, CRuntimeClass * pRtcDoc=0x00000000) Line 5589 + 0x18 bytes C++ I took it out again, and no more assertion. Don’t know what’s going on there. Thanks, Rob.
|
|
Robert Webb
|
Sep 9, 2010 - 8:32 PM
|
Any answer to this? I can’t see why your change should cause the above problem, but after recompiling everything, it seems to. For now, I can’t use your patch. Thanks, Rob.
|
|
Technical Support
|
Sep 10, 2010 - 8:40 AM
|
|
|
Robert Webb
|
Sep 14, 2010 - 9:33 PM
|
Hi again, I decided to download the latest beta, 2.9.1 2010-09-12. But now it hits assertions in a different place. After stepping through these it does indeed seem to work and not have the previous problem I encountered. The top of the new stack is as follows:
> cadwind.exe!CExtPaintManagerOffice2010_R2_Black::CExtPaintManagerOffice2010_R2_Black() Line 36613 + 0x3d bytes C++
cadwind.exe!CExtPaintManagerOffice2010_R2_Black::CreateObject() Line 237 + 0x72 bytes C++
mfc80d.dll!CRuntimeClass::CreateObject() + 0xba bytes
cadwind.exe!CExtPaintManager::CExtPaintManagerAutoPtr::InstallPaintManager(CRuntimeClass * pRtcPaintManager=0x065d8d58) Line 1144 + 0x8 bytes C++ The code in question is new since my previous 2.9.1 beta. Here’s the new chunk:
VERIFY(
m_arrBmpTabArea[__ETSOI_TOP].LoadBMP_Resource(
MAKEINTRESOURCE( IDB_EXT_2010_TAB_AREA_BK_BLACK )
)
);
VERIFY( m_arrBmpTabArea[__ETSOI_TOP].Make32() );
CSize _sizeTabArea = m_arrBmpTabArea[__ETSOI_TOP].GetSize();
m_arrBmpTabArea[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
VERIFY(
m_arrBmpTabArea[__ETSOI_BOTTOM].CreateRotated9xStack(
m_arrBmpTabArea[__ETSOI_TOP],
180,
1,
_sizeTabArea.cx,
_sizeTabArea.cy,
false,
false
)
);
VERIFY(
m_arrBmpTabArea[__ETSOI_LEFT].CreateRotated9xStack(
m_arrBmpTabArea[__ETSOI_TOP],
270,
1,
_sizeTabArea.cx,
_sizeTabArea.cy,
false,
false
)
);
VERIFY(
m_arrBmpTabArea[__ETSOI_RIGHT].CreateRotated9xStack(
m_arrBmpTabArea[__ETSOI_TOP],
90,
1,
_sizeTabArea.cx,
_sizeTabArea.cy,
false,
false
)
); Every VERIFY above fails. Is this a known issue?
|
|
Robert Webb
|
Sep 14, 2010 - 11:26 PM
|
Further to the above comment, I now see that the chunk of code is repeated seven times throughout that file, with only the IDB_EXT_2010_TAB_AREA_BK_BLACK at the start changed. Some were there before (the ones with ...2007... IDs) and seem to be fine. The new ones, using the ...2010... IDs cause assertions though. Thanks, Rob.
|
|
Technical Support
|
Sep 15, 2010 - 10:06 AM
|
There are two common cases when Prof-UIS resources cannot be loaded:
1) The Prof-UIS is linked with your app statically and Prof-UIS resources are not available. The .rc2 file of your project should contain the following lines:
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif
1) The 28000..32000 range of resource identifiers is used by Prof-UIS. The resource.h file of your project should not define identifiers in this range.
|
|
Robert Webb
|
Sep 22, 2010 - 9:45 PM
|
Neither of those things seem to be the problem. It works fine if I just comment out the chunks of code I mentioned above, so all other ProfUIS resources seem to be fine. We are linking statically, but our .rc2 files have had the code you suggest since the start. I’ll try another nightly build sometime. Otherwise, not sure what’s going on here.
|
|
Technical Support
|
Aug 20, 2010 - 2:30 AM
|
Please update the source code for the following method: bool CExtRichContentLayout::ParsePlainText(
__EXT_MFC_SAFE_LPCTSTR strPlainText,
UINT nDTF, // = 0 // DT_*** flags from Win32’s DrawText() API (used mainly by plain text format)
UINT nExtDTF, // = 0 // __EXT_DT_*** flags (Prof-UIS)
bool bEmptyLocalObjectContainer // = true
)
{
nDTF; nExtDTF;
Empty( bEmptyLocalObjectContainer );
m_eLFMT = __ELFMT_PLAIN_TEXT;
if( LPCTSTR(strPlainText) == NULL || _tcslen( LPCTSTR(strPlainText) ) == 0 )
return true;
CExtRichContentItem * pRootRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_ROOT );
pRootRCI->m_bHaveStyleChangingCache = true;
m_listHeap.AddHead( pRootRCI );
CExtRichContentItem * pRCI_Paragraph = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_GENERIC_TAG );
m_listHeap.AddTail( pRCI_Paragraph );
pRCI_Paragraph->m_bHaveStyleChangingCache = true;
pRCI_Paragraph->m_styleChangingCache.m_eD = CExtRichStyleDescription::ed_block;
pRCI_Paragraph->m_styleChangingCache.m_eWST = CExtRichStyleDescription::ewstPre;
pRCI_Paragraph->m_strTextParsed = _T("p");
pRCI_Paragraph->m_bClosingTag = false;
pRootRCI->m_listItems.AddTail( pRCI_Paragraph );
CExtRichContentItem * pRCI_Previous_Prefix = NULL;
LPCTSTR p = LPCTSTR(strPlainText);
CExtSafeString strGatheredText;
bool bPreviousSpace = false;
bool bSpace = false;
bool bPrefix = false;
for( ; (*p) != _T(’\0’); p++ )
{
if( ( ( (*p) == _T(’ ’) || ( (*p) == _T(’\t’) ) || ( (*p) == _T(’\n’) ) ) && ! bSpace )
|| strGatheredText == _T("\n")
|| strGatheredText == _T("\t")
|| ( strGatheredText == _T(" ") && (*p) != _T(’ ’) )
)
{
bool bNewLine = ( strGatheredText == _T("\n") ) ? true : false;
bool bTextIsSpace = ( strGatheredText == _T(" ") || strGatheredText == _T("\t") ) ? true : false;
if( strGatheredText == _T(’\n’) && ( ( nDTF&DT_SINGLELINE ) == 0 ) )
{
if( (*p) == _T(’\0’) )
break;
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_GENERIC_TAG );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_styleChangingCache.m_sizeWH.cy = 0;
if( m_listHeap.GetCount() > 0 )
{
POSITION posHeap = m_listHeap.GetTailPosition();
__EXT_DEBUG_RICH_CONTENT_ASSERT( posHeap != NULL );
CExtRichContentItem * pHeapRCI = m_listHeap.GetPrev( posHeap );
__EXT_DEBUG_RICH_CONTENT_ASSERT( pHeapRCI == pRCI );
pHeapRCI;
for( ; posHeap != NULL; )
{
pHeapRCI = m_listHeap.GetPrev( posHeap );
if( pHeapRCI->m_eType == CExtRichContentItem::__EHIT_TEXT_SPACE )
continue;
if( pHeapRCI->m_eType == CExtRichContentItem::__EHIT_GENERIC_TAG
&& pHeapRCI->m_styleChangingCache.m_eD == CExtRichStyleDescription::ed_block
&& ( pHeapRCI->m_strTextParsed == LPCTSTR( _T("p") )
|| pHeapRCI->m_strTextParsed == LPCTSTR( _T("br") )
)
)
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
break;
}
if( posHeap == NULL )
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
}
if( bPrefix )
{
if( pRCI_Previous_Prefix != NULL )
pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
bPrefix = false;
}
if( ( nDTF&DT_SINGLELINE ) == 0 )
pRCI_Previous_Prefix = NULL;
pRCI->m_styleChangingCache.m_eD = CExtRichStyleDescription::ed_block;
pRCI->m_strTextParsed = LPCTSTR( _T("br") );
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
strGatheredText.Empty();
bPreviousSpace = false;
}
else if( strGatheredText == _T(’\t’)
|| ( strGatheredText == _T(’\n’) && ( ( nDTF&DT_SINGLELINE ) != 0 ) )
)
{
CExtRichContentItem::e_html_item_type_t eType =
( (strGatheredText == _T(’\t’)) && ((nDTF&DT_EXPANDTABS) != 0) )
? CExtRichContentItem::__EHIT_TEXT_SPACE
: CExtRichContentItem::__EHIT_TEXT_RANGE;
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, eType );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
if( bPrefix )
{
if( pRCI_Previous_Prefix != NULL )
pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
pRCI_Previous_Prefix = pRCI;
pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
bPrefix = false;
}
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
strGatheredText.Empty();
bPreviousSpace = false;
}
else if( ! strGatheredText.IsEmpty() && strGatheredText != _T(" ") )
{
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_RANGE );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
strGatheredText.Empty();
bPreviousSpace = false;
}
else if( strGatheredText == _T(" ") )
{
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_SPACE );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
if( bPrefix )
{
if( pRCI_Previous_Prefix != NULL )
pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
pRCI_Previous_Prefix = pRCI;
pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
bPrefix = false;
}
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
strGatheredText.Empty();
bPreviousSpace = false;
}
bSpace = false;
if( (*p ) != _T(’ ’) && ( (*p) != _T(’\t’) ) && ( (*p) != _T(’\n’) ) && ! bNewLine && ! bTextIsSpace )
continue;
if( ! bNewLine && (*p) != _T(’\n’) && (*p) == _T(’ ’) )
{
bSpace = true;
bPreviousSpace = true;
}
}
if( bPreviousSpace && ( (*p) != _T(’ ’) /*&& ( (*p) != _T(’\t’) )*/ /*&& ( (*p) != _T(’\n’) )*/ ) )
{
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_SPACE );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
if( strGatheredText.IsEmpty() && ( ( nDTF&DT_SINGLELINE ) == 0 ) )
strGatheredText = _T(" ");
pRCI->m_strTextParsed = LPCTSTR( strGatheredText );
if( bPrefix && !strGatheredText.IsEmpty() )
{
if( pRCI_Previous_Prefix != NULL )
pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
pRCI_Previous_Prefix = pRCI;
pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
bPrefix = false;
}
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
bPreviousSpace = false;
strGatheredText.Empty();
bSpace = false;
}
if( ( (*p) != _T(’\r’) ) )
{
if( ( (*p) == _T(’&’) && bPrefix )
|| ( ( nDTF&DT_NOPREFIX ) != 0 )
|| ( (*p) != _T(’&’) && (! bPrefix) )
|| ( (*p) == _T(’\n’) && bPrefix )
)
{
strGatheredText += (*p);
if( ! ( (*p) == _T(’\n’) && bPrefix ) )
bPrefix = false;
}
else if( (*p) != _T(’&’) && bPrefix )
{
if( ! strGatheredText.IsEmpty() )
{
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_RANGE );
m_listHeap.AddTail( pRCI );
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_strTextParsed = LPCTSTR( strGatheredText );
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
}
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_RANGE );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
if( pRCI_Previous_Prefix != NULL )
pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
pRCI_Previous_Prefix = pRCI;
pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
pRCI->m_strTextEffective = pRCI->m_strTextParsed = (*p);
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
bPreviousSpace = false;
strGatheredText.Empty();
bSpace = false;
bPrefix = false;
}
else if( (*p) == _T(’&’) )
bPrefix = true;
}
}
if( ! strGatheredText.IsEmpty()
&& ( ( strGatheredText == _T("\n") && (nDTF&DT_SINGLELINE) != 0 )
|| strGatheredText != _T("\n")
)
)
{
CExtRichContentItem::e_html_item_type_t e_hit = bSpace ? CExtRichContentItem::__EHIT_TEXT_SPACE : CExtRichContentItem::__EHIT_TEXT_RANGE;
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, e_hit );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
}
if( ! strGatheredText.IsEmpty() && strGatheredText == _T("\n") && (nDTF&DT_SINGLELINE) == 0 )
{
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_GENERIC_TAG );
m_listHeap.AddTail( pRCI );
pRCI->m_styleChangingCache.m_eD = CExtRichStyleDescription::ed_block;
pRCI->m_strTextParsed = LPCTSTR( _T("br") );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
}
if( ( nDTF&DT_SINGLELINE ) == 0 && pRCI_Paragraph->m_listItems.GetCount() > 0 )
{
CExtRichContentItem * pTailRCI = ( pRCI_Paragraph->m_listItems.GetCount() > 0 ) ? pRCI_Paragraph->m_listItems.GetTail() : NULL;
if( pTailRCI->m_strTextParsed == LPCTSTR( _T("br") ) )
{
CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_SPACE );
m_listHeap.AddTail( pRCI );
pRCI->m_bHaveStyleChangingCache = true;
pRCI->m_bHaveEffectiveStyleCache = true;
pRCI_Paragraph->m_listItems.AddTail( pRCI );
}
}
bool bModifyStringMode = ( ( nDTF & (DT_MODIFYSTRING|DT_CALCRECT|DT_NOCLIP) ) == DT_MODIFYSTRING ) ? true : false;
bool bEllipsis = ( ( nDTF & ( DT_END_ELLIPSIS|DT_WORD_ELLIPSIS|DT_PATH_ELLIPSIS ) ) != 0 ) ? true : false;
if( bModifyStringMode || bEllipsis )
{
CList < CExtRichContentItem *, CExtRichContentItem * > listComposed;
for( ; pRCI_Paragraph->m_listItems.GetCount() > 0; )
{
bool bDeleteItem = false;
CExtRichContentItem * pRCI = pRCI_Paragraph->m_listItems.GetHead();
CExtRichContentItem::e_html_item_type_t _eType = pRCI->m_eType;
switch( _eType )
{
case CExtRichContentItem::__EHIT_TEXT_SPACE:
case CExtRichContentItem::__EHIT_TEXT_RANGE:
{
INT nTextLen = INT(pRCI->m_strTextParsed.GetLength());
if( nTextLen > 1 )
{
bDeleteItem = true;
INT nTextPos;
for( nTextPos = 0; nTextPos < nTextLen; nTextPos ++ )
{
TCHAR tchr = pRCI->m_strTextParsed.GetAt( nTextPos );
CExtRichContentItem * pCharRCI = new CExtRichContentItem( *this, _eType );
pCharRCI->m_bHaveStyleChangingCache = true;
pCharRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pCharRCI->m_strTextParsed += tchr;
if( ( nDTF&DT_PREFIXONLY ) != 0 )
pCharRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
listComposed.AddTail( pCharRCI );
}
}
else
{
if( pRCI->m_strTextParsed == _T("&") )
{
CExtRichContentItem * pCharRCI = new CExtRichContentItem( *this, _eType );
pCharRCI->m_bHaveStyleChangingCache = true;
pCharRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pCharRCI->m_strTextParsed = _T("&");
listComposed.AddTail( pCharRCI );
}
else if( pRCI->m_styleChangingCache.m_nUnderline && (! bEllipsis) )
{
CExtRichContentItem * pCharRCI = new CExtRichContentItem( *this, _eType );
pCharRCI->m_bHaveStyleChangingCache = true;
pCharRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
pCharRCI->m_strTextParsed = _T("&");
listComposed.AddTail( pCharRCI );
pCharRCI = new CExtRichContentItem( *this, _eType );
pCharRCI->m_bHaveStyleChangingCache = true;
pCharRCI->m_strTextParsed = pRCI->m_strTextParsed;
listComposed.AddTail( pCharRCI );
}
else
listComposed.AddTail( pRCI );
}
}
break;
default:
listComposed.AddTail( pRCI );
break;
}
pRCI_Paragraph->m_listItems.RemoveHead();
POSITION pos = m_listHeap.Find( pRCI );
if( pos != NULL )
m_listHeap.RemoveAt( pos );
if( bDeleteItem )
delete pRCI;
}
__EXT_DEBUG_RICH_CONTENT_ASSERT( pRCI_Paragraph->m_listItems.GetCount() == 0 );
POSITION pos = listComposed.GetHeadPosition();
for( ; pos != NULL ; )
{
CExtRichContentItem * pRCI = listComposed.GetNext( pos );
pRCI_Paragraph->m_listItems.AddTail( pRCI );
m_listHeap.AddTail( pRCI );
}
}
if( ( nDTF&DT_LEFT ) != 0 )
pRCI_Paragraph->m_styleChangingCache.m_eaH = CExtRichStyleDescription::eahLeft;
if( ( nDTF&DT_CENTER ) != 0 )
pRCI_Paragraph->m_styleChangingCache.m_eaH = CExtRichStyleDescription::eahCenter;
if( ( nDTF&DT_RIGHT ) != 0 )
pRCI_Paragraph->m_styleChangingCache.m_eaH = CExtRichStyleDescription::eahRight;
if( ( nDTF&DT_SINGLELINE ) != 0 || (nExtDTF&__EXT_DT_MULTI_LINE_VERT_ALIGNMENT ) != 0 )
{
if( ( nDTF&DT_TOP ) != 0 )
{
pRootRCI->m_styleChangingCache.m_eaV = CExtRichStyleDescription::eavTop;
pRootRCI->m_styleChangingCache.m_sizeWHP.cy = 100;
pRCI_Paragraph->m_styleChangingCache.m_sizeWHP.cy = 100;
}
if( ( nDTF&DT_VCENTER ) != 0 )
{
pRootRCI->m_styleChangingCache.m_eaV = CExtRichStyleDescription::eavMiddle;
pRootRCI->m_styleChangingCache.m_sizeWHP.cy = 100;
pRCI_Paragraph->m_styleChangingCache.m_sizeWHP.cy = 100;
}
if( ( nDTF&DT_BOTTOM ) != 0 )
{
pRootRCI->m_styleChangingCache.m_eaV = CExtRichStyleDescription::eavBottom;
pRootRCI->m_styleChangingCache.m_sizeWHP.cy = 100;
pRCI_Paragraph->m_styleChangingCache.m_sizeWHP.cy = 100;
}
}
if( ( nDTF&DT_WORDBREAK ) != 0 && ( nDTF&DT_SINGLELINE ) == 0 )
pRCI_Paragraph->m_styleChangingCache.m_eWST = CExtRichStyleDescription::ewstPreWrap;
strGatheredText.Empty();
return true;
}
|
|
Technical Support
|
Aug 17, 2010 - 12:32 PM
|
You found an issue of the CExtRichContentLayout::stat_DrawText() API. It & symbol is not handled correctly in case of both DT_SINGLELINE|DT_END_ELLIPSIS flags are specified. Please give us 2-3 days to fix it.
|
|
Alastair Watts
|
Aug 13, 2010 - 11:22 AM
|
I’m using the following the hide a column
ExtentSet(0);
ExtentSet(0, 1);
and the following to show a column:
ExtentSet(1, -1);
ExtentSet(1024, 1);
pHdr->ExtentSet(g_PaintManager->UiScalingDo(100, CExtPaintManager::__EUIST_X));
The problem is the column is shown but re-sizing no longer works.
|
|
Alastair Watts
|
Aug 13, 2010 - 12:48 PM
|
Please ignore ... I’ve fixed the problem!
|
|
Rado Manzela
|
Aug 12, 2010 - 8:31 AM
|
Is it possible to show some text in CExtProgressWnd like in CExtGridCellPrgress ? There is no documentation about CExtProgressWnd in the help. Thank you.
|
|
Technical Support
|
Aug 16, 2010 - 4:08 AM
|
The CExtProgressWnd control does not support text. The Windows XP/Vista/7 theming APIs allow for only painting the progress bar control using bitmap-based skins. There are no text color/alignment properties provided for the progress bar control by these APIs.
|
|
John Ritzenthaler
|
Aug 11, 2010 - 9:55 AM
|
I have a modeless dialog with a slider control and 3 radio buttons. If I create it then close it (calling DestroyWindow()), I get a heap corruption error. If I change it to use CDialog and standard windows controls, the problem goes away. I’m on version 2.90. Are there any known bugs that might be causing this?
|
|
Technical Support
|
Aug 17, 2010 - 7:02 AM
|
Could you send us a simple test project with a simple dialog and its radio buttons to the support mail box at this web site?
|
|
John Ritzenthaler
|
Aug 16, 2010 - 4:25 PM
|
My Struct Member Alignment is "Default". What should it be?
|
|
Technical Support
|
Aug 16, 2010 - 4:06 AM
|
Did you change the structure member alignment compiler option of your project or Prof-UIS library project?
|
|
John Ritzenthaler
|
Aug 16, 2010 - 4:30 PM
|
Sorry, I posted my reply in the wrong place. My Structure Member Alignment is "Default". I built ProfUIS using the integration wizard without doing anything special.
|
|