Subject |
Author |
Date |
|
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.
|
|
the-coder
|
Jun 17, 2010 - 5:05 AM
|
Hallo, I`m using a CExtGridCellString cell in my CExtGrid. The CExtGridCellString cell has the __EGCS_EX_WRAP_TEXT set, because I want to store longer texts into the cell. Now I want the cell to set the row height automatically to the height my CExtGridCellString needs. When it has 10 lines, the row height should be 10 lines, when there is only 1 line, the row height should only show one line. How can I adjust the row height to the content of my CExtGridCellString cell?
|
|
Technical Support
|
Jun 21, 2010 - 12:08 PM
|
The BestFitRow() API measures all the grid cells in the specified row and computes minimal row size to make the content of each grid cell fully visible. The __EGCS_EX_WRAP_TEXT grid cell style does not affect to the cell size measurement. This means, BestFitRow() API does not have any idea which width would you like to see in the grid cell with wrapped text. As result, the grid column containing cell with wrapped text should have the maximal allowed column width configured from your code programmatically. I.e. you should limit the maximal column widths via invoking the CExtGridCell::ExtentSet() method of the column header cell.
|
|
Technical Support
|
Jun 21, 2010 - 12:08 PM
|
The BestFitRow() API measures all the grid cells in the specified row and computes minimal row size to make the content of each grid cell fully visible. The __EGCS_EX_WRAP_TEXT grid cell style does not affect to the cell size measurement. This means, BestFitRow() API does not have any idea which width would you like to see in the grid cell with wrapped text. As result, the grid column containing cell with wrapped text should have the maximal allowed column width configured from your code programmatically. I.e. you should limit the maximal column widths via invoking the CExtGridCell::ExtentSet() method of the column header cell.
|
|
Technical Support
|
Jun 19, 2010 - 11:45 AM
|
The __EGCS_EX_WRAP_TEXT extended grid cell style makes the text grid cell automatically organize the text into a larger number for text lines when there is not enough width available. But if your text cells containing multiline text based on the carriage return character, then you should also specify the __EGCS_EX_MULTILINE_TEXT extended grid cell style which enables support of the carriage return character and also makes cell in-place editor multiline. The CExtGridWnd::BestFitRow() method can be invoked after initializing all the cells in the grid row. This method will automatically adjust row height. Please note, your grid control should be configured to support variable row heights. I.e. the __EGBS_FIXED_SIZE_ROWS style should not be specified. The row heights are stored in the outer header cells at left or right. So, you should add at least one header column at left and initialize it with CExtGridCellHeader grid cells. If you don’t want to see this outer header column, then you should set its width to zero using the CExtGridBaseWnd::OuterColumnWidthSet() method.
|
|
the-coder
|
Jun 21, 2010 - 11:08 AM
|
Ok, it works for texts with line breaks. Is it possible to use the BestFitRow Funcstion for wrapped text which is too long for one column also? Here is a screenshot: I manually resized the second inner row a little bit to show what is meant
|
|
Torsten Schucht
|
Jun 10, 2010 - 9:54 AM
|
Dear Support Team, I have a strange behaviour of the CExtListCtrl in my application. It is a simple dialog based app. Beside other controls, I am using a CExtListCtrl in report style. The List control is decorated with the CExtNCSB<> template. When the app starts the header of the columns are all in ’old’ style (e.g. not themed). When I hover them with the mouse they get painted correctly. There is a difference in the behaviour between the architecures and configurations: Release-x86, Debug-x86, Debug-x64: as described above Release-x64: besides the wrong theme, the hovering causes the them to be correct but deletes the text in the header and also when resizing the column width the app crashes. I have a simplified version of the app. Maybe that helps. I’ll email the app since I don’t find a way to attach it to this post. I am using v2.89. Looking forward to your answer. Thanks in advance. Torsten
|
|
Technical Support
|
Jun 14, 2010 - 9:55 AM
|
We fixed the CExtHeaderCtrl crashes in x64 version. Could you drop us an e-mail to the support mail box at this web site so we will provide you with the source code update.
|
|
Torsten Schucht
|
Jun 14, 2010 - 1:54 AM
|
Thanks for the response. That successfully fixed the first problem with painting the themed headers. We do still have two problems: - now the headers do not have text on it at all (since we used the patch) - when resizing the columns the software crashes (this also happens in the ProfUIS_Controls example) These problems only occur in the Relase MBCS x64 configurtaion. It runs on a Win7 x64 computer. Torsten
|
|
Technical Support
|
Jun 11, 2010 - 8:21 AM
|
Thank you for reporting us this issue. To fix it, please update the source code for the following method: bool CExtListCtrl::_Init()
{
CExtHeaderCtrl & wndHeader = m_wndHeaderCtrl;
if( wndHeader.GetSafeHwnd() != NULL )
return true;
if( ! wndHeader.SubclassWindow( GetDlgItem(0)->GetSafeHwnd()) )
return false;
wndHeader.Invalidate();
return true;
}
|