Subject |
Author |
Date |
|
Damien Castelltort
|
Jan 10, 2007 - 1:44 AM
|
Hi,
I want to change the current decimal separator in the property cells of my app. For the moment the separator is ’,’ (french Windows XP). I want to change it and have ’.’ instead. The language in the ressources is set to English (US - 0x0409) but the separator is still ’,’. Same thing if I make a call to SetThreadLocale(MAKELCID(0x0409, SORT_DEFAULT));.
Do you have a way to change this separator in the cells ?
Thanks in advance.
AurA©lien Loizeau
|
|
Damien Castelltort
|
Jan 10, 2007 - 2:24 AM
|
I found CExtGridCellNumber::SetDecimalSeparator to specify the separator but as we used variant cells I was not able to use this method.
I solved the problem using this code : LCID LOCALE_LCID = GetSystemDefaultLCID(); ASSERT(SetLocaleInfo(LOCALE_LCID, LOCALE_SDECIMAL, "."));
|
|
Eric Houvenaghel
|
Jan 9, 2007 - 11:48 AM
|
Hello,
Just like a column can be activated and deactivated, can a row be activated and deactivated. I would like to add a filter that hide rows that meet search critirias. I don’t want to have to register and unregister items.
Thank you.
|
|
Eric Houvenaghel
|
Jan 11, 2007 - 8:36 AM
|
Hello,
If you could have it in a month or two that would work for us. Any longer and we would have to develop it ourselves. Let me know.
Thanks.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 2:06 AM
|
Dear Eric,
Filters for the CExtReportGridWnd class are in the TO-DO list. How soon this feature is needed in your project?
|
|
Fabien Masson
|
Jan 9, 2007 - 7:06 AM
|
Dear Support Team,
First of all, let me wish you an happy new year !
I was looking for forcing CLEARTYPE_QUALITY in our application and saw that all the relevant code was commented out in CExtPaintManagerOffice2007_Impl::CreateDefaultFont(). Is there any reason for ? Is it work in progress ?
I then declare my "Paint Manager" based on your code and all of your "100% from scratch" GUI is working great with ClearType but not basic controls like CExtLabel, etc...
What would be the best way to go : 1. Override all controls that I use for methods like CExtLabel::OnDrawLabelText, CExtButton::OnQueryFont, ... ? 2. Override OnInitDialog or OnInitialUpdate for all controls like static, button, etc with a generic method based on fonts from PaintMnager? 3. Set the correct font for each control in OnInitDialog or OnInitialUpdate ?
Best regards, Fabien.
|
|
Fabien Masson
|
Jan 18, 2007 - 5:35 AM
|
Dear Team Support, Dear Sergiy,
Any hints to my 3 questions ?
Regards, Fabien.
|
|
Fabien Masson
|
Jan 15, 2007 - 7:59 AM
|
Dear Sergiy,
I derivated the CExtPaintManager and add a property flag to control the ClearType effect (based also on m_bIsWinXPorLater).
I add to implement the following methods : - virtual HFONT CreateDefaultFont(); - virtual HFONT CreateCaptionFont(); - the 2 static functions needed by CreateXXXFont methods.
At the end of each OnInitialUpdate (CFormView) or OnInitDialog (CDialog), I call an internal method of my paint manager which check what kind of font is set to all my controls (normal or bold) and replace it with the correct font of my paint manager. So, all the code is placed in my paint manager and it’s not so complicated to handle it. Would you have a better method than doing this way ? (Question 1)
Everything is working great (or at least 99% of it) ; in fact, sometime, It doesn’t use my font in CExtDateTimeWnd (when the control is created dynamically). Any hint ? (Question 2)
When I play with the lfHeight attribute of LOGFONT (+ some ressources tweaking at run-time in Create...), everything is painted correctly except the CExtStatusControlBar which is not "height" enough. Any tip for it ? (Question 3)
Best regards, Fabien.
|
|
Technical Support
|
Jan 18, 2007 - 1:34 PM
|
1. This is an acceptable way.
2. We discovered that the custom controls, derived from CWnd , do not respond to the WM_SETFONT message automatically. The WM_SETFONT and WM_GETFONT messages simply do not work. So we had to handle these massages manually and store the font handler inside all our custom controls, such as the CExtDateTimeWnd. The latest library version 2.63.3, available from the Download page, is already free from this bug.
3. You can change the height of the status bar using the CStatusBarCtrl::SetMinHeight() method: CStatusBar & wndStatusBar = . . .
wndStatusBar.GetStatusBarCtrl.SetMinHeight( 50 ); // sets the height of 50 pixels
|
|
Fabien Masson
|
Jan 10, 2007 - 3:30 PM
|
Dear Support Team,
Do you think I should go the 1st way ? override all controls painting methods ?
By the way, it seems that when you use an higher lfHeight, the bottom status bar is not updated correctly. What do I miss ?
Regards, Fabien.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 2:04 AM
|
Dear Fabien,
Currently the clear type font effect is applied if it is turned on in the Windows settings. The Office 2007 (release version) applications allow to turn on the clear type font effect independently from Windows settings. Yes, it is possible to re-assign fonts to any windows, but it is not an effective way. I see two solutions:
- Implement some property flags in the
CExtPaintManager class which will control whether the clear type font effect should be used in CFont objects stored in the paint manager. This should not be difficult to do for the nearest release or, even, provide you with the source code update as soon as possible.
- You can create and use your own paint manager class which will initialize fonts with the clear type effect turned on.
|
|
Eddie Judson
|
Jan 8, 2007 - 6:08 PM
|
I have a compound property value in a property store that is specified below:
CExtPropertyValueCompound * pValueCompoundColorFill = new CExtPropertyValueCompound("Fill Color" ); pValueCompoundColorFill->DescriptionSet( _T("Specifies the fill color of the object") ); CExtGridCellColor * pColorCellCompoundFill = STATIC_DOWNCAST( CExtGridCellColor, pValueCompoundColorFill->ValueDefaultGetByRTC( RUNTIME_CLASS(CExtGridCellColor) ) ); pColorCellCompoundFill->m_PackedColor.SetColor(IsNoFill() ? COLORREF(-1) : GetFillColor() ); pColorCellCompoundFill->SetMode( CExtGridCellColor::eRGB ); pColorCellCompoundFill->m_bEnableButtonDefaultColor=true; pColorCellCompoundFill->m_sBtnTextColorDefault="No Fill"; pColorCellCompoundFill->m_clrDefault = COLORREF(-1);
When I click the No Fill button in the pop up color selection OnPgcInputComplete is not fired and when I extract the value from the property store (pColorCellCompoundFill->m_PackedColor.GetColor())the value is still the default color not COLORREF(-1)
Can you point me in the right direction.
Regards,
Eddie
|
|
Eddie Judson
|
Jan 13, 2007 - 4:14 PM
|
Thanks for your reply, I have done this and am getting the OnPgcInputComplete event, but how do I know that the "No Fill" button was pressed as I specifiy pColorCellCompoundFill->m_clrDefault = COLORREF(-1);
and in OnPgcInputComplete I have
CExtPropertyValueCompound * pCompound = DYNAMIC_DOWNCAST( CExtPropertyValueCompound, pPropertyItem ); CExtGridCell * pCellActiveValue = pCompound->ValueActiveGet(); ASSERT_VALID( pCellActiveValue ); CExtSafeString strPropertyName = pCompound->NameGet(); COLORREF testClr=COLORREF(-1); if( strPropertyName == "Fill Color" ) { CExtGridCellColor * pCell = STATIC_DOWNCAST( CExtGridCellColor, pCellActiveValue ); testClr= pCell->GetColor(); }
and testClr is coming out as white not COLORREF(-1)?
Regards, Eddie
|
|
Technical Support
|
Jan 15, 2007 - 1:11 PM
|
Yes, you are right. Our previous bug-fix was not complete. So we fixed this. We will upload 2.63.3 tomorrow. Please note now all the negative color values (i.e. COLORREF(-1L) ) are interpreted as invalid (empty). To detect whether the cell color is valid (not empty), use CExtGridCellColor::IsEmpty() .
|
|
Eddie Judson
|
Jan 18, 2007 - 3:20 AM
|
Thanks for your help, how to I download 2.63.3? Regards, Eddie
|
|
Technical Support
|
Jan 18, 2007 - 1:31 PM
|
|
|
Eddie Judson
|
Jan 22, 2007 - 11:31 PM
|
This now works correctly except now when I show the property grid and set the color with pColorCellCompoundFill->SetColor(IsNoFill() ? COLORREF(-1) : GetFillColor() ); I cannot choose the top left color in the picker which is black, any suggestions? Regards, Eddie
|
|
Technical Support
|
Jan 23, 2007 - 11:16 AM
|
The CExtGridCellColor::m_clrDefault property is initialized, by default, to COLORREF(-1L) . If you set it to a correct color value constructed using the RGB() preprocessor function, then you will should see it in the top color button of the color pop-up menu.
|
|
Eddie Judson
|
Jan 23, 2007 - 6:55 PM
|
Here is my code for setting the default color button
pColorCellCompoundFill->SetColor(IsNoFill() ? COLORREF(-1) : GetFillColor() ); pColorCellCompoundFill->SetMode( CExtGridCellColor::eRGB ); pColorCellCompoundFill->m_bEnableButtonDefaultColor=true; pColorCellCompoundFill->m_sBtnTextColorDefault="No Fill"; pColorCellCompoundFill->m_clrDefault = COLORREF(-1);
It is NOT the default color button that is not working it is the top left in this picture http://eddiejud.dnsalias.com/dotnetnuke/portals/0/notworking.gif
Regards, Eddie
|
|
Technical Support
|
Jan 25, 2007 - 7:05 AM
|
Please find the following code in the CExtGridCellColor::OnButtonPopupMenuTrack() method: if( nResultCmdID == 0 )
return true; and replace it with this if( nResultCmdID == 0
&& clrValueFinal == COLORREF( -1L )
)
return true; This should fix this. Thank you.
|
|
Technical Support
|
Jan 9, 2007 - 11:34 AM
|
Thank you for reporting the bug. We have just fixed it.
Please find the declaration of e_color_selection_t in the CExtPopupColorMenuWnd class and replace it with this: enum e_color_selection_t
{
__ECST_NONE = COLORREF( -1L ),
__ECST_BUTTON_CUSTOM = COLORREF( -2L ),
__ECST_BUTTON_DEFAULT = COLORREF( -3L ),
}; Update the CExtPopupColorMenuWnd::_OnMouseClick() method: bool CExtPopupColorMenuWnd::_OnMouseClick(
UINT nFlags,
CPoint point,
bool & bNoEat
)
{
ASSERT_VALID( this );
bNoEat;
if( GetSafeHwnd() == NULL )
return false;
if( GetSite().GetAnimated() != NULL )
return true;
TranslateMouseClickEventData_t _td( this, nFlags, point, bNoEat );
if( _td.Notify() )
{
bNoEat = _td.m_bNoEat;
return true;
}
bool bLButtonUpCall =
(nFlags==WM_LBUTTONUP || nFlags==WM_NCLBUTTONUP)
? true : false;
if( m_eCombineAlign != __CMBA_NONE
&& m_bTopLevel
)
{
CRect rcExcludeAreaTest( m_rcExcludeArea );
ScreenToClient( &rcExcludeAreaTest );
if( rcExcludeAreaTest.PtInRect( point ) )
{
if( !bLButtonUpCall )
{
_OnCancelMode();
return true;
}
return false;
} // if( rcExcludeAreaTest.PtInRect( point ) )
} // if( m_eCombineAlign != __CMBA_NONE ...
if( _IsTearOff() && CExtPopupMenuWnd::_HitTest(point) == IDX_TEAROFF )
{
if( ! bLButtonUpCall )
_DoTearOff();
return true;
}
if( ! bLButtonUpCall )
return false;
bool bEndSequence = false;
HWND hWndOwn = GetSafeHwnd();
ASSERT( hWndOwn != NULL && ::IsWindow(hWndOwn) );
int m_nColorIdxCurr = _ColorItemHitTest(point);
if( ( m_nColorIdxCurr >= 0
|| m_nColorIdxCurr == IDX_DEFAULT_COLOR_BTN
|| m_nColorIdxCurr == IDX_CUSTOM_COLOR_BTN
)
&& ( ! _FindCustomizeMode() )
)
{
bEndSequence = true;
_NotifyColorChanged( true );
g_SoundPlayer->PlaySound(
CExtSoundPlayer::__ON_MENU_CMD_CLICKED
);
}
if( ! ::IsWindow(hWndOwn) )
return true;
CPoint ptScreenClick( point );
ClientToScreen( &ptScreenClick );
HWND hWndFromPoint = ::WindowFromPoint( ptScreenClick );
if( hWndFromPoint != NULL
&& hWndFromPoint == m_pWndParentMenu->GetSafeHwnd()
)
{
m_pWndParentMenu->ScreenToClient( &ptScreenClick );
return
m_pWndParentMenu->_OnMouseClick(
nFlags,
ptScreenClick,
bNoEat
);
}
if( bEndSequence || ( ! bLButtonUpCall ) )
{
COLORREF clr = (COLORREF)__ECST_NONE;
switch( m_nColorIdxCurr )
{
case IDX_DEFAULT_COLOR_BTN:
clr = (COLORREF)__ECST_BUTTON_DEFAULT;
break;
case IDX_CUSTOM_COLOR_BTN:
clr = (COLORREF)__ECST_BUTTON_CUSTOM;
break;
default:
clr = _GetColorValue( m_nColorIdxCurr );
break;
}
_EndSequence( clr );
// _EndSequence( 0xFFFF );
}
return true;
}
Finally update the CExtGridCellColor::OnButtonPopupMenuTrack method and recompile the library.
bool CExtGridCellColor::OnButtonPopupMenuTrack(
CExtGridCell::TrackCellStateInfo_t & _tcsi
)
{
ASSERT_VALID( this );
ASSERT( (&_tcsi.m_cell) == this );
ASSERT_VALID( (&_tcsi.m_wndGrid) );
if( _tcsi.m_nButtonType != INT(__EBTT_DROPDOWN) )
return CExtGridCellEx::OnButtonPopupMenuTrack( _tcsi );
// move focus and selection to the cell
if( _tcsi.m_nColType == 0 && _tcsi.m_nRowType == 0 )
{
CPoint ptFocusOld = _tcsi.m_wndGrid.FocusGet();
CPoint ptFocusDesired( _tcsi.m_nColNo, _tcsi.m_nRowNo );
CRect rcSelectionOld = _tcsi.m_wndGrid.SelectionGet( false, -1 );
CRect rcSelectionDesired( _tcsi.m_nColNo, _tcsi.m_nRowNo, _tcsi.m_nColNo, _tcsi.m_nRowNo );
DWORD dwSiwStyles = _tcsi.m_wndGrid.SiwGetStyle();
if( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_FULL_ROWS )
{
LONG nColumnCount = _tcsi.m_wndGrid.ColumnCountGet();
rcSelectionDesired.SetRect( 0, _tcsi.m_nRowNo, nColumnCount - 1, _tcsi.m_nRowNo );
}
if( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_FULL_COLUMNS )
{
LONG nRowCount = _tcsi.m_wndGrid.RowCountGet();
rcSelectionDesired.SetRect( _tcsi.m_nColNo, 0, nRowCount - 1, _tcsi.m_nColNo );
}
if( ptFocusDesired != ptFocusOld
|| rcSelectionOld != rcSelectionDesired
)
{
if( ptFocusDesired != ptFocusOld )
_tcsi.m_wndGrid.FocusSet( ptFocusDesired, true, true, false, false );
if( rcSelectionOld != rcSelectionDesired )
_tcsi.m_wndGrid.SelectionSet( rcSelectionDesired, true, false, false );
_tcsi.m_wndGrid.OnSwDoRedraw();
}
}
_tcsi.m_wndGrid.InvalidateRect( &_tcsi.m_rcCellExtra );
_tcsi.m_wndGrid.OnSwUpdateWindow();
CExtPopupColorMenuWnd * pPopup = new CExtPopupColorMenuWnd;
if( ! pPopup->CreatePopupMenu( _tcsi.m_wndGrid.GetSafeHwnd() ) )
{
ASSERT( FALSE );
return true;
}
pPopup->m_bEnableBtnColorDefault = false;
if( m_bEnableButtonDefaultColor )
{
pPopup->m_bEnableBtnColorDefault = true;
pPopup->m_clrDefault = m_clrDefault;
if( m_sBtnTextColorDefault != _T("") )
pPopup->m_sBtnTextColorDefault = m_sBtnTextColorDefault;
}
if( m_bEnableButtonRandomColor )
{
pPopup->m_bEnableBtnColorDefault = true;
pPopup->m_clrDefault = COLORREF( -100L );
if( m_sBtnTextColorRandom != _T("") )
pPopup->m_sBtnTextColorDefault = m_sBtnTextColorRandom;
}
if( m_bEnableButtonCustomColor )
{
pPopup->m_bEnableBtnColorCustom = true;
if( m_sBtnTextColorCustom != _T("") )
pPopup->m_sBtnTextColorCustom = m_sBtnTextColorCustom;
}
pPopup->m_clrInitial = (GetColor()&(~0xFF000000));
CRect wr( _tcsi.m_rcCell );
_tcsi.m_wndGrid.ClientToScreen( &wr );
CPoint ptTrack( wr.BottomRight() );
ptTrack.x +=
pPopup->OnQueryMenuShadowSize();
CRect rcExclude( ptTrack, ptTrack );
COLORREF clrValueFinal = COLORREF( CExtPopupColorMenuWnd::__ECST_NONE );
pPopup->m_pClrValueFinal = &clrValueFinal;
HWND hWndGrid = _tcsi.m_wndGrid.m_hWnd;
g_pCellMenuTracking = this;
UINT nResultCmdID = 0;
if( ! pPopup->TrackPopupMenu(
TPMX_RIGHTALIGN | TPMX_COMBINE_NONE | TPMX_DO_MESSAGE_LOOP,
ptTrack.x,
ptTrack.y,
&rcExclude,
this,
NULL,
&nResultCmdID,
true
)
)
{
g_pCellMenuTracking = NULL;
delete pPopup;
ASSERT( FALSE );
return true;
}
if( ! ::IsWindow( hWndGrid ) )
return true;
if( g_pCellMenuTracking == this )
g_pCellMenuTracking = NULL;
else if( g_pCellMenuTracking == NULL )
return true;
if( nResultCmdID == 0 )
return true;
if( nResultCmdID == CExtPopupColorMenuWnd::__ECST_BUTTON_DEFAULT )
{
SetColor( m_clrDefault, false );
}
else if( nResultCmdID == CExtPopupColorMenuWnd::__ECST_BUTTON_CUSTOM )
{
clrValueFinal = (GetColor()&(~0xFF000000));
#if (!defined __EXT_PROFUIS_STATIC_LINK || defined __EXT_PROFUIS_STATIC_LINK_WITH_RESOURCES)
CExtLocalResourceHelper _LRH;
CExtColorDlg dlg( clrValueFinal, clrValueFinal, &_tcsi.m_wndGrid );
if( dlg.DoModal() != IDOK )
return true;
clrValueFinal = dlg.m_clrNew;
#else
CColorDialog dlg( clrValueFinal, CC_FULLOPEN, &_tcsi.m_wndGrid );
if( dlg.DoModal() != IDOK )
return true;
clrValueFinal = dlg.m_cc.rgbResult;
#endif // #if (!defined __EXT_PROFUIS_STATIC_LINK || defined __EXT_PROFUIS_STATIC_LINK_WITH_RESOURCES)
SetColor( clrValueFinal, false );
}
else if( clrValueFinal == COLORREF( -100L ) )
{
SetRandomizedColor( 32, 244, 32, 244, 32, 244 );
}
else
SetColor( clrValueFinal, false );
_tcsi.m_wndGrid.InvalidateRect( &_tcsi.m_rcCellExtra );
_tcsi.m_wndGrid.OnGridCellInputComplete(
*this,
_tcsi.m_nColNo,
_tcsi.m_nRowNo,
_tcsi.m_nColType,
_tcsi.m_nRowType
);
return OnButtonPopupMenuComplete( _tcsi );
} That should fix the problem.
|
|
Wesley Garrard
|
Jan 8, 2007 - 3:28 PM
|
I get a Link error using Application Wizard and then trying to build (Debug):
fatal error LNK1104: cannot open file ’ProfUIS263md.lib’
Of course it is an error because it does not exist, but how do I create it?
Thanks, Wes Garrard
|
|
Wes Aday
|
Jan 8, 2007 - 4:10 PM
|
You have to build the libraries. From the "Getting started with Prof-UIS guide": "1. Setting Paths and Compiling
After completing the installation, you need to set up the required paths. This can be done either with the Prof-UIS Integration Wizard, or manually. The first way is simple and straightforward: Just select the check box Set Prof-UIS paths in Microsoft Visual Studio Environment Variables and click on the Next button. The second is described below.
Select Options from the Tools menu. Open Directories tab in Visual Studio 6 or open the Projects folder and, then, select Visual C++ in Visual Studio 7.0/7.1/8.0. In the Show directories for drop-down list, specify file types and corresponding paths according to the following table: File types Paths Visual Studio Include files .../Prof-UIS/Include 6.0, 7.0, 7.1, 8.0 .../Prof-UIS/Src Source files .../Prof-UIS/Include .../Prof-UIS/Src Library files .../Prof-UIS/Bin_600 6.0 .../Prof-UIS/Bin_700 7.0 .../Prof-UIS/Bin_710 7.1 .../Prof-UIS/Bin_800 8.0
Use the Prof-UIS Integration Wizard or Visual Studio’s Batch build (or Configuration manager) to compile Prof-UIS and its samples to any of the available build configurations. Prof-UIS samples serve on one hand as an example of how your application may look, and on the other, they should help you implement library’s features in your products."
|
|
Wesley Garrard
|
Jan 8, 2007 - 4:09 PM
|
Sorry, I found it. I failed to compile ProfUISDLL for MBCS Debug (and Release).
That does however bring up a question. Does the ProfUIS App Wizard allow for changing this to for instance ANSI or Unicode and if not how is this changed manually, say for instance to ANSI.
Thanks, Wes Garrard
|
|
Suhai Gyorgy
|
Jan 9, 2007 - 2:18 AM
|
Neither Prof-UIS, nor MFC Application Wizard allows you to change the character set, but you can change it manually afterward. In Project menu find the Project Properties menu entry (appearing as "your project name" Properties...). In VS2003 you can find the Character Set property under General category. Under VS2005 it is Configuration Properties -> General -> Project Defaults -> Character Set. There you can switch to ANSI. Just take care to change it both for Debug and Release configuration. You can find out more about Prof-UIS configurations in this article.
|
|
Paul Cowan
|
Jan 8, 2007 - 1:24 PM
|
I’m trying to build a static lib with DLL MFC and no resources. I’m doing a "Static MBCS Debug with MFC DLL" build. If I remove the #define __EXT_PROFUIS_STATIC_LINK_WITH_RESOURCES line from Prof-UIS.h, I get a lot of compile errors including
error C2504: ’CExtHookSink’ : base class undefined
How do I build a static lib without resources?
|
|
Suhai Gyorgy
|
Jan 9, 2007 - 2:31 AM
|
Quote from this Prof-UIS FAQs: "As you know, static libraries typically do not contain any resources inside. That means, if you use Prof-UIS as a static library, you cannot use any resource-dependent features like customization, color selection and icon editor dialogs, localization, and etc." There they tell about how to include resources for statically linked library. I can think of only one way you could compile statically linked library without resources: Remove all features that require resources. Another FAQ tells you how to exclude some features: How to reduce the size of the Prof-UIS dll that I use in my project? Unfortunately I don’t know which features require resources and which do not. Maybe you can’t exclude all resources if you use any feature that requires them. But that FAQ helps you reduce the size as much as possible.
|
|
Andrew Banks
|
Jan 8, 2007 - 1:14 PM
|
SetTooltipText(int nId, BOOL bActivate = TRUE); Works with toolbar buttons. No such function that I can see in CExtCustomizeCmdTreeNode. In addition, the OnHover for Ribbon Buttons does not display any tool tip from the string table associated with the command id.
Is there one and I just can’t see it?
|
|
Sergiy Lavrynenko
|
Jan 9, 2007 - 6:18 AM
|
Dear Andrew,
The CExtRibbonBar /CExtRibbonPage controls are able to display classic toolbar tooltips like the CExtToolControlBar window does. But these tips are not very consistent with the ribbon’s design. The super tooltip windows with caption, description paragraph, bitmap, bottom paragraph (typically displaying the Press F1 for help text) is to be appear at the end of January/begin of February. If you need toolbar like tips right now, then you should initialize them in the command manager after the command tree was assigned to the CExtRibbonBar or CExtRibbonPage control:
UINT nCommandID = ID_SOME_ITEM_IN_THE_RIBBON_BAR;
CExtRibbonBar * pRibbonBar = ... // or CExtRibbonPage
ASSERT( pRibbonBar->GetSafeHwnd() != NULL );
LPCTSTR strCommandProfileName = g_CmdManager->ProfileNameFromWnd( pRibbonBar->m_hWnd );
ASSERT( strCommandProfileName != NULL && INT(_tcslen(strCommandProfileName)) > 0 );
CExtCmdItem * pCmdItem = g_CmdManager->CmdGetPtr( strCommandProfileName, nCommandID );
ASSERT( pCmdItem != NULL );
pCmdItem->m_strTipTool = _T("Tooltip text to be displayed in the popup tip window");
|
|
Andrew Banks
|
Jan 9, 2007 - 10:52 AM
|
This work well thanks
CExtCmdItem * CMyRibbonBar::RibbonCmdIDtoCmdItem( UINT command_id ) { CExtCmdItem * pCmdItem = g_CmdManager->CmdGetPtr( g_CmdManager->ProfileNameFromWnd( m_hWnd ), command_id ) ; return( pCmdItem ) ; }
void CMyRibbonBar::SetToolTips() { INT nIndex, nCount = GetButtonsCount(); for( nIndex = 0; nIndex < nCount; nIndex ++ ) { CExtBarButton * pTBB = GetButton( nIndex ); ASSERT_VALID( pTBB );
if ( pTBB->IsSeparator() ) continue;
UINT command_id = pTBB->GetCmdID( false ) ; CExtCmdItem * pCI = RibbonCmdIDtoCmdItem( command_id) ; if ( pCI != NULL ) pCI->m_sTipTool.LoadString(command_id) ;
} // for( nIndex = 0; nIndex < nCount; nIndex ++ ) }
|
|
Andrew Banks
|
Jan 9, 2007 - 6:25 PM
|
CExtPopupMenuWnd::_OnMouseClick
Found a place to get the screen coords of the menu item Changed your source only a little.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 6:14 AM
|
Dear Andrew,
Changing Prof-UIS code will bring inconvenience with each new Prof-UIS release. I think it should not be a problem to discuss any Prof-UIS modifications and put them into the library as you did or implement them in your classes which should be derived from Prof-UIS classes in scope of your project(s).
|
|
Andrew Banks
|
Jan 11, 2007 - 7:19 AM
|
OK, there is no standard mechanism to connect CRibbon tree nodes and GUI for the file menu entries. The file menu componants, do not appear in the iterative process using GetButton. Nor, are they child windows so I can’t use EnumChildWindows. Finally, there is no virtual function to get access.
However, I have full access to the "recent file menu entries".
If you could provide something like that, it would be great. My change was a stupid PostMessage with a function code of 50000 containing the screen coords of the point. I wasn’t trying to write something for general consumption and it was only 5 lines of code, took less than 1/2 hour once I knew the right place in your code.
For now, I have methods to handle your software updates. Thanks
|
|
Andrew Banks
|
Jan 8, 2007 - 12:44 PM
|
I can’t tell from the documentation, not that there is any, on how I can use CExtRibbonNodeDialogLauncher. I add it to a group on my ribbonbar and get a small arrow at the bottom of the group that I can click, but that is as far as I can get. Thanks
|
|
Sergiy Lavrynenko
|
Jan 9, 2007 - 4:51 AM
|
Dear Andrew,
The small dialog launcher buttons inside ribbon groups captions are working absolutely like simple toolbar command buttons. You can handle their clicks by adding the ON_COMMAND entries into the main frame’s message map and update their state by adding the ON_UPDATE_COMMAND_UI entries. Typlically each ribbon group contains a set of command buttons and/or input controls which are related to one particular task in your application. If all the items inside one ribbon group does not cover all possible/required task commands and properties, then you need to add the dialog launcher button into the ribbon group. The dialog launcher buttons were designed to invoke popup dialogs describing complete set of available task’s properties. You should not use the dialog launcher buttons in the ribbon groups where all the ribbon group items completely cover all the task requirements.
|
|
Andrew Banks
|
Jan 8, 2007 - 12:16 PM
|
The file menu has a set of menu entries to the left for file open, new etc.
When one of these menu entries is clicked, how can I get the screen coords of the clicked menu entry OnMouseClick
|
|
Sergiy Lavrynenko
|
Jan 9, 2007 - 6:05 AM
|
Dear Andrew,
The ribbon file menu is the UI item provided by the ribbon file button which is a kind of the ribbon gallery button. The ribbon gallery button displays the ribbon gallery popup menu which contains gallery control and/or a set of menu items. Simple ribbon gallery buttons are displaying ribbon gallery popup menu with the gallery control at the top and a set of menu items at the bottom. The ribbon file button is displaying the ribbon file popup menu with the gallery control at the right (typically displays recently used documents/files) and a set of menu items at the left (typically a set of classic file/print commands). Currently there are no virtual methods in the CExtRibbonPage /CExtRibbonBar classes for catching the mouse click position on the gallery control. The gallery control was designed to display a set of selectable checked/unchecked items wich are typically not similar to toolbar command buttons/menu command items. Could you explain why you need the mouse click location on the gallery control and how are you going to use it?
|
|
Andrew Banks
|
Jan 9, 2007 - 10:26 AM
|
I am associating a dialog with file save as, file open, file new. Currently, I display these in the center of the app. However, to remain consistant with the RibbonBar I implemented, I would like the dialog just to the right of the menu entry.
On the top buttons, I use in the OnCommand handler GetButtonRect(CommandToIndex( command_id ), lpRect ) ; Map lprect to coords relative to the ribbon bar for screen coords. Use lprect and SetWindowPos on the dialog to drop it just below the Ribbon button to function as a multi data input menu instead of single data input menus. It works fine.
Similarly, I want to drop a dialog just to the right of the file menu entry. It help maintain user context.
If you could tell me where the function and source file is where the click occurs, I will figure a way around it or change the source code myself.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 3:56 AM
|
Dear Andrew,
Prof-UIS toolbars and menus are supporting the hover/selection notifications and you can see how this works in the HelpNotes sample application. So, you can catch the location of the File | Open, File | Save, File | Save As, File | Print and all the other menu items/toolbar buttons in screen coordinates. The menu item provides selection notification independently from the submenu nesting level. You should analyze the command identifier of the menu item to came to any conlusions about which window should be displayed near it. Is that what you need?
|
|
Offer Har
|
Jan 8, 2007 - 11:26 AM
|
Dear Support.
I have a docking bar, which can be floating.
The user can open the bar and close it (normal behaviour) Each time the bar is re-opened, it can show a different dialog, so i destroy the previous dialog in the bar, and create a new child dialog whose parent is the bar. Each time the bar is re-opened, i reset the size of the bar using the normal code:
pBar->SetInitDesiredSizeFloating(CSize(300,300)); pBar->SetInitDesiredPosFloating(CPoint(100,100)); pBar->FloatControlBar(CPoint(100,100)); CFrameWnd* pFrame = pBar->GetParentFrame(); pFrame->RecalcLayout(); pFrame->SendMessage(WM_NCPAINT);
This does not work. The bar is moved to (100,100), but does not resize itself to (300,300)
Please fix.
Thanks, Ron.
|
|
Sergiy Lavrynenko
|
Jan 9, 2007 - 5:04 AM
|
Dear Ron,
You can try to repeat the problem in the ChangeFloatingSize test project and send it to technical support.
|
|
Offer Har
|
Jan 10, 2007 - 2:44 PM
|
Dear Support,
I Sent you yesterday a project repeating the bug. Did you receive my mail? Were you able to run the program? Were you able to re-produce th bug?
Please let me know.
Regards, Ron.
|
|
Offer Har
|
Jan 16, 2007 - 3:12 PM
|
Dear Support,
Another week gone by i got no reply. Is there anby chance that i will ever get any comment regarding this bug?
Regards, Ron.
|
|
Offer Har
|
Jan 9, 2007 - 10:44 AM
|
Dear SUpport & Sergiv,
I am sending you via mail an updated ChangeFloatingSize project where the bug is re-produced. Please note that the problem starts to happen when you close the bar (from the ’X’ button) and I call
ShowControlBar(&m_wndResizableBar, TRUE, FALSE); To re-open it.
Please try to fix this bug ASAP
Best Regards, Ron.
|
|
Juri Tsjornoi
|
Jan 6, 2007 - 2:08 PM
|
Could you tell me please how to remove caption from CControlBar?
|
|
Technical Support
|
Jan 7, 2007 - 10:07 AM
|
Just do not specify the CBRS_GRIPPER style when creating the control bar or remove this style after the bar was created.
|
|
Ashley Gullen
|
Jan 6, 2007 - 9:35 AM
|
I want to perform a custom action when a hyperlink property is clicked. I don’t want a web browser to open or anything, just opening a messagebox or similar. I’ve tried overriding all four OnHyperLinkOpenXXX functions, but none of them are ever called. What is the proper way to do this?
|
|
Ashley Gullen
|
Jan 8, 2007 - 9:34 AM
|
Thanks a lot for your help, the OnHyperLinkOpen function is called correctly now. However, I’m having difficulty adding member variables. After some testing I added an integer member to the "Ex" class constructed to "5555", but immediately after creation assigned to "7777". I set a breakpoint in OnHyperLinkOpen and the integer has returned to its constructed value of 5555. Is the class being reconstructed by MFC/Prof-UIS, and if so, is this by design?
|
|
Technical Support
|
Jan 9, 2007 - 6:17 AM
|
Each CExtPropertyValue instance keeps two CExtGridCell objects: the active one and the initial one. The later is used for the reset operation. These objects never appear inside tree grids in the property grid control and are stored inside CExtPropertyValue only. Each tree grid window in the property grid control contains cloned copies of active grid cells in property values. That is why you have different cell copies. When the editing is complete in some tree grid window, the property grid control assigns a new cell value to the active cell in the property value and to the all cells of this property value in other tree grid windows. If you have a combined property store, each property value is a reference to several simple property values and the result of editing is assigned to all the referenced property values. So, if you use a custome grid cell class which contains its specific data members, then it is important to override the CExtGridCell::Assign() virtual method like as follows: void CYourCell::Assign( const CExtGridCell & other )
{
ASSERT_VALID( this );
CBaseCell::Assign( other );
CYourCell * pCell =
DYNAMIC_DOWNCAST(
CYourCell,
( const_cast < CExtGridCell * > ( &other ) )
);
if( pCell != NULL )
{
// assign all the specific data members
} // if( pCell != NULL )
else
{
// clear all the specific data members
} // else if( pCell != NULL )
}
|
|
Suhai Gyorgy
|
Jan 9, 2007 - 3:19 AM
|
I don’t know the real solution, but can point out some aspects of PropertyGrid that could help you find the problem: For every property you see appearing in the grid there are 3 CExtGridCell objects you have to keep in mind: - one of them is inside the grid, that is the one users can see. - there are 2 other cells, these are the ones you get when you call PropertyItem’s ValueActiveGet() and ValueDefaultGet(). When the grid first appears it initializes its cell from the default cell of the corresponding propertyitem. When the user changes something in the cell the grid calls Assign, which is used to copy the new value to the propertyitem’s active cell. When user right-clicks cell and chooses Reset from the context menu, the grid copies content of propertyitem’s default cell into the cell appearing in the grid. I think it is impossible that some Prof-UIS code changes the value of your member variable. I’m guessing you have some code that changes the member variable to 7777, but you are not aware that and how this code is called. And you should keep in mind that OnHyperLinkOpen is called for the cell appearing in the grid, not for the propertyitem’s active cell. You should tell some more about your classes to find out the real problem. Or try reproducing the problem in a sample application or in any of Prof-UIS samples.
|
|
Ashley Gullen
|
Jan 7, 2007 - 10:38 AM
|
Hi,
Here’s the class I am using to override:
// Overridden OnHyperlinkOpen class CExtGridCellHyperLinkEx : public CExtGridCellHyperLink { public: virtual bool OnHyperLinkOpen( __EXT_MFC_SAFE_LPCTSTR strURL, e_OpenMode_t eOM = __EOM_OPEN, bool bAllowErrorAlert = false ) const { MessageBox(NULL, "Link click", NULL, NULL); return false; } };
I simply replace the standard class with this "Ex" class in the creation, like so:
CExtGridCellHyperLinkEx* pLink = STATIC_DOWNCAST(CExtGridCellHyperLinkEx, pItem->ValueDefaultGetByRTC(RUNTIME_CLASS(CExtGridCellHyperLinkEx)));
The grid cell contains a hyperlink control, but when clicked, it still opens a browser and tries to visit a website. What am I missing?
|
|
Suhai Gyorgy
|
Jan 8, 2007 - 2:29 AM
|
In SimpleGrids sample you can see that overriding a CExtGridCell-derived class is a little more tricky than overriding a usual class. Here are the code-snippets you have to put in your project (I checked it in PageGrid class of ProfUIS_Controls sample). In .h: class CExtGridCellHyperLinkEx : public CExtGridCellHyperLink
{
DECLARE_DYNCREATE(CExtGridCellHyperLinkEx);
IMPLEMENT_ExtGridCell_Clone( CExtGridCellHyperLinkEx, CExtGridCellHyperLink );
CExtGridCellHyperLinkEx(
CExtGridDataProvider * pDP = NULL
);
public:
virtual bool OnHyperLinkOpen(
__EXT_MFC_SAFE_LPCTSTR strURL,
e_OpenMode_t eOM = __EOM_OPEN,
bool bAllowErrorAlert = false
) const
{
TRACE0("My HyperLinkOpen called");
return true;
}
};
In .cpp: ...
#include ".\pagegrid.h"
// moved to top (i.e. before DEBUG_NEW) to avoid
// conflict with MFC’s operator new
IMPLEMENT_DYNCREATE(CExtGridCellHyperLinkEx, CExtGridCellHyperLink);
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
...
And then I used STATIC_DOWNCAST when initializing cells. With this code you can see the message "My HyperLinkOpen called" in the Output window of the VS when the cell is clicked. In the overriden OnHyperLinkOpen make sure you return true;, because this method is called in CExtGridCellHyperLink::OnClick like this: VERIFY( OnHyperLinkOpen( LPCTSTR(strURL) ) ); So debug version of your project would throw an assert if you returned false. Although I tried using the cell inside a CExtGridWnd, not a PropertyGrid, the usage must be the same.
|
|
Suhai Gyorgy
|
Jan 8, 2007 - 3:58 AM
|
Sorry, I forgot to paste constructor for the class (this goes in .cpp): CExtGridCellHyperLinkEx::CExtGridCellHyperLinkEx(
CExtGridDataProvider * pDP // = NULL
)
: CExtGridCellHyperLink( pDP )
{
}
|
|
Technical Support
|
Jan 7, 2007 - 10:06 AM
|
You can override only the CExtGridCellHyperLink::OnHyperLinkOpen() virtual method. All the other methods are invoked from this method. We cannot yet confirm that this method is not called. Please check the signature of yours and the base method. They should be equal.
|
|
Ashley Gullen
|
Jan 6, 2007 - 7:44 AM
|
I’m using a CExtGridCellCurrency to display percentages. I set it up like so:
pCurrency->SetNumDigits(6); pCurrency->SetCurrencySymbol("%"); pCurrency->SetPositiveOrder(1); pCurrency->SetNegativeOrder(5);
This means a value of 50.5 shows up as "50.500000%", and 100 shows up "100.000000%". Is there any way to remove the trailing zeroes? I would like 50.5 to show up as "50.5%", and 100 to show up as "100%".
|
|
Technical Support
|
Jan 7, 2007 - 10:02 AM
|
We have just added the SetAllowTrailingZeroes() and GetAllowTrailingZeroes() methods to the CExtGridCellNumber and CExtGridCellCurrency classes, with which you can allow or suppress the trailing zeroes. Until the next version you can temporarily change the CExtGridCellCurrency::TextGet() method in this way: void CExtGridCellCurrency::TextGet( CExtSafeString & strCopy ) const
{
ASSERT_VALID( this );
if( (GetStyleEx()&__EGCS_EX_UNDEFINED_ROLE) != 0
|| IsEmpty()
)
{
strCopy = _T("");
return;
}
strCopy.Empty();
VARIANT varCopy;
::VariantInit( &varCopy );
HRESULT hr =
::VariantCopy(
&varCopy,
LPVARIANT( LPCVARIANT( this ) )
);
if( FAILED(hr)
|| (!OnTextGetPrepareVariant( &varCopy ))
)
{
ASSERT( FALSE );
return;
}
CExtSafeString sNumberText;
bool bRet = OnQueryNumberText( &varCopy, sNumberText );
::VariantClear( &varCopy );
if( !bRet )
return;
UINT nNumDigits = OnQueryNumDigits();
// if( ! OnQueryTrailingZeroes() )
{
INT nPosPoint = sNumberText.ReverseFind( _T(’.’) );
UINT nNumDigitsReal = 0;
if( nPosPoint >= 0 )
nNumDigitsReal = min( sNumberText.GetLength() - 1 - nPosPoint, 9 );
if( nNumDigitsReal < nNumDigits )
nNumDigits = nNumDigitsReal;
}
CURRENCYFMT fmt;
memset( &fmt, 0, sizeof(CURRENCYFMT) );
fmt.NumDigits = nNumDigits;
fmt.LeadingZero = OnQueryLeadingZero();
fmt.NegativeOrder = OnQueryNegativeOrder();
fmt.PositiveOrder = OnQueryPositiveOrder();
CExtSafeString sGrouping;
OnQueryGrouping( sGrouping );
sGrouping.Remove( _T(’;’) );
sGrouping.TrimRight( _T(’0’) );
fmt.Grouping = _ttoi( sGrouping );
CExtSafeString sDecimalSep;
OnQueryDecimalSeparator( sDecimalSep );
fmt.lpDecimalSep = sDecimalSep.GetBuffer( sDecimalSep.GetLength() );
sDecimalSep.ReleaseBuffer();
CExtSafeString sThousandSep;
OnQueryThousandSeparator( sThousandSep );
fmt.lpThousandSep = sThousandSep.GetBuffer( sThousandSep.GetLength() );
sThousandSep.ReleaseBuffer();
CExtSafeString sCurrencySymbol;
OnQueryCurrencySymbol( sCurrencySymbol );
fmt.lpCurrencySymbol = sCurrencySymbol.GetBuffer( sCurrencySymbol.GetLength() );
sCurrencySymbol.ReleaseBuffer();
VERIFY(
g_ResourceManager->GetCurrencyFormat(
0,
sNumberText,
&fmt,
strCopy.GetBuffer( 100 ),
100
) != 0
);
strCopy.ReleaseBuffer();
}
|
|
Offer Har
|
Jan 5, 2007 - 9:10 PM
|
Dear Support,
How can i add icons to my popup menus? The commands in the popup menus do not appear in the main-frame menu.
Thanks, Ron.
|
|
Technical Support
|
Jan 6, 2007 - 7:18 AM
|
You should create an additional toolbar resource with the commands that you are going to use in the menu. Then update the command manager with this toolbar using g_CmdManager->UpdateFromToolBar() method. This should be enough to make the icons appear in the command manager.
|
|
Offer Har
|
Jan 8, 2007 - 6:37 AM
|
|
|
Juri Tsjornoi
|
Jan 5, 2007 - 4:45 PM
|
How to remove the close button from the CExtControlBar caption?
|
|
Technical Support
|
Jan 6, 2007 - 4:59 AM
|
|
|
Juri Tsjornoi
|
Jan 5, 2007 - 2:43 PM
|
How to save UI theme state so the last used theme is restored after app restart?
|
|
Technical Support
|
Jan 6, 2007 - 5:23 AM
|
We have recently added three methods to the CExtPaintManager::CExtPaintManagerAutoPtr class to make the application theme persistent: PaintManagerStateLoad()
PaintManagerStateSave()
PaintManagerStateSerialize() You can download the latest code (v.2.63.2) from the download page and see how these methods are used in our samples.
|
|
Offer Har
|
Jan 5, 2007 - 11:02 AM
|
Dear Support,
We have several legacy controls that are CListCtrl derived. Is there any simple whay to make these controls conform with the themes of Prof-UIS? If not, how do you suggest to handle this problem? at least replacing the title bar of report-style CListCtrl.
Thanks, Ron.
|
|
Technical Support
|
Jan 6, 2007 - 5:53 AM
|
Unfortunately there is no enhanced version of the CListCtrl class in Prof-UIS. We would recommend you either use CExtGridWnd or CExtReportGridWnd , which are much more feature rich than CListCtrl .
|
|
Offer Har
|
Jan 5, 2007 - 10:44 AM
|
Hi,
I am using g_PaintManager->m_FontBold to get the deafult bold font. when using CExtPaintManagerOffice2007_R3_Obsidian , i assumed it will return me a white bold font, but i get a black bold font.
How can i get a while bold font?
Thanks, Ron.
|
|
Technical Support
|
Jan 5, 2007 - 11:47 AM
|
The g_PaintManager->m_FontBold is just a font. When drawing text you can specify a color using the CDC::SetTextColor() method.
There is a CExtPaintManager::QueryObjectTextColor() method that can be useful if you want the color compatible with the current theme.
|
|
Offer Har
|
Jan 5, 2007 - 3:35 PM
|
I have added this to my code:
m_clrText = PmBridge_GetPM()->QueryObjectTextColor( dcFake, true, false, false, false, (CObject*)this );
And i get -1.
I stepped in, and this is where i got:
COLORREF CExtPaintManager::QueryObjectTextColor( CDC & dc, bool bEnabled, bool bFocused, bool bHovered, bool bPressed, CObject * pHelperSrc, LPARAM lParam // = 0L ) { ASSERT_VALID( this ); dc; bEnabled; bFocused; bHovered; bPressed; pHelperSrc; lParam; return COLORREF(-1L); }
What is the problem? What am i missing?
Thanks, Ron.
|
|
Technical Support
|
Jan 6, 2007 - 5:11 AM
|
Actually the QueryObjectTextColor() method is used only in the paint manager that produces the Obsidian (Black) theme so you need to analyze the returned color. If it is COLORREF(-1L) , you should specify the color yourself: m_clrText =
PmBridge_GetPM()->QueryObjectTextColor(
dcFake,
bEnabled,
false,
false,
false,
(CObject*)this
);
if( m_clrText == COLORREF(-1L) )
m_clrText =
bEnabled
? PmBridge_GetPM()->GetColor( COLOR_WINDOWTEXT )
: PmBridge_GetPM()->GetColor( COLOR_3DSHADOW ); We are sorry for being inaccurate in the previous reply.
|
|
Offer Har
|
Jan 8, 2007 - 6:37 AM
|
|
|
Offer Har
|
Jan 5, 2007 - 10:05 AM
|
Hi,
I have a CWnd* Derived control inside a CExtResizableDialog dialog . I haev added this code to the drawing of the control as suggested by you before:
bool bTransparent = false;
if(! bTransparent && PmBridge_GetPM()->GetCb2DbTransparentMode(this)) { CExtPaintManager::stat_ExcludeChildAreas( *pDC, GetSafeHwnd(), CExtPaintManager::stat_DefExcludeChildAreaCallback );
if(PmBridge_GetPM()->PaintDockerBkgnd(true, *pDC, this)) { bTransparent = true; } }
if (! bTransparent) { pDC->FillSolidRect( &rc, PmBridge_GetPM()->GetColor(CExtPaintManager::CLR_3DFACE_OUT, this));
}
The problem is that this control appears 4 times in the dialog (and there are some other standard controls as well...), and what happens is that all controls in the dialog are not displayed, only the last control is displayed.
I think that what happens is that this piece of code draws the whole dialog with the background color, and that’s why none of the controls is shown.
I can see that when i resize the dialog, the controls appear for a short time (flicker), and dissapear again.
How can i make sure that the control repaints only its region and not the whole dialog?
Thanks.
|
|
Technical Support
|
Jan 5, 2007 - 10:42 AM
|
Please try the following code and let us know if the problem persists: CRect rcClient;
GetClientRect( &rcClient );
if( rcClient.IsRectEmpty() )
return;
CPaintDC dcPaint( this );
CExtMemoryDC dc(
&dcPaint,
&rcClient
);
CRgn rgnClient;
if( rgnClient.CreateRectRgnIndirect( &rcClient ) )
dc.SelectClipRgn( &rgnClient );
// ...
// ...
// PLACE YOUR PAINTING CODE HERE
// ...
// ...
if( rgnClient.GetSafeHandle() != NULL )
dc.SelectClipRgn( &rgnClient );
|
|
Offer Har
|
Jan 5, 2007 - 11:07 AM
|
Thanks, Problem solved.
Just for understanding - you need to repaint the complete background of the dialog for each control? Isn’t there a performance penalty?
|
|
Technical Support
|
Jan 6, 2007 - 6:05 AM
|
If you have a large number of controls (e.g. 50), you will certainly face some performance issues. But there is no other way to draw a solid gradient background. On the other hand, lots of controls on a dialog cannot be considered as a user-friendly design. For example, you could divide controls into lesser groups and smaller dialogs, tabs and etc. Another good solution could be a property grid control.
|
|
Offer Har
|
Jan 8, 2007 - 6:39 AM
|
Does the large number apply to ALL controls, including CExtLabel, CExtEdit etc.? If I don’t use theme with gradient background, does it still carry the same pennalty?
|
|
Technical Support
|
Jan 9, 2007 - 12:34 PM
|
This is applicable to all controls which need a gradient dialog background. Actually a custom background in painted in all themes. For some themes it is a gradient fill, for other ones it is a solid color fill (painted with FillSolidRect() method).
|
|
Seth Strong
|
Jan 5, 2007 - 8:12 AM
|
I have a program with the following glitch. In the glitch I have a View for an SDI, and a controlbar with a dialog.
When a controlbar is going into hiding (it is pinned and the mouse is moved away), if I move my mouse back over the control bar, the dialog components, buttons, labels, et cetera, become visible but the dialog does not. It is as if, the dialog itself is being clipped by the view but the dialog components don’t know that. The biggest problem with that is that the controlbar is not hidden, the borders are now invisible so the user cannot quickly see what to do to make it go away, and there are orphaned buttons floating over the view.
Can you help me by giving me an idea of where to troubleshoot this problem? My impression is that I am overlooking a relationship between your controlbar and the client region of the view.
Thanks, Seth
|
|
Seth Strong
|
Jan 5, 2007 - 8:32 AM
|
An additional symptom is that when a controlbar is going to hide it disappears, and then as it is sliding away it reappears so it looks like a stutter.
|
|
Seth Strong
|
Jan 5, 2007 - 9:40 AM
|
Problem solved. I forgot the add the clip siblings style to the view.
|