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 |
|
Bogdan Munteanu
|
Nov 19, 2011 - 5:42 AM
|
Dear support, I have a question about the hiding areas of the sliding bars ( those bands showing the tabs of the hidden bars). It looks to me that their height/width depends on the UI style and it falls in three categories:
- system-managed UI ( XP, and Studio 2003, 2005, 2008, and 2010)
- Office 2007-release 2 and Office 2010 (7 views in all)
- Office 2007-release 1 ( the silver one with a white vertical gradient in the middle). If it is not too much trouble, how can I make the width/height of the hiding areas for Office 2007-release 1 the same with the width/heigh for Office 2007 release 2 and Office 2010? Changing the UI style looks so much more stable if I do that. Thank you, Bogdan
|
|
Technical Support
|
Nov 21, 2011 - 1:18 PM
|
If you do not need auto hiding feature, please comment out the invocation of the CExtControlBar::FrameInjectAutoHideAreas() static method.
|
|
Bogdan Munteanu
|
Nov 22, 2011 - 7:48 PM
|
Thanks for your response: I actually need the auto hiding features.
I was looking for something along the line of making CExtPaintManagerOffice2007_R1::TabWnd_GetParentSizingMargin() return false instead of specifying a margin of 0. That way, all styles related to Office would have had the same width/heigh of the hiding area.
Thank you for your consideration.
|
|
Bogdan Munteanu
|
Nov 19, 2011 - 5:38 AM
|
Dear support, I have some difficulties using CExtShellDialogFile. Consider the BitmapEditor example shipped with the library.
Somewhere, on the disk create a file with the extension .zip ( be it target.zip). Now try to save the existing bitmap ( the fish) in the same folder with target.zip and give it the same root name target. Whenever I do that and I press Save, nothing happens although I would have expected to save the bitmap as target.bmp. Worse, pressing Save doesn’t give any feedback as to why it is not possible to save that file. The SaveAs dialog stays there as nothing happens. Can you please confirm and eventually suggest a fix if the case. Thank you, Bogdan
|
|
Technical Support
|
Nov 24, 2011 - 8:48 AM
|
Thank you for reporting this issue. To fix it, please update the source code for the following method: bool CExtPIDL::IsFolder() const
{
// basic folder detection
bool bRetVal = CheckAttributesOf( SFGAO_FOLDER );
if( ! bRetVal )
return false;
// exclude ZIP folders
DWORD dwAttributes = GetAttributesOf( SFGAO_FILESYSTEM|SFGAO_FILESYSANCESTOR|SFGAO_BROWSABLE );
if( dwAttributes != (SFGAO_BROWSABLE|SFGAO_FILESYSTEM) )
return false;
return true;
}
|
|
Bogdan Munteanu
|
Nov 26, 2011 - 3:47 PM
|
It worked, thank you. For future reference, is there any reason for showing zip archives in ’Save as’ dialogs? Although, not a show stopper, it looks a bit inconsistent to me.
|
|
Darlene Gariepy
|
Nov 18, 2011 - 1:46 PM
|
There appears to be a bug in the parsing algorithm for CExtRichContentScrollWnd when parsing HTML. If a quotation is used as the first character in an HTML tag (bold, italic, etc), the contents of the tag is not shown. For example, we have the following text to parse into HTML: <b>"test"</b> I would expect "test" to be shown in the CExtRichContentScrollWnd in bold. However, nothing is displayed. If a space (or any other character) is placed before the first quotation, the text is correctly parsed and shown in the window. We are currently using version 2.92.
|
|
Technical Support
|
Nov 24, 2011 - 8:49 AM
|
Thank you for reporting this issue. Please find the following text in the .../Prof-UIS/Src/ExtRichContent.cpp file: ( (*p) == _T(’<’) )
You will find it as part of a big compound if conditional statement inside the CExtRichContentLayout::ParseHTML() method: if( ( (!bInsideTag)
&& ( (*p) == _T(’<’) )
&& ( ( (_T(’A’)<=(*(p+1))) && ((*(p+1))<=_T(’Z’)) )
|| ( (_T(’a’)<=(*(p+1))) && ((*(p+1))<=_T(’z’)) )
|| ( (*(p+1)) == _T(’/’) )
|| ( (*(p+1)) == _T(’!’) )
)
)
|| ( bInsideTag
&& ( ( (*p) == _T(’>’)
&& ( (*(p+1)) != _T(’\"’)
&& (*(p+1)) != _T(’\’’)
)
)
|| ( (*p) == _T(’/’)
&& ( (*(p+1)) == _T(’>’)
&& ( (*(p+2)) != _T(’\"’)
&& (*(p+2)) != _T(’\’’)
)
)
)
)
)
)
Please comment three lines there: if( ( (!bInsideTag)
&& ( (*p) == _T(’<’) )
&& ( ( (_T(’A’)<=(*(p+1))) && ((*(p+1))<=_T(’Z’)) )
|| ( (_T(’a’)<=(*(p+1))) && ((*(p+1))<=_T(’z’)) )
|| ( (*(p+1)) == _T(’/’) )
|| ( (*(p+1)) == _T(’!’) )
)
)
|| ( bInsideTag
&& ( ( (*p) == _T(’>’)
// && ( (*(p+1)) != _T(’\"’)
// && (*(p+1)) != _T(’\’’)
// )
)
|| ( (*p) == _T(’/’)
&& ( (*(p+1)) == _T(’>’)
&& ( (*(p+2)) != _T(’\"’)
&& (*(p+2)) != _T(’\’’)
)
)
)
)
)
)
This will fix the quote character support issue.
|
|
Alastair Watts
|
Nov 16, 2011 - 4:20 AM
|
How do I change the size of a button in a status bar? I want it to fill the pane. Thanks in advance.
|
|
MUKESH GUPTA
|
Nov 14, 2011 - 2:38 AM
|
Hi,
I am using CExtTabWhidbeyWnd to create tabs in the Main area (document area) and using CExtTabPageContainerOneNoteWnd under CExtControlBar to create tabs under panes.
Please suggest if there is a way to drag/convert the tabs from the pane area to the Main area (similar to VS IDE) in the above scenario. If not, please point me to any other existing example which implements a similar functionality.
Thanks in advance.
|
|
Technical Support
|
Nov 15, 2011 - 2:52 AM
|
Please use dynamic control bars (CExtDynamicControlBar , CExtDynamicBarSite ) instead of simple control bars (CExtControlBar ) and tab page containers. Dynamic control bars can switch into tabbed document mode. See the <span class="newgreen">SDI_DynamicBars</code> and <span class="newgreen">MDI_DynamicBars</code> sample applications.
|
|
Alastair Watts
|
Nov 12, 2011 - 9:22 AM
|
How do I prevent cells being dropped on the recycle bin?
|
|
Offer Har
|
Nov 11, 2011 - 9:35 AM
|
Dear Support, You still did not solve the problem we reported of extra pixels in resizeable dialogs that appeared on 2.92 (which was NOT there in 2.90) on the right and bottom sides of the dialogs. To explain again - when a dialog is resizeable, you add the 6 dots on the bottom right corner of the dialog. In 2.90 and before, this had no effect on the dialog itself. in 2.92 you changed it so that these 6 dots are displayed in a ’beefed’ area of the dialog on the right and bottom edges of the dialog. We reported it, sent you a sample application showing the problem, you told us that there is a work-around, we told you that it doesn’t work, and we haven’t heard from you since. It’s been a while, and we NEED a fix for this problem please. Thanks, Ron.
|
|
Technical Support
|
Nov 12, 2011 - 11:20 AM
|
|
|
Emmanuel V.
|
Nov 10, 2011 - 7:34 AM
|
Hello, Is there a way to add a tooltip in CExtGridCellInplaceSlider ? I’m using this slider inside a PropertyGrid, and if we want to set a particular value, it’s not possible. Is there also a "buddy to edit" that can be linked to this CExtGridCellInplaceSlider ? Thanks.
|
|
Emmanuel V.
|
Nov 24, 2011 - 1:38 AM
|
We upgraded to ProfUIS v2.92, but it seems that CExtGridCell::ContentTipSet() is not working in a CExtPropertyGrid, which directly inherits from CWnd, not CExtGridWnd. Can you confirm, or we done something wrong ? Thanks.
|
|
Technical Support
|
Nov 24, 2011 - 8:41 AM
|
First of all, you should make tree grids inside the property grid control displaying content tips. Please invoke the following code during property grid initialization: CExtPropertyGridCtrl & _PGC = . . .
CExtPropertyGridWndCategorized * pPgwCategorized =
STATIC_DOWNCAST( CExtPropertyGridWndCategorized, _PGC.GetChildByRTC( RUNTIME_CLASS(CExtPropertyGridWndCategorized) ) );
ASSERT_VALID( pPgwCategorized );
pPgwCategorized->HoverEventsSet( true, false );
pPgwCategorized->AdvModifyStyle( __EGWS_ADV_CELL_CONTENT_TIPS_INNER );
CExtPropertyGridWndSorted * pPgwSorted =
STATIC_DOWNCAST( CExtPropertyGridWndSorted, _PGC.GetChildByRTC( RUNTIME_CLASS(CExtPropertyGridWndSorted) ) );
ASSERT_VALID( pPgwSorted );
pPgwSorted->HoverEventsSet( true, false );
pPgwSorted->AdvModifyStyle( __EGWS_ADV_CELL_CONTENT_TIPS_INNER );
Second, assign content tip before assigning grid cell to property value. Here is how we did this in the PropertyGrod sample project: CExtPropertyValue * pValSlider = new CExtPropertyValue( _T("Slider") );
pValSlider->NameSet( _T("Slider control") );
pValSlider->DescriptionSet( _T("Slider control.") );
CExtGridCellInplaceSlider * pCellInplaceSlider =
STATIC_DOWNCAST(
CExtGridCellInplaceSlider,
pValSlider->ValueDefaultGetByRTC(
RUNTIME_CLASS( CExtGridCellInplaceSlider )
)
);
pCellInplaceSlider->ScrollTotalRangeSet( 100 );
//pCellInplaceSlider->ScrollPageSizeSet( 20 );
pCellInplaceSlider->ScrollPosSet( 50 );
pCellInplaceSlider->ContentTipSet( _T("CExtGridCellInplaceSlider") );
pValSlider->ValueActiveFromDefault();
pCategoryMisc->ItemInsert(
pValSlider
);
|
|
Technical Support
|
Nov 11, 2011 - 5:13 AM
|
Grid cells in Prof-UIS 2.91 and older support a tooltip and a content expanding window. But this is supported only for grid cells with not fully visible inner cell parts. In Prof-UIS 2.92 and later all grid cells support new HTML-enabled content tips (CExtGridCell::ContentTipSet() ). Content tips are displayed near grid cells just when the mouse pointer is over cell area. It’s not important whether cell inner parts are completely visible.
The drid control is not a dialog replacement. The "buddy to edit" is not an applicable feature.
|
|
Alastair Watts
|
Nov 8, 2011 - 7:56 AM
|
I’ve added my own toolbar buttons & now want to replace the existing sort icons, how do I do this?
|
|
Alastair Watts
|
Nov 8, 2011 - 9:39 AM
|
|
|
Bogdan Munteanu
|
Nov 6, 2011 - 5:10 AM
|
Dear support,
Some of your competitors provide various modern controls like: knobs, gauges, charts, planner and Gantt controls. Do you plan offerring any of the components above, and if so, could you give us some guidance on when (if ever) you intend to have them? It would help many of us planning better our road maps. ( I am rather interested in knobs and Gantt controls...)
Thank you,
Bogdan
|
|
Technical Support
|
Nov 7, 2011 - 12:44 PM
|
Here is a modern round slider control: http://www.codeproject.com/KB/miscctrl/roundsliderctrl.aspx This is an article of year 2000. Compare with some of our competitors. You can also find gauges, charts and planner there. We do not understand why some of our competitors created a text editor with syntax highlighting because Scintilla is incomparably much better. If something can be found as a free component, we do not include a copy of it into Prof-UIS.
|
|
Offer Har
|
Nov 21, 2011 - 6:11 AM
|
I agree with Bogdan... what are the plans for the future of Prof-UIS? we are missing some features that exist in other libraries as well. We’ve been using Prof-UIS for years now, but we also need some controls that are available in other libraries such as: 1. Gantt 2. gauges 3. Bread-crumb control Please let us know what are your plans.
|
|
Bogdan Munteanu
|
Nov 7, 2011 - 4:43 PM
|
I take you have no plans to enhance the library in that direction. On a more detailed note:
1. I didn’t mention an editor control but a Gantt chart; 2. while I find your link to Code Project interesting, there are at least two issues with it: on one hand, I was enquiring about a more extensive family of robust controls (knobs and others) and not just something hacked on an Internet page. On another hand, by the same token, one could find on the net everything Prof-UIS offers: it is the quality of your products, people like me are probably interested in.
Thank you, though, for your prompt response.
Bogdan
|
|
Bogdan Munteanu
|
Nov 6, 2011 - 4:53 AM
|
Dear support,
In the Prof Studio example bundled with the library, whenever one presses the ’Auto Hide’ pin of a docking window (switching thus the mode from docked to sliding) there is a noticeable flicker. I am not quite sure but it looks like the docking control is erased only to be redrawn immediately in the other mode (take for example the Solution Explorer window in ProfStudio.exe: to eliminate other potential causes, make sure there are other docking windows hidden on the same side; expand the Solution Explorer window to the same size, both in the docking mode and in the sliding mode; press several times the pin). Would it be possible for you to advise on eliminating this artifact (eventually by not erasing the old background and simply sending redraw messages to the child windows involved)? This doesn’t happen, for example, in Visual Studio 2008/2005, etc.
Thank you,
Bogdan
|
|
Technical Support
|
Nov 15, 2011 - 2:52 AM
|
Thank you for detailed screen shots. They demonstrate what we do not see and cannot reproduce. Simple apps with 5 resizable bars switch from/to auto-hide mode immediately. ProfStudio sample app shows some lags but not flickering. We checked both Vista/7 DWM mode and XP/2000 classic desktops. Besides, nobody reported similar problems yet.
|
|
Bogdan Munteanu
|
Nov 15, 2011 - 3:51 AM
|
Thank you for considering this. Here are the steps to reproduce it:
In Visual Studio 2008 with Service Pack 1, select MDIDOCVIEW project in x64/MBCS Debug configuration. Build and run in the debugger, making Sure Visual Studio and MDIDOCVIEW app do not overlap on the screen.
In the MDIDOCVIEW application, close the view and all the docking bars/toolbars. From View / Resizable Bars select Editor view. From View / Resizable Bars select Empty view. Dock everything to the right side of the application (The Editor view is the rightmost). Change both views to sliding mode and let them hide.
In Visual Studio, open ExtControlBarTabbedFeatures.cpp. In the function CExtDynAutoHideSlider::_HookMouseClick(), put a breakpoint in the line pLastHitTestB->OnNcAreaClicked( ptWnd ); // line 4567 in 2.92 ammended with one patch In MDIDOCVIEW, hover over the Empty Tab. That eventually shows the bar. Press the docking pin of the Empty bar. The program stops in the breakpoint and the view is erased in the application: this is the source of the apparent flickering. This happens due to the line 4566: Activate( pBar, false, false, true ); Press F5 in Visual Studio. Finally, the bar is redrawn. Erasing the sliding view is unnecessary and creates the apparent flickering. Can you please confirm you’ve been able to reproduce it. This is consistently reproducible with any MDI app based on your framework. Thank you, Bogdan
|
|
Technical Support
|
Nov 15, 2011 - 11:44 AM
|
Thank you for providing us with the important details. Please find the pLastHitTestB->OnNcAreaClicked( ptWnd ); code in the CExtDynAutoHideSlider::_HookMouseClick() method. This is the code invocation meant in your message. There is small if statement just before the pLastHitTestB->OnNcAreaClicked( ptWnd ); code:
if( pLastHitTestB->OnQueryDeactivateAutohideSlider() )
Activate( pBar, false, false, true );
pLastHitTestB->OnNcAreaClicked( ptWnd );
Please modify this if to remove the non-painted flicker effects: if( pLastHitTestB->OnQueryDeactivateAutohideSlider() )
{
Activate( pBar, false, false, true );
CExtPaintManager::stat_PassPaintMessages();
}
pLastHitTestB->OnNcAreaClicked( ptWnd );
|
|
Bogdan Munteanu
|
Nov 15, 2011 - 2:00 PM
|
Thank you so much for confirming this.
I’ve probably made a mistake but it doesn’t seem to work for me...By the time the call to Activate() returns, the sliding window is already gone: if( pLastHitTestB->OnQueryDeactivateAutohideSlider() )
{
Activate( pBar, false, false, true );
// here, the sliding view is already gone
CExtPaintManager::stat_PassPaintMessages();
}
pLastHitTestB->OnNcAreaClicked( ptWnd ); This seems to be due to this call: SetWindowPos( NULL, 0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOREPOSITION|SWP_HIDEWINDOW); inside Activate() (around the line 5669). If I skip that SetWindowPos() above inside Activate() and I postpone it after pLastHitTestB->OnNcAreaClicked( ptWnd ) inside CExtDynAutoHideSlider::_HookMouseClick() the behavior is much better. Something like this: if( pLastHitTestB->OnQueryDeactivateAutohideSlider() )
Activate( pBar, false, false, true, true ); // added new arg only to indicate this special case
pLastHitTestB->OnNcAreaClicked( ptWnd ); // (postponed SetWindowPos() postponed from Activate()
if( pLastHitTestB->OnQueryDeactivateAutohideSlider() )
SetWindowPos( NULL, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREPOSITION |SWP_HIDEWINDOW );
I do understand that Activate() is called from many places so, I used a supplementary argument while calling it.
|
|
Technical Support
|
Nov 7, 2011 - 12:45 PM
|
The flicker is notably visible because of a large number of bars. ProfStudio creates 42 bars. Prof-UIS does the following when you click the ping button over the bar caption: 1) Hide the bar. 2) Recompute the frame layout. 3) Move bar’s child window into a hidden dynamic auto-hide slider window. 4) Show the auto-hide slider window. The dynamic auto hide slider window looks like a control bar. But it’s not a bar. There is only one such window inside a frame. It’s re-used for all bars. The flicker is not really a flicker. It’s time spent for frame layout computation. It’s not visible in a normal application with 5 or 10 bars.
|
|
Bogdan Munteanu
|
Nov 13, 2011 - 2:50 PM
|
I sent you also an email with the example detailed below.
|
|
Bogdan Munteanu
|
Nov 13, 2011 - 2:43 PM
|
Dear support, This is a more detailed explanation of the flickering occurring while switching from docking to sliding mode:
1. Switching from an auto-hide slider to a docking window:
The reason for the apparent flicker has nothing to do with the number of docking windows but rather to an unfortunate side-effect. Consider the MDIDOCView example, where the Empty view is about to be switched from a slider to a docking window: - first, the auto-hide slider is deactivated by calling CExtDynAutoHideSlider::Activate in CExtDynAutoHideSlider::_HookMouseClick(). Unfortunately the visual side effect is that the slider is hidden, exposing the background - second, the docking window is drawn in its expected position:
One can reproduce this consistently by setting breakpoints in: ExtControlBarTabbedFeatures.cpp towards the end of bool CExtDynAutoHideSlider::_HookMouseClick(): Activate( pBar, false, false, true ); pLastHitTestB->OnNcAreaClicked( ptWnd ); While I understand the need for deactivating the slider (cancelling timers, resetting the slider’s state, etc.), fact is that the user experience is really bad, since the image flickers.
Can you please reset the slider without hiding it and only redraw the final layout.
2. Switching from a docking window to an auto-hide slider:
Would it be possible for you to keep the slider hidden, immediately after switching from docking to slider (eventually via an option)? This way, there is no need to redraw the auto-hide slider only to have it withdrawn afterwards: after all the user tries to hide that view. Not calling m_pWndSlider->Activate( pBar, true, false, true ) at the end of CExtDynAutoHideArea::AppendControlBar() seems to do the trick.
I am just trying to help here, so any solution that eliminates the obvious flickering works for me.
Thank you, Bogdan
|
|
Bogdan Munteanu
|
Nov 7, 2011 - 4:44 PM
|
Thank you for your prompt response.
I am afraid you are not right.Take another Prof_UIS example - MDIOCView: that one uses only 5 control bars. I closed everything but the Editor and Empty control bars, I hid the Editor on the left side of the main frame and I toggled the sliding pin of the Empty control bar docked also on the left side. The flickering is still noticeable. I have a good notebook (8G Ram, i7 SandyBridge at 2.3 GHz + 1G of memory on the graphics card) so, hardware performance is not an issue. I also tried Visual Studio 2008 with 43 docking windows opened simultaneously on the same machine and there is no flickering.
Could you please take one more look at this issue: I believe this is a good way to improve your library.
Thank you,
Bogdan
|
|
Alastair Watts
|
Nov 4, 2011 - 4:44 AM
|
How would I draw a line under the tabs?
|
|
Alastair Watts
|
Nov 9, 2011 - 4:12 AM
|
Almost got it ... I’m having to manually adjust the coords though, whats the correct way of doing it?
PS: What’s up with forum message cut & paste ... it never seems to work properly!
CExtTWPC < CExtTabWnd > :: OnTabWndDrawEntire(dc, rcClient);
TAB_ITEM_INFO* pTab = ItemGet(SelectionGet()); CRect rcTab = pTab->ItemRectGet(); rcTab.left += 4; rcTab.right += 3;
dc.FillSolidRect(rcClient.left, rcClient.bottom - 1, rcTab.left, rcClient.bottom - 1, RGB(240, 240, 240)); dc.FillSolidRect(rcTab.right, rcClient.bottom - 1, rcClient.right, rcClient.bottom - 1, RGB(240, 240, 240));
|
|
Alastair Watts
|
Nov 9, 2011 - 3:50 AM
|
GetRectTabNearBorderArea() returns (0, 0, 0, 0) & nothing else throughout the life of the application ... so I’m using rcClient instead. I’m currently drawing a line under all tabs, how do I get the area of the currently selected tab so that don’t draw a line under it?
|
|
Technical Support
|
Nov 8, 2011 - 7:48 AM
|
It can be empty initially or when the layout computation is delayed. You should ignore these cases.
|
|
Alastair Watts
|
Nov 8, 2011 - 2:37 AM
|
GetRectTabNearBorderArea() is returning (0, 0, 0, 0) ???
|
|
Technical Support
|
Nov 7, 2011 - 12:42 PM
|
Here is the sample code:
class CMyTabWnd : public CExtTWPC < CExtTabWnd >
{
public:
virtual void OnTabWndDrawEntire(
CDC & dc,
CRect & rcClient
)
{
CExtTWPC < CExtTabWnd > :: OnTabWndDrawEntire( dc, rcClient );
CRect rcNearBorder = GetRectTabNearBorderArea();
. . . to-do: draw your lines here
}
};
class CMyTabPageContainerWnd : public CExtTabPageContainerWnd
{
public:
virtual CExtTabWnd* OnTabWndGetTabImpl()
{
return new CMyTabWnd;
}
};
|
|
Eric
|
Oct 24, 2011 - 6:57 AM
|
Hello,
I have a question concerning the DPI Virtualization on Win 7.
I have some display issues when the display is in 125% or 150% mode.
I tried to deactivate the following property ’Disable display scaling on high DPI settings’ at executable level and also at system level but nothing changed.
I also tried to change it programmatically by calling the method ’SetProcessDPIAware’ and by modifying my product manifest but nothing changed either.
So here is my question, did you implement your own DPI virtualization system ??
I tried also to modify some variables of the ’Paint Manager’:
g_PaintManager.m_bEnableUiScalingX = g_PaintManager.m_bEnableUiScalingY = g_PaintManager.m_bEnableUiScalingZ = false;
g_PaintManager.m_bIsWinVista = g_PaintManager.m_bIsWinVistaOrLater = g_PaintManager.m_bIsWin7 = g_PaintManager.m_bIsWin7OrLater = false;
but nothing changed, a non wanted resize is ALWAYS applied.
Do you have any idea?
Regards,
Cedric.
|
|
Technical Support
|
Oct 26, 2011 - 1:28 AM
|
the standard applications provided with Windows Vista and 7 do the same as Prof-UIS does it: we forcefully disable DPI scaling. The normal classic Win32 UI is based on raster graphics and appropriate computational algorithms rather than on vector graphics and floating point computations. This is performed by the following code in the CExtPaintManager::CExtPaintManagerAutoPtr::CExtPaintManagerAutoPtr() constructor:
BOOL ( WINAPI * pfnSetProcessDPIAware )( VOID ) = ( BOOL ( WINAPI * )( VOID ) ) ::GetProcAddress( m_hDllUser32, "SetProcessDPIAware" ); if( pfnSetProcessDPIAware != NULL ) pfnSetProcessDPIAware();
|
|
Alastair Watts
|
Oct 17, 2011 - 3:41 AM
|
I currentlty use g_CmdManager->CmdSetIcon() to set command icons. The alpha channel is not displayed correctly when using RGBA icons, how do we fix this?
|
|
Alastair Watts
|
Nov 3, 2011 - 4:32 AM
|
I think you misunderstand me. I’m not using image lists, I only asked if the Prof-UIS command manager did. LoadImage() is not affecting the image as it draws correctly with DrawIconEx(). When using icons in Prof-UIS commands or Prof-UIS grids the icons are not being displayed correctly around the edges.
|
|
Technical Support
|
Nov 2, 2011 - 12:20 PM
|
We mean you can fix the problem with a high color image list by creating a image list of ILC_COLOR32 type and then adding 32-bit color icons into it. But our command manager is not based on Win32 image lists. If you saw bad icons somewhere, then their quality were damaged by some APIs. Please note, the LoadImage() Win32 API may decrease the color depth of a loaded icon if current video mode on your monitor is not 24 or 32 bit.
|
|
Alastair Watts
|
Nov 1, 2011 - 8:08 AM
|
I’m sorry I don’t understand what you mean, could you please explain a little more.
|
|
Technical Support
|
Nov 1, 2011 - 3:42 AM
|
Please create a 32-bit image list (ILC_COLOR32 ) and then add an icon to it. You can use the CExtImageList class for that.
|
|
Alastair Watts
|
Oct 27, 2011 - 6:13 AM
|
The icon is loaded using:
hIcon =(HICON)::LoadImage(CoreDLL.hModule, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, 24, 24, 0);
I use this throughout the application and only have issues when using the Prof-UIS API. DrawIconEx() works just fine!
I understand MFC has a bug when using CImageList and RGBA icons - are image lists used in the command manager?
|
|
Technical Support
|
Oct 19, 2011 - 6:28 AM
|
Please let us know how you are loading your icons.
|
|
Bogdan Munteanu
|
Oct 10, 2011 - 4:52 PM
|
Dear customer support,
I believe there are some problems with the Print Preview functionality in Prof UIS whenever used with multiline text cells. If the cell contents exceeds one line, the subsequent lines overlap the contents of the cells underneath.
I emailed you an example based on Synchronized Grids with the erroneous behavior.
Could you please confirm and advise,
Thank you,
Bogdan
|
|
Bogdan Munteanu
|
Oct 11, 2011 - 5:05 PM
|
Dear support,
Your fix works for multiline, thank you!
There seems to be another issue with rendering cells with very long contents: whenever in the last column, the text exceeds the page margin:
I sent you an email showing that behavior.
Thank you, Bogdan
|
|
Technical Support
|
Oct 13, 2011 - 12:17 PM
|
It seems there is only one way to resolve this issue: make the text multiline.
|
|
Bogdan Munteanu
|
Nov 6, 2011 - 4:18 AM
|
How can this be done for the value cells of a property grid? (The example I sent was not a data grid but a property grid control.) Thank you.
|
|
Technical Support
|
Nov 7, 2011 - 12:42 PM
|
The property grid control supports data cells of a variable height automatically.
|
|
Bogdan Munteanu
|
Nov 13, 2011 - 2:46 PM
|
Can you reply to my latest message? Thank you, Bogdan
|
|
Technical Support
|
Nov 15, 2011 - 2:54 AM
|
We still trying to resolve this issue without modifying method signatures. The current version of the print/preview page generating algorithm assumes all the cells have the size less than the page size. So, the fastest way to resolve this is to override the CExtGridCell::MeasureCell API and provide alternative a cell size which fit the page size. Generally, this task does not have a 100% working solution. Even if we turn on text wrapping, then cell height can potentially exceed the page height.
|
|
Bogdan Munteanu
|
Nov 7, 2011 - 4:47 PM
|
I apologize, I wasn’t clear… As a solution to a print preview where the contents exceeds the right side of the page, you sent me an email that read:
“You can limit the maximal cell width by invoking the ExtentSet( extent, 1 ) method of column header cell and specify __EGCS_EX_WRAP_TEXT extended cell style for all data cells.”
I am not sure how to set the maximal cell width of the column header of a property grid.
Thank you for your prompt response,
Bogdan
|
|
Technical Support
|
Oct 11, 2011 - 12:16 PM
|
Thank you for reporting this issue. To fix it, please update the source code for the following 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|DT_NOPREFIX;
CRect rcCellTextMeasured( 0, 0, 0, 0 );
if( (dwCellStyleEx&(__EGCS_EX_WRAP_TEXT|__EGCS_EX_MULTILINE_TEXT)) != 0L )
{
if( ( dwCellStyleEx & __EGCS_EX_WRAP_TEXT ) != 0L )
nDrawTextFlags |= DT_WORDBREAK;
if( pWndGrid != NULL )
{
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.SetRect( 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;
}
|
|
Alastair Watts
|
Oct 6, 2011 - 9:31 AM
|
Do you have an updated help file? I can find little to no documentation of any of the toolbar button classes. Thanks.
|
|
Technical Support
|
Oct 7, 2011 - 9:51 AM
|
This is related to CExtCustomizeSite interface APIs. Toolbar buttons just implement the behavior of buttons in toolbars. Please override the set of CExtCustomizeSite::OnPopupListBox***() virtual methods. See the the StyleEditor sample application.
|
|
Alastair Watts
|
Oct 6, 2011 - 8:09 AM
|
How do I make it accept the input when losing focus, instead of having to press [RETURN]?
|
|
Technical Support
|
Oct 7, 2011 - 9:51 AM
|
Please override the CExtCustomizeSite::OnTextFieldInplaceTextSet() virtual method. See the CMainFrame::OnTextFieldInplaceTextSet() method in the StyleEditor sample application.
|
|
Alastair Watts
|
Oct 5, 2011 - 9:24 AM
|
How do I modify the height of this please?
|
|
Alastair Watts
|
Oct 6, 2011 - 4:10 AM
|
|
|
Technical Support
|
Oct 5, 2011 - 11:01 AM
|
You should override the CExtBarButton::CalculateLayout() virtual method for providing a toolbar button with an alternative size. You can override the CExtBarButton::PaintCompound() virtual method if you need a completely repainted toolbar button. Your method can be very similar to original with only one different line of code:
pBar->PmBridge_GetPM()->PaintPushButton( dc, _ppbd );
The line of code above invokes the default paint manager. You can instantiate another copy of any paint manager and invoke it instead of default one here.
|
|
Alastair Watts
|
Oct 5, 2011 - 9:38 AM
|
Don’t worry, I did it by overriding CMyToolControlBar::_RecalcPositionsImpl() Another question though ... Each bar button is drawn according to the toolbars paint manager, is it possible to draw CExtSpinBarButton using a different theme as the toolbar’s theme is CExtPaintManagerOffice2007_R1 which draws the spin buttons the same regardless of hover, etc and I want the button the change colour when hovered.
|
|
Alastair Watts
|
Oct 3, 2011 - 3:06 PM
|
I’m looking to improve grid building performance, or rather grid shrinking performance. I have been using RowTruncate() to reduce the row count and this works, but RowTruncate() can take a few seconds on large grids. I thought I might be able to use the following instead ... but it crashes!
LONG nRowsNeeded = CalculateRowsNeeded();
if(nRowsNeeded > m_nRowsCurrent)
{
RowCountSet(m_nRowsCurrent);
RowAdd(nRowsNeeded - nRowsCurrent, false);
m_nRowsCurrent = nRowsNeeded;
}
else if(nRowsNeeded < m_nRowsCurrent)
{
RowCountSet(nRowsNeeded, false);
}
...
|
|
Technical Support
|
Oct 5, 2011 - 10:58 AM
|
The RowAdd() , RowInsert() , RowTruncate() and RowRemove() APIs are for in-memory grids. The RowCountSet() API is for virtually cached grid controls. If you are using an in-memory grid, you should not use APIs of virtually cached grids and vice versa. In-memory grids are not good for big row counts. Virtually cached grids demonstrate performance which does not depend on the row count. The AdoRecordsetView sample application demonstrates virtually cached grid control which loads grid rows from a database. Here is the test project demonstrating non-database grid with virtual caching:
http://www.prof-uis.com/download/forums/CacheableGrid2.zip
|
|
Alastair Watts
|
Oct 3, 2011 - 5:29 AM
|
I’ve overrriden CExtToolControlBar::_RecalcPositionsImpl() to modify the position & show/hide of buttons which works great, however, the incorrect commands are appearing in the chevron menu. How can I customise the chevron contents?
|
|
Alastair Watts
|
Oct 3, 2011 - 8:04 AM
|
It’s OK ... I’ve worked it out.
|
|
Alastair Watts
|
Oct 3, 2011 - 7:51 AM
|
... I’m using CExtBarButton::SetRect() & CExtBarButton::Show() position & show/hide the buttons.
|
|