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 |
|
|
Rado Manzela
|
Jul 15, 2010 - 6:25 AM
|
I need to display and edit long text in grid cell. Text does not contain \r\n, but I need to wrap it to keep cell width and expand/shrink grid’s row as necessary. I’ve tried to apply this style: ModifyStyleEx( __EGCS_EX_AUTO_SIZE_INPLACE_CONTROL| __EGCS_EX_WRAP_TEXT ,0); But while typing the edit control expands beyond current cell’s width up to width of whole grid. But there is important column next to edited cell which must not be covered by edit box while typing (it shows length of the text, I’ll need to update it while typing). I need the text to be visible all the time without any scrolling, so current row height must be changed dynamically while typing. Is it possible to achieve this?
|
|
|
Technical Support
|
Jul 19, 2010 - 7:40 AM
|
The CExtGridWnd::BestFitRow() method measures all the grid cells using the CExtGridCell::OnMeasureBestFitExtent() virtual method which is based on the CExtGridCell::MeasureCell() virtual method. The last method handles the grid cells with wrapped texts correctly:
if( pWndGrid != NULL && (dwCellStyleEx&(__EGCS_EX_WRAP_TEXT|__EGCS_EX_MULTILINE_TEXT)) != 0L )
{
if( ( dwCellStyleEx & __EGCS_EX_WRAP_TEXT ) != 0L )
nDrawTextFlags |= DT_WORDBREAK;
INT nWidth = pWndGrid->OnSiwQueryItemExtentH( nColNo );
INT nHeight = 0; //pWndGrid->OnSiwQueryItemExtentV( nRowNo );
rcCellTextMeasured = CRect(0,0,nWidth,nHeight);
}
else
nDrawTextFlags |= DT_SINGLELINE;
This can be verified in the ProfUIS_Controls sample application using the grid cell in the second row of the Text grid column of the Grid dialog page. This grid cell is initialized with the __EGCS_EX_WRAP_TEXT extended grid cell style in the CPageGrid::_InitColumnText() method: pCellString1->ModifyStyleEx( __EGCS_EX_WRAP_TEXT );
Double clicking the left header cell separators in this grid control makes the rows automatically resized via the CExtGridWnd::BestFitRow() method:  The grid cells with wrapped texts is the supported feature. The row height is adjusted correctly. All the words became displayed. The method you implemented also works on the Grid dialog page in the ProfUIS_Controls sample application. We tried to add the following into the CPageGrid::CMyGridWnd class: virtual void OnGbwResizingStateApply( bool bHorz, LONG nItemNo, INT nItemExtent )
{
CExtPPVW < CExtGridWnd > :: OnGbwResizingStateApply( bHorz, nItemNo, nItemExtent );
if( bHorz )
{
for( int row = 0; row < RowCountGet(); ++row )
BestFitRow( row );
}
}
This works and resizes grid cells with wrapped text correctly. So, we came to the following conclusion: there must be something specific in your project what makes the CExtGridWnd::BestFitRow() method incorrectly or there must be some issue in Prof-UIS but it depends on specific initialization of the grid control in your project. We had to ask you to provide us with more details.
|
|
|
Rado Manzela
|
Jul 19, 2010 - 9:12 AM
|
I’ve tried to modify your sample, but it does not work too good for me. Please try to initialize cell this way: pCellString1->TextSet( _T("aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc ") ); and resize column slowly. In some width range where you can see "aaa bbb ccc aaa" in first line, cell shows only 4 lines + 1 pixel of 5th line where you can see only top pixel of the ’bbb’ letters. It works like this in unicode static release, windows XP. Maybe the same thing is causing problems in my application.
When I try unicode debug, even with original sample sometimes it makes corrupted stack message box while scrolling the grid. It is impossible to debug modified sample because of taht message when I start resizing the column.
|
|
|
Rado Manzela
|
Jul 19, 2010 - 9:13 AM
|
PS I’ve disabled center style //pCellString1->ModifyStyle( __EGCS_TA_HORZ_CENTER );
|
|
|
Technical Support
|
Jul 19, 2010 - 12:15 PM
|
Thank you very much for the detailed information. We found two issues related to the wrapped text in the CExtGridCell::MeasureCell() method: the grid lines and text area margins were not used in the measuring algorithm. Please update the source code for the following overloaded version of the CExtGridCell::MeasureCell() method:
CSize CExtGridCell::MeasureCell(
CExtGridWnd * pWndGrid, // can be NULL
CDC & dcMeasure,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
DWORD dwHelperPaintFlags
) const
{
__EXT_DEBUG_GRID_ASSERT_VALID( this );
__EXT_DEBUG_GRID_ASSERT( dcMeasure.GetSafeHdc() != NULL );
if( pWndGrid->GetSafeHwnd() == NULL )
pWndGrid = NULL;
DWORD dwCellStyle = GetStyle();
DWORD dwCellStyleEx = GetStyleEx();
// MEASURE ICON SIZE
CSize _sizeIcon = IconGetSize();
if( _sizeIcon.cx > 0 )
_sizeIcon.cx += 2;
// MEASURE EXISTING TEXT SIZE
UINT nDrawTextFlags = DT_LEFT|DT_TOP|DT_CALCRECT;
CRect rcCellTextMeasured( 0, 0, 0, 0 );
if( pWndGrid != NULL && (dwCellStyleEx&(__EGCS_EX_WRAP_TEXT|__EGCS_EX_MULTILINE_TEXT)) != 0L )
{
if( ( dwCellStyleEx & __EGCS_EX_WRAP_TEXT ) != 0L )
nDrawTextFlags |= DT_WORDBREAK;
INT nWidth = pWndGrid->OnSiwQueryItemExtentH( nColNo );
if( pWndGrid->GridLinesVertGet() )
nWidth --;
DWORD dwAreaFlags = CExtGridHitTestInfo::CellTypesToAreaFlags( nColType, nRowType );
CRect rcTextAreaMargins = OnQueryTextAreaMargins( *pWndGrid, dcMeasure, nVisibleColNo, nVisibleRowNo, nColNo, nRowNo, nColType, nRowType, dwAreaFlags, dwHelperPaintFlags );
nWidth -= rcTextAreaMargins.left + rcTextAreaMargins.right;
INT nHeight = 0; //pWndGrid->OnSiwQueryItemExtentV( nRowNo );
rcCellTextMeasured = CRect(0,0,nWidth,nHeight);
}
else
nDrawTextFlags |= DT_SINGLELINE;
LPCTSTR strTextBuffer = LPCTSTR( GetTextBuffer() );
int nTextBufferLen =
( strTextBuffer != NULL )
? int(_tcslen(strTextBuffer))
: int(0);
HGDIOBJ hOldFont = NULL;
HFONT hCellFont = NULL;
bool bFontMustBeDestroyed = false;
if( pWndGrid != NULL )
{
hCellFont = OnQueryCellFont( *pWndGrid, nVisibleColNo, nVisibleRowNo, nColNo, nRowNo, nColType, nRowType, 0, bFontMustBeDestroyed, 0 );
if( hCellFont == NULL )
{
bFontMustBeDestroyed = false;
hCellFont = (HFONT)pWndGrid->OnSiwGetDefaultFont().GetSafeHandle();
}
if( hCellFont != NULL )
hOldFont = ::SelectObject( dcMeasure, (HGDIOBJ)hCellFont );
}
OnAdjustMeasureTextFlags( nDrawTextFlags, nVisibleColNo, nVisibleRowNo, nColNo, nRowNo, nColType, nRowType, 0 );
bool bTextIsMeasured = false;
if( nTextBufferLen > 0 )
{
CExtRichContentLayout::stat_DrawText(
dcMeasure.m_hDC,
strTextBuffer, nTextBufferLen,
(RECT *)&rcCellTextMeasured,
nDrawTextFlags, 0
);
bTextIsMeasured = true;
} // if( nTextBufferLen > 0 )
else
{
CExtSafeString strCopy;
TextGet( strCopy );
if( ! strCopy.IsEmpty() )
{
CExtRichContentLayout::stat_DrawText(
dcMeasure.m_hDC,
LPCTSTR( strCopy ), strCopy.GetLength(),
(RECT *)&rcCellTextMeasured,
nDrawTextFlags, 0
);
bTextIsMeasured = true;
} // if( ! strCopy.IsEmpty() )
} // else from if( nTextBufferLen > 0 )
if( !bTextIsMeasured )
rcCellTextMeasured = CRect( 0, 0, 0, 0 );
CRect rcCellTextMeasured2( 0, 0, 0, 0 );
static CExtSafeString g_sTestText( _T("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789;[]{}\\/=+-_*&ˆ%$#@!~") );
CExtRichContentLayout::stat_DrawText(
dcMeasure.m_hDC,
LPCTSTR( g_sTestText ), g_sTestText.GetLength(),
(RECT *)&rcCellTextMeasured2,
nDrawTextFlags, 0
);
if( pWndGrid != NULL && hCellFont != NULL )
::SelectObject( dcMeasure, hOldFont );
if( bFontMustBeDestroyed && hCellFont != NULL )
::DeleteObject( hCellFont );
INT nAlignHeight = rcCellTextMeasured2.Height();
CSize _sizeText = rcCellTextMeasured.Size();
_sizeText.cy = max( _sizeText.cy, nAlignHeight );
if( _sizeText.cx > 0 )
_sizeText.cx += 4;
if( _sizeText.cy > 0 )
_sizeText.cy += 4;
if( pWndGrid != NULL )
{
CRect rcTextAreaMargins = OnQueryTextAreaMargins( *pWndGrid, dcMeasure, nVisibleColNo, nVisibleRowNo, nColNo, nRowNo, nColType, nRowType, 0, 0 );
_sizeText.cx += rcTextAreaMargins.left + rcTextAreaMargins.right;
_sizeText.cy += rcTextAreaMargins.top + rcTextAreaMargins.bottom;
}
else
{
if( _sizeIcon.cx > 0 )
_sizeText.cx += 4;
}
// MEASURE BUTTONS SIZE
CSize _sizeAllButtons( 0, 0 );
if( (dwCellStyle&(__EGCS_BUTTON_ELLIPSIS|__EGCS_BUTTON_DROPDOWN|__EGCS_BUTTON_UPDOWN)) != 0
&& ( pWndGrid == NULL
|| (pWndGrid->BseGetStyle()&__EGWS_BSE_BUTTONS_PERSISTENT) != 0
)
&& ( dwHelperPaintFlags & __EGCPF_SIMPLIFIED_RENDERING_TARGET ) == 0
)
{
CSize _sizeOneButton(
::GetSystemMetrics( SM_CXVSCROLL ),
::GetSystemMetrics( SM_CYHSCROLL )
);
if( (dwCellStyle&__EGCS_BUTTON_ELLIPSIS) != 0 )
{
_sizeAllButtons.cx += _sizeOneButton.cx;
_sizeAllButtons.cy = max( _sizeAllButtons.cy, _sizeOneButton.cx );
}
if( (dwCellStyle&__EGCS_BUTTON_DROPDOWN) != 0 )
{
_sizeAllButtons.cx += _sizeOneButton.cx;
_sizeAllButtons.cy = max( _sizeAllButtons.cy, _sizeOneButton.cx );
}
if( (dwCellStyle&__EGCS_BUTTON_UPDOWN) != 0 )
{
_sizeAllButtons.cx += _sizeOneButton.cx;
_sizeAllButtons.cy = max( _sizeAllButtons.cy, _sizeOneButton.cx );
}
}
// MEASURE CHECK/RADIO SIZE
CSize _sizeCheck( 0, 0 );
if( (dwCellStyle&__EGCS_CHK_MASK) != 0 )
{
if( pWndGrid != NULL )
_sizeCheck =
OnCalcCheckSize(
false, false, ( (dwCellStyle&__EGCS_READ_ONLY) == 0 ) ? true : false, *pWndGrid, dcMeasure,
nVisibleColNo, nVisibleRowNo, nColNo, nRowNo, nColType, nRowType, 0, 0
);
else
{
_sizeCheck.cx = 13;
_sizeCheck.cy = 13;
}
}
// MEASURE SORT ARROW SIZE
CSize _sizeSortArrow( 0, 0 );
if( (dwCellStyle&__EGCS_SORT_ARROW) != 0 )
{
_sizeSortArrow.cx = __EXT_SORT_ARROW_GLYPH_EXTENT_HORZ;
_sizeSortArrow.cy = __EXT_SORT_ARROW_GLYPH_EXTENT_VERT;
}
// MEASURE FOCUS ARROW SIZE
CSize _sizeFocusArrow( 0, 0 );
if( (dwCellStyle&(__EGCS_HDR_FOCUS_ARROW_RESERVE_SPACE|__EGCS_HDR_FOCUS_ARROW_DISPLAY)) != 0 )
{
_sizeFocusArrow.cx = __EXT_FOCUS_ARROW_GLYPH_EXTENT_HORZ;
_sizeFocusArrow.cy = __EXT_FOCUS_ARROW_GLYPH_EXTENT_VERT;
}
// MEASURE ENTIRE SIZE
CSize _sizeMeasured = _sizeIcon;
_sizeMeasured.cx += _sizeText.cx;
_sizeMeasured.cx += _sizeAllButtons.cx;
_sizeMeasured.cx += _sizeCheck.cx;
_sizeMeasured.cx += _sizeSortArrow.cx;
_sizeMeasured.cx += _sizeFocusArrow.cx;
_sizeMeasured.cy = max( _sizeMeasured.cy, _sizeText.cy );
_sizeMeasured.cy = max( _sizeMeasured.cy, _sizeAllButtons.cy );
_sizeMeasured.cy = max( _sizeMeasured.cy, _sizeCheck.cy );
_sizeMeasured.cy = max( _sizeMeasured.cy, _sizeSortArrow.cy );
_sizeMeasured.cy = max( _sizeMeasured.cy, _sizeFocusArrow.cy );
return _sizeMeasured;
}
|
|
|
Rado Manzela
|
Jul 20, 2010 - 2:38 AM
|
Thank you. Next problem is that when cell contains for example 2 lines (resized by BestFitRow()) and width of the column is set as low as possible to keep 2 lines, when you start editing of the cell, only 1 line edit box is created. I guess there will be still some problem with margins. Can you check it please?
I also need the cell to be edited after single click (selections are disabled). I’ve tried to use grid.BseModifyStyle(__EGWS_BSE_EDIT_SINGLE_LCLICK,0); but it seems it is ignored, I still have to use double click
|
|
|
Technical Support
|
Jul 20, 2010 - 9:50 AM
|
Could you please provide us a screen shot of the grid cell with 2 lines of text and the width of the column is set as low as possible to keep 2 lines? We tried to reproduce this in the ProfUIS_Controls but the editor window always covering entire grid cell. The screen shot will allow us to know the font setting on your computer and exact column width in pixels.
The __EGWS_BSE_EDIT_SINGLE_LCLICK style does not work if the grid control does not use any selection model. Please override CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() virtual method, hit test the clicked location and start the cell editor. Here is the sample of hit testing and editing code:
CExtGridHitTestInfo htInfo( point );
HitTest( htInfo, false, true );
if( htInfo.IsHoverEmpty() || ( ! htInfo.IsValidRect() ) )
return . . . // clicked location is nowhere
INT nColType = htInfo.GetInnerOuterTypeOfColumn(), nRowType = htInfo.GetInnerOuterTypeOfRow();
if( nColType != 0 || nRowType != 0 )
return . . . // clicked location is outer header area
return
OnGbwBeginEdit(
htInfo.m_nVisibleColNo, htInfo.m_nVisibleRowNo, htInfo.m_nColNo, htInfo.m_nRowNo, nColType,
nRowType, htInfo.m_rcExtra, htInfo.m_rcItem, CRect(0,0,0,0), true, NULL, GetSafeHwnd()
);
|
|
|
Technical Support
|
Jul 15, 2010 - 12:35 PM
|
The __EGCS_EX_AUTO_SIZE_INPLACE_CONTROL extended grid cell style expands the editor window only horizontally and never vertically. You don’t need it. The __EGCS_EX_WRAP_TEXT extended grid cell style makes the long single line text wrapped into multiple lines both in the cells area inside grid control and in the in-place activated cell editor control. But it does not change the row height and in-place editor height while typing. Besides, the cell’s text is not changed until you finished typing. This means the row height cannot be re-measured. So, you should override the CExtGridCell::OnInplaceControlTextInputVerify or CExtGridWnd::OnGridCellInplaceControlTextInputVerify() virtual method, re-measure the editor’s text, move the editor window and change the row height. The row height can be changed automatically if you assign the typed text to grid cell and use the CExtGridWnd::BestFitRow() method.
|
|
|
Rado Manzela
|
Jul 19, 2010 - 2:48 AM
|
Ive tried this but it seems CExtGridWnd::BestFitRow() with __EGCS_EX_WRAP_TEXT is buggy. Just when I set some string to cell - for example "aaa bbb ccc", use this override:
void CDescGrid::OnGbwResizingStateApply( bool bHorz, LONG nItemNo, INT nItemExtent ) { __super::OnGbwResizingStateApply(bHorz,nItemNo,nItemExtent); for (int row=0; row<RowCountGet(); ++row) { BestFitRow(row); } }
when I resize the column width to be maybe 1 pixel narrower than required, it does not draw the last word and keeps it 1 line high. I think it should resize the row to 2 lines and draw last word to second line.
|
|
|
Ulrich Heinicke
|
Jul 14, 2010 - 2:28 PM
|
Hi, i want to enable / disable a ribbon node in a ribbon group depends of the result of an operation. How i can i do this? Do you have an example? Thanks Ulrich
|
|
|
Technical Support
|
Jul 15, 2010 - 6:40 AM
|
The ribbon bar is a very extended version of the toolbar. Ribbon nodes are used for creating toolbar buttons inside a ribbon bar. Each button has its command identifier. Enabling/disabling toolbar buttons both in toolbar and ribbon bar should be done through the MFC’s command updating mechanism based in the CCmdUI class. You should add a command updating method and bind it to the command identifier of a ribbon button/node. This works for any kind of ribbon elements, any push buttons, text/combo fields, galleries and check box buttons.
|
|
|
Offer Har
|
Jul 9, 2010 - 12:08 AM
|
Dear Support, We use the following method for loading toolbar buttons:
CExtBitmap bmp;
bmp.LoadBMP_File(file, true);
bmp.AlphaColor(crTransparent, 0, 0);
HICON hIcon = bmp.CreateHICON();
g_CmdManager->CmdSetIcon(
strProfileName,
pCmdItemMenu->m_nCmdID,
hIcon,
false
); We would like to use 32 png files, and have them alpha blend (with white as the backgroung color) - what do we need to do to make it work? Thanks, Ron.
|
|
|
Offer Har
|
Jul 9, 2010 - 1:50 AM
|
OK... figured it out:
CExtSkinBitmap bmp;
bmpMenu.LoadPNG_File(file, true);
hIcon = bmp.CreateHICON(); Works great - one question - why is the CExtSkinBitmap not part if Prof-UIS? It is a very useful class. Ron.
|
|
|
Technical Support
|
Jul 9, 2010 - 4:48 AM
|
The CExtSkinBitmap class is part of ProfSkin library. It’s a very small library and you can link your project with it.
|
|
|
Robert Webb
|
Jul 6, 2010 - 8:47 PM
|
Our dialog has a bitmap, which we change depending on options chosen (using CExtLabel::SetBitmap()). The bitmap has transparency. Before Prof-UIS the background behind the bitmap was erased first, so the new image would appear properly. Now it is not erased, so parts of the previous bitmap show through in the transparent parts of the new bitmap. I’m sure I saw a post or article about how to fix this already, but I can’t find it. Can you point me to it again or tell me the best way to fix this? Thanks, Rob.
|
|
|
Technical Support
|
Jul 16, 2010 - 12:10 PM
|
The CExtResizableDialog and CExtResizablePropertyPage classes are very recommended to use with the WS_CLIPSIBLINGS|WS_CLIPCHIDLREN standard window styles. The WS_CLIPSIBLINGS style makes the child dialog isolated from other windows in the same window container (CExtResizablePropertySheet, CExtTabPageContainerWnd, other). The WS_CLIPCHIDLREN style makes each dialog control isolated and not intersecting with other controls. Prof-UIS common controls classes always draw their themed backgrounds via paint manager. These backgrounds are always consistent with the parent dialog window background. The pixels of dialog surfaces are never used by its children controls. This means you should redraw the label window - not a rectangular part of its parent dialog window. The CExtLabel control supports the 32-BPP transparent CExtBitmap bitmaps on any Windows OS starting from Windows 95/NT 4.0. You can assign it using the CExtLabel::SetBitmapEx() method and specify painting mode using the CExtLabel::SetImageMode method.
|
|
|
Robert Webb
|
Jul 18, 2010 - 8:17 PM
|
I tried adding the WS_CLIPSIBLINGS|WS_CLIPCHIDLREN styles to my pages, but they made things worse. First, I’m not sure where to add them. The earliest time I could find was in OnInitDialog(). Once added, the window updating became worse. Not only did changing the bitmap of a label leave trash behind in the transparent parts, but now if I drag the dialog partly off-screen and back on again, the transparent parts in my label’s bitmap again end up full of trash (echoes of other parts). My work-around of invalidating the label’s rectangle works, albeit a bit slow on-screen for some reason. So I guess I’ll stick with that. Thanks, Rob.
|
|
|
Technical Support
|
Jul 19, 2010 - 7:38 AM
|
Please set both the Clip Siblings and Clip Children properties of the dialog template resource on. Then please check all the group boxes and static frame rectangle controls on your dialog template resource. The Z order of these controls should be greater the Z orders of all the controls inside them. The window invalidating just delays the window repainting. Please invoke the UpdateWindow() API to make the bitmap label control repainted immediately.
|
|
|
Technical Support
|
Jul 7, 2010 - 7:19 AM
|
|
|
|
|
Robert Webb
|
Jul 15, 2010 - 8:30 PM
|
Hi, We’re not trying to draw a bitmap in the background, nor do anything with the background. We just want to leave it as default for the current theme. What we want to do is change the bitmap being displayed in a CExtLabel control. Our bitmap has transparency, and in the transparent parts the underlying dialog’s background is not redrawn as it was before we used ProfUIS. I have solved this now by getting the rectangle of our control and invalidating that rectangle in the dialog window, forcing it to redraw its background. I just would have thought that the ProfUIS dialog should redraw its background properly by default, as it would in MFC. But for now, problem solved. Thanks, Rob.
|
|
|
Adrian Ineichen
|
Jul 6, 2010 - 12:48 AM
|
Hi I use an CExtGridCellComboBox in a CExtGridWnd. In the method OnGridCellInputComplete I get the item data of the _cell parameter (which is a pointer in my case) and work with the referenced object. Now during this processing, an error can occur. This error I show within a message box. The problem is: when the message box appears, the drop down list of the comboBox grid cell is still visible. It disappears when I click somewhere else on the screen. This is very annoying for I need two clicks to confirm the message box: The first lets disappear the drop down list and second will be accepted by the message box. We use v2.70 Thanks Christian Herger
|
|
|
Technical Support
|
Jul 6, 2010 - 6:57 AM
|
The popup list box is a popup menu with a list box common control inside. The CExtPopupMenuWnd::CancelMenuTracking() static method closes any currently opened popup menus. You should invoke it before displaying a message box.
|
|
|
Offer Har
|
Jul 5, 2010 - 2:38 PM
|
Hi, We need to get a notification when the user changes the width of a column in a grid - how do we do this? Thanks, Ron.
|
|
|
Technical Support
|
Jul 6, 2010 - 6:57 AM
|
The CExtGridBaseWnd::OnGbwResizingStateApply() virtual method is invoked when the row height or column width is changed via drag-n-dropping cell boders.
|
|
|
Francesco Toscano
|
Jul 5, 2010 - 12:23 PM
|
Probably it is a very stupid question, Is it possible to add a ribbon Bar to a Dialog based application? If yes, is available any example? Regards.
|
|
|
Technical Support
|
Jul 6, 2010 - 6:57 AM
|
The RibbonPage sample demonstrates how to create a CExtRibbonPage window inside the CExtResizableDialog window. The CExtRibbonPage control is a simplified CExtRibbonBar without file button, tabs and quick access toolbar. You can create the CExtRibbonBar inside dialog and initialize it exactly like it’s created inside frame window. The only differences is that the dialog should invoke the CWnd::RepositionBars( 0, 0xFFFF, 0 ) code near the end of the OnInitDialog() virtual method and in the dialog’s OnSize() handler method.
|
|
|
Robert Hofstetter
|
Jul 4, 2010 - 7:35 PM
|
I tried to use a large font in CExtReportGridWnd by overriding OnSiwGetDefaultFont() function. The grid fonts are increased but the row heights remain the same. so, the texts on the neighboring rows overlap each other and make them not readable. Is this a bug or I need to do something else, e.g. increase the row height accordingly? The grid’s header control has the same problem. The header text is larger than the header height. Thanks for any suggestions
|
|
|
Robert Hofstetter
|
Jul 5, 2010 - 6:10 PM
|
Thanks for the reply. I actually use the same large font for every rows in the whole grid, not particular rows. Is there a simpler way so that the row height can grow bigger automatically according to the font height.
|
|
|
Technical Support
|
Jul 6, 2010 - 6:59 AM
|
Any row in Prof-UIS grids can have a fixed or variable height (see the CExtGridBaseWnd::FixedSizeRowsSet() method, the __EGBS_FIXED_SIZE_ROWS style and the CExtGridBaseWnd::DefaultRowHeightSet() method). You can specify fixed size rows in report grid control and change heights of all the rows with invoking the CExtGridBaseWnd::FixedSizeRowsSet() and CExtGridBaseWnd::DefaultRowHeightSet() methods. But this is not recommended because the group rows look better with larger row height.
|
|
|
Technical Support
|
Jul 5, 2010 - 12:13 PM
|
The report grid control always assumes you can use different fonts in any grid cells. To increase data row height in your report grid control you should do the following: 1) Override the following virtual method in your CExtReportGridWnd class:
virtual bool OnTreeQueryPlainGridModeVeticalLayout() const
{
return true;
}
2) Add at least one outer header column on the left: wndReportGrid.OuterColumnCountLeftSet( 1L, false );
This is needed for keeping information about a custom row height in each report grid’s data row. 3) If you don’t need outer header columns, then you can make it width equal to zero: wndReportGrid.OuterColumnWidthSet( true, 0L, 14 );
4) Initialize header cells in the outer header column at left and specify required row height: CExtGridCell * pCellHdr;
pCellHdr = GridCellGetOuterAtLeft( 0L, nRowNo, RUNTIME_CLASS( CExtGridCellHeaderFilter ) );
ASSERT_VALID( pCellHdr );
pCellHdr->ExtentSet( 40 ); The code above sets the row height to 40 pixels. If you need to change the height of outer header row at top, then invoke the following code: wndReportGrid.OuterRowHeightSet( true, 0L, 40 );
|
|
|
Charles Bisbee
|
Jul 2, 2010 - 3:47 PM
|
I have a window based on CExtResizableDialog. I need to create it with it hidden. When I create it, it flashes until ShowWindow(SW_HIDE) is called. I have tried calling ShowWindow(SW_HIDE) in both PreInitDialog and InitDialog for the derived class. The call in PreInitDialog seems to be too early (the dialog is still displayed.) The call in InitDialog is better than a call after create finishes but still results in a flash. How do I stop the Flash Thanks
|
|
|
Charles Bisbee
|
Jul 8, 2010 - 4:23 PM
|
Call me dumb. The WS_VISIBLE was on. Thanks for your patience
|
|
|
Technical Support
|
Jul 3, 2010 - 5:33 AM
|
Modal dialogs in MFC are initially visible. So, the correct solution would be to create a non-modal dialog. You should set the Visible property of your dialog template resource to false to make your dialog initially hidden. You don’t have to invoke any code to hide it. Then you should create your dialog using its Create() method rather than its DoModal() method. That’s all. But if you need a modal dialog type, then you should emulate the modal message loop manually. Here is the sample source code for all the tasks:
// this is a probably pointer to your main frame or main dialog window (it must be popup window)
CWnd * pParentWindowOfYourDialog = . . .
CYourDialog dlg( . . . );
if( ! dlg.Create( CYourDialog::IDD, pParentWindowOfYourDialog ) )
return . . .
//
// That’s all. Invisible dialog was created successfully.
// Now we will run the modal message loop for it:
//
pParentWindowOfYourDialog->EnableWindow( FALSE );
while( dlg.GetSafeHwnd() != NULL )
CExtPopupMenuWnd::PassMsgLoop( true );
pParentWindowOfYourDialog->EnableWindow( TRUE );
The code above works like a modal dialog for your app users. But this dialog is not exactly the same as a modal dialog. If you need the modal result of this dialog ( IDOK, IDCANCEL, etc), you should save it in some property of your dialog manually.
|
|
|
Alastair Watts
|
Jul 2, 2010 - 7:27 AM
|
I had a CExtResizableDialog with a CExtTreeGridWnd derived control in it and all was well. I then added a CFrameWnd & CExtSplitterWnd to the dialog and made CMyTreeGridWnd a child of it. The splitters work great, but the CMyTreeGridWnd mouse click & drag selection no longer works and all the items is its context menu are now greyed out. Any ideas?
|
|
|
Technical Support
|
Jul 2, 2010 - 1:21 PM
|
The tree view common control handles mouse messages equally in any situation. This does not depend on the type of its parent window. If the mouse messages are not delivered, the tree control or its parent window is disabled. We need more information or some test project. Prof-UIS menus are based on the MFC’s command updating mechanism. We think you should route the OnCmdMsg() virtual method invocations to all the classes containing menu command handling and updating methods.
|
|
|
Alastair Watts
|
Jul 12, 2010 - 4:33 AM
|
I’ve a new CExtSplitterWnd problem where clicking outside of the dialog then on the dialog a few times crashes said dialog. Replacing CExtSplitterWnd with CSplitterWnd fixes the problem. Where do you want me to mail the project?
|
|
|
Technical Support
|
Jul 12, 2010 - 6:21 AM
|
Please send your test project to the support mail box at prof-uis.com
|
|
|
Alastair Watts
|
Jul 2, 2010 - 7:48 AM
|
I’ve sorted the context menus :)
|
|
|
Alastair Watts
|
Jun 30, 2010 - 9:25 AM
|
I’ve got a CExtLabel control in a CExtResizableDialog and have called m_myExtLabel.ModifyStyle(0, SS_CENTER | SS_CENTERIMAGE); Is it possible to retain the aspect of the bitmap like SetImageMode(CExtLabel::eTouchInside) does AND fully centre the bitmap like SetImageMode(CExtLabel::eAlign) does?
|
|
|
Alastair Watts
|
Jul 1, 2010 - 10:09 AM
|
Any chance of an updated CExtLabel where SS_CENTER and SS_CENTERIMAGE are honoured when using eTouchInside? Thanks!
|
|
|
Technical Support
|
Jul 1, 2010 - 12:15 PM
|
The label control’s styles do support bottom alignment. We think we should design our own API instead.
|
|
|
Alastair Watts
|
Jul 1, 2010 - 9:16 AM
|
I put the supplied code into CExtResizableDialog::OnSize() ... when drawing it flickers terribly and doens’t position correctly. Any suggestions?
|
|
|
Technical Support
|
Jul 1, 2010 - 12:14 PM
|
Please invoke this code in the OnInitDialog() virtual method, then add anchors to the label control if needed.
|
|
|
Technical Support
|
Jun 30, 2010 - 10:23 AM
|
The CExtLabel::eTouchInside and CExtLabel::eTouchOutside modes of the CExtLabel and CExtAviLabel controls do not currently use the SS_CENTER|SS_CENTERIMAGE styles. You should move the label window according to the bitmap size displayed in it. Horizontal shift is half of width difference between label and bitmap. Vertical shift is half of height difference between label and bitmap. Here is the example:
CDialog * pThisDlg = . . .
CExtLabel * pLabel = . . .
CExtBitmap * pBitmap = . . .
CRect rcLabel;
pLabel->GetWindowRect( &rcLabel );
pThisDlg->ScreenToClient( &rcLabel );
CSize sizeLabel = rcLabel.Size(), sizeBitmap = pBitmap->GetSize();
CSize sizeShift( ( sizeLabel.cx - sizeBitmap.cx ) / 2, ( sizeLabel.cy - sizeBitmap.cy ) / 2 );
rcLabel.SetRect(
rcLabel.left + sizeShift.cx,
rcLabel.top + sizeShift.cy,
rcLabel.left + sizeShift.cx + sizeBitmap.cx,
rcLabel.top + sizeShift.cy + sizeBitmap.cy
);
pLabel->MoveWindow( &rcLabel );
|
|
|
Rado Manzela
|
Jun 29, 2010 - 8:45 AM
|
I’d like to let the user to hide some columns he don’t need, but I have to be able to update all columns so that correct data is displayed when hidden columns are shown. I’ve tried to use ColumnHide(). The problem is that I cannot access hidden cells. I’ve tried to use this approach (adapted for columns): http://www.prof-uis.com/prof-uis/tech-support/support-forum/rowhide-is-missing-rowunhide-in-grid-control-64511.aspx but it does not work, ColumnCountGet() still returns number of visible columns so it is not even possible to get cell when last column is hidden, GridCellGet() will check requested index against ColumnCountGet() and will fail. Methods for getting hidden rows/columns would be very handy to make grid usable for dynamic data, where user can see filtered result, but program can update all data in grid. Do you have some working solution for this please?
|
|
|
Technical Support
|
Jun 29, 2010 - 11:03 AM
|
The row/column hiding feature in the CExtGridWnd control was designed as part of the grid filtering feature. You can hide columns using the CExtGridWnd::ColumnHide() method and column count become less. You can un-hide only all the columns using the CExtGridWnd::ColumnUnHideAll() method. This means you should invoke the CExtGridWnd::ColumnUnHideAll() method with the bRedraw parameter set to false, access all the grid cells, hide the previously hidden columns by invoking the CExtGridWnd::ColumnHide() method with the bRedraw parameter set to false. You can invoke grid’s OnSwInvalidate() method to redraw the grid finally.
|
|
|
John Ritzenthaler
|
Jun 28, 2010 - 3:39 PM
|
How do I enable X64 Library builds? They’re disabled in the Integration Wizard. (I’m way back on 2.83)
|
|
|
John Ritzenthaler
|
Jun 28, 2010 - 3:41 PM
|
Never Mind. I had to add the paths first.
|
|
|
Technical Support
|
Jun 29, 2010 - 8:24 AM
|
Yes. The build tasks are not enabled until you integrate library paths.
|
|
|
Eric guez
|
Jun 28, 2010 - 9:51 AM
|
Hello,
I’m willing to use the CExtDateBrowserWnd for selecting a (possibly long) date range. For this I thought doing it by keeping the last two date clicked (and then closing the popup calendar). Unfortunately I couldn’t find the right event callback for this type of click. As the closest one (according to the sample program) is OnDateBrowserTimeChanged(), but it’s also called when clicking on a month.
How could I achieve this ?
|
|
|
Technical Support
|
Jun 30, 2010 - 11:19 AM
|
We think you should ignore the case when the user clicks left right arrows on the top corners of the date browser control. Your design is oriented to clicks on the exact day numbers. Alternatively you can change your design and use two date browsers for entering two dates.
|
|
|
Eric guez
|
Jun 30, 2010 - 10:18 AM
|
Thanks for the tip. It works well except in one case: when the user changes the current month without changing ViewMode. I’ll try to get around this with a mouse cursor hit test if there is no other way.
|
|
|
Technical Support
|
Jun 29, 2010 - 9:52 AM
|
Yes, you should override the CExtDateBrowserWnd::OnDateBrowserTimeChanged() virtual method. Your method should use the CExtDateBrowserWnd::ViewModeGet() method to determine the current date view mode set for the CExtDateBrowserWnd control. If the current mode is CExtDateBrowserWnd::__EVM_MONTH then your method should save the clicked dates.
|
|
|
Dominik Braendlin
|
Jun 25, 2010 - 5:28 AM
|
Dear Tech Support, I have an issue with the CExtListCtrl control. You can easily reproduce it while running the v2.90 Prof-UIS Controls Demo (Release UNICODE with MFC DLL). Go to the shell browser and grab the e.g. “Type” header and start to make it bigger or smaller. You will notice that the app itself and other apps such as MS Outlook start to flicker. If you hold the mouse pressed but steady the flickering does not stop. If you check with Spy ++ you see that there are lots of messages. If you do the same thing with a CListCtrl control there is no flickering and also no messages while keeping the mouse pressed but steady after resizing a header item. Thanks Adrian
|
|
|
Technical Support
|
Jun 25, 2010 - 11:51 AM
|
Thank you for posting this issue. We prepared a beta fix. Please update the source code for the following method: void CExtHeaderCtrl::OnMouseMove( UINT nFlags, CPoint point )
{
ASSERT_VALID( this );
// CHeaderCtrl::OnMouseMove( nFlags, point );
nFlags;
if( m_nPressingColNo >= 0 )
{
CExtPopupMenuTipWnd * pATTW = OnAdvancedPopupMenuTipWndGet();
if( pATTW != NULL )
pATTW->Hide();
if( m_bOnDividerAtRight )
{
CPoint ptScreenPressing = point;
ClientToScreen( &ptScreenPressing );
INT nExtent = ptScreenPressing.x - m_ptScreenPressing.x + m_nHelperInitialResizingExtent;
HeaderItemExtentSet( m_nPressingColNo, nExtent );
_DoSetCursor();
if( m_bOnDividerAtRight )
{
HWND hWndParent = ::GetParent( m_hWnd );
if( hWndParent != NULL )
{
UINT nOwnID = UINT( GetDlgCtrlID() );
HD_NOTIFY _data, _data2;
::memset( &_data, 0, sizeof(HD_NOTIFY) );
::memset( &_data2, 0, sizeof(HD_NOTIFY) );
_data.hdr.hwndFrom = m_hWnd;
_data.hdr.idFrom = nOwnID;
_data.iButton = 0;
_data.iItem = m_nPressingColNo; // nColNo;
_data.hdr.code = HDN_TRACK;
HDITEM hdItemBuffer; // to avoid common controls crashing
::memset( &hdItemBuffer, 0, sizeof(HDITEM) );
hdItemBuffer.mask = HDI_WIDTH;
hdItemBuffer.cxy = nExtent;
_data.pitem = &hdItemBuffer;
::memcpy( &_data2, &_data, sizeof(HD_NOTIFY) );
//#if (defined _UNICODE)
// ::LockWindowUpdate( hWndParent );
//#endif // (defined _UNICODE)
// ::SendMessage( hWndParent, WM_NOTIFY, WPARAM(nOwnID), LPARAM(&_data) );
//#if (defined _UNICODE)
// ::LockWindowUpdate( NULL );
//#endif // (defined _UNICODE)
_data2.hdr.code = HDN_ITEMCHANGED;
::SendMessage( hWndParent, WM_NOTIFY, WPARAM(nOwnID), LPARAM(&_data2) );
if( ::IsWindow( hWndParent ) && ::IsWindowVisible( hWndParent ) )
::InvalidateRect( hWndParent, NULL, TRUE );
} // if( hWndParent != NULL )
} // if( m_bOnDividerAtRight )
return;
}
else if( ! m_bOnButton )
{
if( _DndIsAllowed( m_nPressingColNo ) )
{
CPoint ptOffset = _DndGetStartOffset();
CPoint ptClientPressing;
ptClientPressing = m_ptScreenPressing;
ScreenToClient( &ptClientPressing );
CPoint ptDiff = ptClientPressing - point;
if( abs(ptDiff.x) >= ptOffset.x || abs(ptDiff.y) >= ptOffset.y )
{
_DndDo( m_nPressingColNo, m_ptScreenPressing );
return;
}
}
}
}
bool bOnButton = false, bOnDividerAtRight = false;
INT nColNo = -1;
if( CExtPopupMenuWnd::TestHoverEnabledFromActiveHWND( m_hWnd ) )
{
CPoint ptScreen;
ptScreen = point;
ClientToScreen( &ptScreen );
if( ::WindowFromPoint( ptScreen ) == m_hWnd )
nColNo = HitTestHeaderItem( point, &bOnButton, &bOnDividerAtRight );
}
bool bHoverChanged = false;
if( m_nHoverColNo != nColNo
|| m_bOnButton != bOnButton
|| ( m_bOnDividerAtRight != bOnDividerAtRight && ( ! CExtPopupMenuWnd::IsKeyPressed( VK_LBUTTON ) ) )
)
{
bHoverChanged = true;
m_nHoverColNo = nColNo;
m_nHoverIndex = ColNo2VisualIndex( m_nHoverColNo );
m_bOnButton = bOnButton;
m_bOnDividerAtRight = bOnDividerAtRight;
if( m_bOnDividerAtRight )
{
HWND hWndParent = ::GetParent( m_hWnd );
if( hWndParent != NULL )
{
UINT nOwnID = UINT( GetDlgCtrlID() );
HD_NOTIFY _data;
::memset( &_data, 0, sizeof(HD_NOTIFY) );
_data.hdr.hwndFrom = m_hWnd;
_data.hdr.idFrom = nOwnID;
_data.iButton = 0;
_data.iItem = nColNo;
_data.hdr.code = HDN_BEGINTRACK;
HDITEM hdItemBuffer; // to avoid common controls crashing
::memset( &hdItemBuffer, 0, sizeof(HDITEM) );
_data.pitem = &hdItemBuffer;
::SendMessage( hWndParent, WM_NOTIFY, WPARAM(nOwnID), LPARAM(&_data) );
} // if( hWndParent != NULL )
} // if( m_bOnDividerAtRight )
}
if( bHoverChanged )
{
if( m_nPressingColNo < 0 )
{
HWND hWndCapture = ::GetCapture();
if( m_nHoverColNo >= 0 )
{
if( m_hWnd != hWndCapture )
SetCapture();
if( m_nAdvancedTipStyle != INT(CExtPopupMenuTipWnd::__ETS_NONE)
&& (! CExtPopupMenuWnd::IsMenuTracking() )
)
{
CExtPopupMenuTipWnd * pATTW = OnAdvancedPopupMenuTipWndGet();
if( pATTW != NULL )
{
const CExtHeaderCtrl::EXTENDED_ITEM_DATA & _eii = ExtendedItemDataGet( m_nHoverColNo );
CRect rcArea;
if( GetItemRect( m_nHoverColNo, rcArea ) )
{
CRect _rcItem, _rcIcon, _rcText, _rcSortArrow, _rcButton, _rcButtonIcon;
bool bSorted = false, bSortedAscending = false;
OnCalcHeaderItemLayout(
m_nHoverColNo,
rcArea,
_rcItem,
_rcIcon,
_rcText,
_rcSortArrow,
_rcButton,
_rcButtonIcon,
&bSorted,
&bSortedAscending
);
if( m_bOnButton )
{
rcArea.left = _rcButton.left;
rcArea.right = _rcButton.right;
}
else
{
rcArea.left = _rcItem.left;
rcArea.right = _rcItem.right;
}
ClientToScreen( &rcArea );
OnAdvancedPopupMenuTipWndDisplay(
*pATTW,
rcArea,
m_bOnButton ? LPCTSTR(_eii.m_strTipTextButton) : LPCTSTR(_eii.m_strTipTextItem)
);
}
} // if( pATTW != NULL )
}
}
else
{
if( m_hWnd == hWndCapture )
ReleaseCapture();
}
} // if( m_nPressingColNo < 0 )
Invalidate();
_DoSetCursor();
} // if( bHoverChanged )
}
|
|
|
Rado Manzela
|
Jun 22, 2010 - 7:37 AM
|
I’ve downloaded latest RC2 to see whether you’ve fixed bug I’ve reported before (http://www.prof-uis.com/prof-uis/tech-support/support-forum/dynamic-bars-bug-67803.aspx). Now I was able to make screenshot in VS 2010 theme which is so slow that it is visible for 1 second: http://rrrado.szm.com/d.PNG Steps to reproduce the problem in SDI dynamic bars sample (unicode release with static libraries run on WinXP, deleted sample’s registry): 1. Drag bar 19 to make it floating 2. drag bar 18 and tab it into 19 3. set 19 as tabbed document again 4. set 19 as tabbed document again It is visible best in VS 2010, but for shorter period of time also in other themes. Unfortunately in my application, which contains dynamic bars containing resizable dialogs that small dummy window does not disappear and it is possible to resize it using mouse to create big empty window. Can you fix it please?
Other strange thing I’ve reported but received no answer is that some bars have empty copy in your sample when I run it, for example Bar 16 as you can see on screenshot. I guess it is bug, isn’t it?
|
|
|
Technical Support
|
Jun 25, 2010 - 11:46 AM
|
We reproduced a small window problem. It occurs when switching the last floating control bar inside a tabbed group into document mode. We were able to reproduce it on WinXP and using UI themes with more heavy bitmap based skin painting like any 2007 / 2010 themes. We are working on this problem.
The problem with a ghost bar corresponding to document tab cannot be reproduced with Prof-UIS 2.91.
|
|
|
Torsten Schucht
|
Jun 21, 2010 - 8:20 AM
|
Dear Support, I do have the same problem as described here: http://www.prof-uis.com/prof-uis/tech-support/support-forum/maximized-bug-when-windows-taskbar-is-docked-to-left-edge-of-desktop-67426.aspx#@lt;/p>
I am using v2.89 with Win7. The problem occurs when I have docked the Windows Taskbar to the left of my desktop and have the Windows 7 Basic Style (no aero effects) activated. A customer reported the issue also for a Windows XP system. In contrast to the above thread, I can see the incorrect maximization also with a single monitor setup. I tested it with the MDIDOCVIEW-m.exe sample application. After the first minimize/restore the window is displayed at the top left corner of the desktop ’behind’ the taskbar. The width of the window seems to be correct, since there is the desktop visible on the right with the width of the taskbar. Torsten
|
|
|
Technical Support
|
Jun 22, 2010 - 1:27 PM
|
Thank you for reporting this issue. We are working on fix. We have the beta fix at this moment. Please update the source code for the following method:
bool CExtNcFrameImpl::NcFrameImpl_GetMinMaxInfo(
LPMINMAXINFO pMMI
) const
{
ASSERT( pMMI != NULL );
if( ! NcFrameImpl_IsSupported() )
return false;
if( NcFrameImpl_IsDwmBased() )
return true;
CWnd * pWndFrameImpl = const_cast < CWnd * > ( NcFrameImpl_GetFrameWindow() );
if( ( pWndFrameImpl->GetStyle() & WS_CHILD ) == 0 )
{
WINDOWPLACEMENT _wp;
::memset( &_wp, 0, sizeof(WINDOWPLACEMENT) );
_wp.length = sizeof(WINDOWPLACEMENT);
CExtNcFrameImpl::stat_GetWindowPlacement( pWndFrameImpl->m_hWnd, _wp );
CRect rcBorders( 0, 0, 0, 1 );
CExtPaintManager::monitor_parms_t _mp;
// CExtPaintManager::stat_GetMonitorParms( _mp, pWndFrameImpl );
CExtPaintManager::stat_GetMonitorParms( _mp, _wp.rcNormalPosition );
if( _wp.showCmd == SW_SHOWMINIMIZED )
{
pMMI->ptMaxPosition.x = _mp.m_rcWorkArea.left + rcBorders.left;
pMMI->ptMaxPosition.y = _mp.m_rcWorkArea.top + rcBorders.top;
}
else
{
pMMI->ptMaxPosition.x = 0 + rcBorders.left;
pMMI->ptMaxPosition.y = 0 + rcBorders.top;
}
if( g_PaintManager.m_bIsWin98orLater || g_PaintManager.m_bIsWin2000orLater )
{
CRect rcClip( -32767, -32767, +32767, +32767 ), rcInfo( 0, 0, 0, 0 );
if( EnumDisplayMonitors( NULL, &rcClip, stat_CalcMaxResizingInfo, LPARAM(LPVOID(&rcInfo)) ) )
{
pMMI->ptMaxTrackSize.x = pMMI->ptMaxSize.x = rcInfo.Width();
pMMI->ptMaxTrackSize.y = pMMI->ptMaxSize.y = rcInfo.Height();
}
}
/*pMMI->ptMaxTrackSize.x =*/ pMMI->ptMaxSize.x = _mp.m_rcWorkArea.Width() - rcBorders.left - rcBorders.right;
/*pMMI->ptMaxTrackSize.y =*/ pMMI->ptMaxSize.y = _mp.m_rcWorkArea.Height() - rcBorders.top - rcBorders.bottom;
//TRACE2( "max-pos %d %d\r\n", pMMI->ptMaxPosition.x, pMMI->ptMaxPosition.y );
APPBARDATA _data;
::memset( &_data, 0, sizeof(APPBARDATA) );
_data.cbSize = sizeof(APPBARDATA);
UINT nSHR = (UINT)::SHAppBarMessage( ABM_GETSTATE, &_data );
if( nSHR == (ABS_AUTOHIDE|ABS_ALWAYSONTOP) )
{
nSHR = (UINT)::SHAppBarMessage( ABM_GETTASKBARPOS, &_data );
if( nSHR == 1 )
{
switch(_data.uEdge)
{
case ABE_TOP:
pMMI->ptMaxPosition.y ++;
pMMI->ptMaxSize.y --;
break;
case ABE_BOTTOM:
pMMI->ptMaxSize.y --;
break;
case ABE_LEFT:
pMMI->ptMaxPosition.x ++;
pMMI->ptMaxSize.x --;
break;
case ABE_RIGHT:
pMMI->ptMaxSize.x --;
break;
}
} // if( nSHR == 1 )
} // if( nSHR == (ABS_AUTOHIDE|ABS_ALWAYSONTOP) )
} // if( ( pWndFrameImpl->GetStyle() & WS_CHILD ) == 0 )
return true;
}
|
|
|
Wilhelm Falkner
|
Jun 21, 2010 - 5:26 AM
|
I would need to add the feature "Add new tab group". I know, this is at the moment not supported by PROF-UIS. But maybe you can helf me (ar give me some hints). Your sample "ProfStudio" would be a good starting point. Onother possibility would be (in my opinion), to make PROF-UIS compatible with the Feature Pack. I tried some ways, but without success. Pls help me TIA Willi
|
|
|
Wilhelm Falkner
|
Jun 24, 2010 - 2:23 AM
|
Here we are back to my question. I do NOT want to use CFrameWndEx or Feature Pack. BUT when I need the feature " Create new Tab Group" I have to use this class. So I ask you to help me to implement this feature with Prof-UIS. So again: please give me some hints, how to implement this feature with Prof-UIS. I’m sure, a lot of your customers would use this feature TIA Willi P.S. As you see in my records, I’m using Prof-UIS now for several years. And I’m happy with this software. This support forum is the BEST, I ever have seen. I allways have gotten within some days the right answer und I see, you have al lot of knowlage and give the right hints. So pls help me agin to solve this feature.
|
|
|
Technical Support
|
Jun 23, 2010 - 11:03 AM
|
But if you have CExtMenuControlBar and CExtControlBar, then you don’t need CMFCMenuBar, CBasePane and CFrameWndEx which are actually not MFC features, they are source code parts bought by Microsoft from other company. Prof-UIS control bars work with normal MFC frames and do not require recoding CFrameWnd window.
|
|
|
Wilhelm Falkner
|
Jun 22, 2010 - 2:10 PM
|
No no, it is not so easy, as you tell!. E.g. you are not able to use CExtMenuControlBar, you have to use CMFCMenuBar, but than you loose all benefits of Prof-UIS. But would be possible. Much more worse is, that you are not able to use CExtControlBar in a CFrameWndEx. And so, you loose all this features. The problem ist, that CExtControlBar is not derived from CBasePane. If you can solve this Problem (derive it also from CBasePane), all would be solved. Pls help me TIA Willi
|
|
|
Technical Support
|
Jun 22, 2010 - 1:28 PM
|
Prof-UIS does not intersect with MFC Feature Pack. We have no idea how to support it. Prof-UIS does not conflict with MFC Feature Pack. You can create any Prof-UIS control as a child of any non-Prof-UIS window and vice versa.
Prof-UIS 2.90 allows you to detach tabs from the tabbed document area (MDI tabs or SDI tab page container). This is supported for dynamic resizable control bars only. But the splitters and tab groups are not supported in the tabbed document area yet. This feature is under development.
|
|
|
Robert Hofstetter
|
Jun 21, 2010 - 1:23 AM
|
Is it possible to have three different toolbar icon size, e.g. small, normal and large?
|
|
|
Robert Hofstetter
|
Jun 21, 2010 - 6:29 PM
|
If you select the option "Large icons in toolbars" in the Customize window, the current toolbar buttons are doubled in size. I am just wondering if it possible to have an extra option "Small icons in toolbars". When selected, toolbar buttons are reduced to a half of the normal icon size. So, Users can choose toolbars of three different sizes at the run-time. At the design time, we only have one set of toolbar icons in normal size. Could you give me some suggestions, some sample code would be even better. Thanks
|
|
|
Technical Support
|
Jun 21, 2010 - 12:08 PM
|
The CExtCmdIcon class implements an icon in Prof-UIS. It supports normal/hover/pressed/disabled images of one size only. The CExtCmdIcon are stored in the command manager. The CExtToolControlBar toolbar control uses icons in the command manager for measuring and painting toolbar buttons. You can access the command manager, reload the command icons of preferred size and recompute layout of the main frame window. As result, all the reloaded icons will have new preferred size. I.e. your app can implement support for several icon types of any sizes. But this requires complete reloading of icons.
|
|
|
Art Wilkes
|
Jun 17, 2010 - 1:06 PM
|
1. After a theme is picked in the Theme sample program how are the colors harvested for a target program? 2. How do you set the inactive color in a grid window? I’m using the grid window as a test display and the text is faint. Thanks Art Wilkes
|
|
|
Technical Support
|
Jun 19, 2010 - 11:44 AM
|
The CExtPaintManager::GetColor() virtual method is similar to the GetSysColor() Win32 API. You can use the CExtPaintManager::GetColor() method (the COLORREF clr = g_PaintManager->GetColor( . . . ) code) to query themed colors. The grid controls use the CExtScrollItemWnd::OnSiwGetSysColor() virtual method to query colors. This virtual method is also similar to the GetSysColor() Win32 API. It’s defined for customizing particular grid controls in Prof-UIS based applications. The read-only text / background colors for grid elements are provided by the CExtScrollItemWnd::OnSiwGetReadOnlyTextColor() / CExtScrollItemWnd::OnSiwGetReadOnlyBackgroundColor() virtual methods. Please note, the CExtGridCell::BackColorSet() and CExtGridCell::TextColorSet() methods allow to specify different background / text colors independently for all the grid cells in any cell state.
|
|