|
Subject |
Author |
Date |
|
|
Bart Kampers
|
Mar 25, 2010 - 9:39 AM
|
Hello, I inserted a CExtGridCellSlider in a CExtGridWnd. When this cell is not editing it shows a value in stead of the slider. Can I make this cell show the slider always? Kind regards, Bart.
|
|
|
Technical Support
|
Mar 25, 2010 - 2:33 PM
|
Please use the CExtGridCellInplaceSlider in-place slider grid cell class.
|
|
|
mohamed abdou
|
Mar 25, 2010 - 6:32 AM
|
Hello there, it is a simple question i need to buy a Prof-UIS One User License with 90 Days Technical does that mean that i can’t use it after 90 days or just i can’t benefit from the technical services? thanks...
|
|
|
Technical Support
|
Mar 25, 2010 - 8:00 AM
|
Thank you for your interest in Prof-UIS. When you buy a license, you are granted the right to use the software forever. The supported period in any item’s name (e.g. 90 Days Technical Support) means the following:
- You can get any new versions and updates during the supported period for free. - You can post your questions to the technical support forum or to the support mailbox and get priority support from the tech support team.
|
|
|
park ki tae
|
Mar 25, 2010 - 1:01 AM
|
first all i’m sorry i’m not good at english. i have a problem using CExtTabMdiWhidbeyWnd . when i created child view in UI Thread, no ploblem but when i created child view in Multi Thread, it occur problem. attach homepage address including screen captrue jpg file. i can’t find the reason why this problem occur. http://blog.naver.com/nowan4ever/memo/30083138264
|
|
|
Technical Support
|
Mar 31, 2010 - 8:24 AM
|
Please try implementing the following in your multithreaded project:
- If the worker thread changes the MDI child frame widow title or its document title, then it should send some (WM_USER+123) message to the main frame window.
- The main frame window should handle the (WM_USER+123) message. The message handler should invoke the CExtTabWnd::UpdateTabWnd() method of the Whidbey MDI tabs control.
We believe this solution will provide the MDI tab items with the correct size and layout.
|
|
|
park ki tae
|
Mar 30, 2010 - 2:31 AM
|
Thank for your answer. I Watch out the OnTabWndQueryItemText() Function. But Thereis no differencem, pActiveDoc->GetTitle() returns same value. So I follow the function step by step... i found the difference in " void CExtTabWhidbeyWnd::stat_OnTabWndDrawItemWhidbeyImpl()" Function. The rcEntireItem Parameter Value is different. rcEntireItem value In UI Thread Is " {top=6 bottom=21 left=13 right=126} "
rcEntireItem value In WorkThread Is " {top=3 bottom=20 left=1 right=25}" The rcEntireItem Recr’s width is 5. So it is not enough to short drawing The Document Title Text In WorkThread.
|
|
|
Technical Support
|
Mar 25, 2010 - 7:53 AM
|
The CExtTMWI::OnTabWndQueryItemText() virtual method provides MDI tab items with text strings. It can use the CDocument::GetTitle() API in the single threaded version of your application. It can use the CWnd::GetText() API in the multithreaded version of your application. It’s possible the document title and MDI child frame window text is different. You can setup breakpoint into the CExtTMWI::OnTabWndQueryItemText() method and debug it in both versions of your application to see the difference.
|
|
|
park ki tae
|
Mar 30, 2010 - 2:32 AM
|
Thank for your answer. I Watch out the OnTabWndQueryItemText() Function. But Thereis no differencem, pActiveDoc->GetTitle() returns same value. So I follow the function step by step... i found the difference in " void CExtTabWhidbeyWnd::stat_OnTabWndDrawItemWhidbeyImpl()" Function. The rcEntireItem Parameter Value is different. rcEntireItem value In UI Thread Is " {top=6 bottom=21 left=13 right=126} "
rcEntireItem value In WorkThread Is " {top=3 bottom=20 left=1 right=25}"
The rcEntireItem Recr’s width is 5. So it is not enough to short drawing The Document Title Text In WorkThread
|
|
|
se hui Park
|
Mar 22, 2010 - 12:10 AM
|
I’m trying to change the gripper color of floating docking bar.
When I override OnMsgUseCustomNcArea fuction, it can be changed in Docked state.
but in floating state It can not.
How can I change the color?
|
|
|
Technical Support
|
Mar 22, 2010 - 11:33 AM
|
Floating control bars are in fact implemented as CExtMiniDockFrameWnd palette windows control bars inside. The floating palette caption is really part of the CExtMiniDockFrameWnd window. So, first of all you should code your own CExtMiniDockFrameWnd-derived class. Here is the basic example of how to code it:
#include "../Src/ExtMiniDockFrameWnd.h"
class CMyFloatingMiniDockFrameWnd : public CExtMiniDockFrameWnd
{
public:
DECLARE_DYNCREATE( CMyFloatingMiniDockFrameWnd );
virtual void RenderNC( CDC & dc );
};
IMPLEMENT_DYNCREATE( CMyFloatingMiniDockFrameWnd, CExtMiniDockFrameWnd );
void CMyFloatingMiniDockFrameWnd::RenderNC( CDC & dc )
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
. . . . .
}
Your CMyFloatingMiniDockFrameWnd::RenderNC() virtual method implementation should have the source code simplar to the CExtMiniDockFrameWnd::RenderNC() method. But it should paint different caption background. Please take a look at the following part of the CExtMiniDockFrameWnd::RenderNC() method: CExtPaintManager::PAINTGRIPPERDATA _pgd(
pFlashingBar, // pSingleVisbleFlatingBar
rcCapt,
rcText,
bActive,
true,
false,
bExtBar,
sCaption.IsEmpty() ? LPCTSTR( NULL ) : sCaption,
( (g_ResourceManager->OnQueryLangLayout()&LAYOUT_RTL) != 0 ) ? true : false
);
bool bDrawDefaultCaption = true, bFlashCaptionHighlightedState = false;
if( pFlashingBar->FlashCaptionIsInProgress( &bFlashCaptionHighlightedState ) )
{
_pgd.m_bFlashCaptionHighlightedState = bFlashCaptionHighlightedState;
_pgd.m_clrFlashCaptionText = pFlashingBar->m_clrFlashCaptionText;
_pgd.m_clrFlashCaptionBackground = pFlashingBar->m_clrFlashCaptionBackground;
if( pFlashingBar->FlashCaption_DoPaintNC(
dc,
(LPVOID)(&_pgd)
)
)
bDrawDefaultCaption = false;
} // if( pFlashingBar->FlashCaptionIsInProgress( &bFlashCaptionHighlightedState ) )
if( bDrawDefaultCaption )
{
PmBridge_GetPM()->PaintGripper( dc, _pgd );
if( pExtBar != NULL )
pExtBar->NcButtons_Paint( dc );
} // if( bDrawDefaultCaption )
It performs custom background painting if the if( pFlashingBar->FlashCaptionIsInProgress( &bFlashCaptionHighlightedState ) ) condition is true. This is implementation of the window caption flashing feature. The second step is to make Prof-UIS using the CMyFloatingMiniDockFrameWnd windows instead of the CExtMiniDockFrameWnd windows. This can be done by invoking only one line of code before creating all the control bars in your main frame window: m_pFloatingFrameClass = RUNTIME_CLASS( CMyFloatingMiniDockFrameWnd );
Please note the CFrameWnd::m_pFloatingFrameClass property is protected and the line of code above should be invoked in the beginning of the CMainFrame::OnCreate() method.
|
|
|
Borremans Pierre
|
Mar 20, 2010 - 1:03 AM
|
In my application, I override a paintmanager and I want to change the text color for all profuis control (like cexedit, CExtLabel, cextradiobutton) without setting the color each time. Is it possible ?
|
|
|
Technical Support
|
Mar 20, 2010 - 11:18 AM
|
The CExtPaintManager::InitTranslatedColors() virtual method initializes colors which are used by Prof-UIS classes. This virtual method is implemented by all the paint manager classes. Particular paint managers define their own specific color constants. But some controls like CExtEdit use default windows colors and you should invoke the CExtEdit class methods to change its colors.
|
|
|
Mantra
|
Mar 19, 2010 - 3:41 AM
|
Could you pls. provide us some info’s about this ? I could not see any info’s about on your website. Big Thanks!
|
|
|
Technical Support
|
Mar 19, 2010 - 12:11 PM
|
This is not a secret. The 2.89 is a minor release dedicated to Visual Studio 2010 theme and full compatibility with Visual Studio 2010. 2.90 will be a major release with the classic DrawText() Win32 API not being used at all. This major release will provide full HTML 4 support everywhere. We mean fully featured HTML and CSS including tables, images, absolutely and relatively positioned elements, custom extendable tags, everything but JavaScript. Of course, we always have some small features and bug fixes in each release.
|
|
|
thewhit idie
|
Mar 18, 2010 - 4:45 PM
|
Hello I am trying to use your ribbon in a sample application, just when using the ribbon, the application size is growing to about 50 MB !!! your Ribbon demo application takes about 180 MB !!! this is not a good criteria, and we cannot use your components if there is no solution for the memory size taken. thanks
|
|
|
Technical Support
|
Mar 23, 2010 - 12:48 PM
|
Thank you for your kind words. We are working on reducing memory usage but do not expect too much. A .NET-bitmap-based-ui framework can hardly be light. A regular form app with one button takes up 9.81MB on a 32-bit Windows XP. An empty Elegant Ribbon app (only with a ribbon control) takes up 25.68MB.
|
|
|
Technical Support
|
Mar 20, 2010 - 1:04 PM
|
This forum thread is dedicated to the Prof-UIS library product which is an MFC extension library written in C++. If your question is related to the ribbon bar control that is part of Prof-UIS library, then please take a look at its memory usage:
http://www.prof-uis.com/download/forums/tmp/Prof-UIS-ribbon-memory-usage.png
If your question is related to Elegant Ribbon, it will take more memory because it is a .NET application. However, please note that the Ribbon UI is a heavy-duty sample with more than one thousand images loaded into memory. This is done to emulate Microsoft Word in terms of the ribbon. This sample is not optimized for memory. So please try another sample or create your own project to evaluate memory consumption.
|
|
|
thewhit idie
|
Mar 22, 2010 - 3:34 PM
|
Thanks for your response i told to you that i tested the Elegant Ribbon in a new project without any other components or controls, just the Ribbon alone, with only one ribbon page, without any image; so the size of the applicaiton was 50 MB in the memory. With my respect to your beautiful Ribbon, i cannot use on the current state !!! and really i need a solution, because it is the only and only RightToLeft .net Ribbon on the world. what i think that the size can be more efficent if you want either it is a .net code. thanks
|
|
|
Oliver Rau
|
Mar 16, 2010 - 11:24 AM
|
Dear ProfUIS-Team,
we discovered the following strange behaviour:
1. open the demo application RibbonBarMDI with decreased height
2. click the info ("i") button on the upper right to open the "About"-Dialog within the range of the ribbon bar
3. immediately move mouse pointer within this dialog and then quickly go to a ribbon button

4. this leads to intermittent hover-highlighting (blinking) of button while leaving mouse pointer over it
5. after moving the mouse pointer back to the dialog and leaving it still for a short while the dialog becomes real modal, i.e. no more animations
This means, that there must be some animations running under a modal dialog, something that can produce problems, for example if this dialog contains a combobox (e.g. the options dialog under the file button). If the user clicks to open the combobox it will be closed automatically as long there are background animations running.
Best regards,
Martin
|
|
|
Technical Support
|
Mar 17, 2010 - 2:14 PM
|
Thank you for reporting this issue. This can be fixed by updating the following two methods: void CExtToolControlBar::AnimationSite_OnProgressShutdownTimer( UINT nTimerID )
{
ASSERT_VALID( this);
HWND hWndOwn = GetSafeHwnd();
CExtControlBar::AnimationSite_OnProgressShutdownTimer( nTimerID );
if( hWndOwn != NULL && ::IsWindow( hWndOwn ) )
{
bool bUpdateHB = true;
if( ! ( m_pDockSite->GetSafeHwnd() != NULL && m_pDockSite->IsWindowEnabled() ) )
bUpdateHB = false;
else if( ! IsWindowEnabled() )
bUpdateHB = false;
else
{
CWnd * pWndOwner = GetOwner();
if( ! ( pWndOwner->GetSafeHwnd() != NULL && pWndOwner->IsWindowEnabled() ) )
bUpdateHB = false;
}
if( bUpdateHB )
_UpdateHoverButton( CPoint(-1,-1), false );
}
}
void CExtBarButton::OnDeliverCmd()
{
ASSERT_VALID( this );
CExtToolControlBar * pBar = GetBar();
ASSERT_VALID( pBar );
INT nAcIndex, nAcCount = pBar->AnimationSite_ClientGetCount();
for( nAcIndex = 0; nAcIndex < nAcCount; nAcIndex ++ )
{
CExtAnimationClient * pAC = pBar->AnimationSite_ClientGetAt( nAcIndex );
pBar->AnimationSite_ClientProgressStop( pAC );
}
if( pBar->OnDeliverCmd( this ) )
return;
if( ! CExtCmdManager::IsCommand( GetCmdID(false) ) )
return;
CExtCmdItem * pCmdItem =
g_CmdManager->CmdGetPtr(
g_CmdManager->ProfileNameFromWnd( pBar->GetSafeHwnd() ),
GetCmdID(true)
);
if( pCmdItem == NULL )
return;
// the command may be undelivered (i.e. pCmdItem->Deliver() will
// return "false") because there is no command handler found for it
pCmdItem->Deliver( pBar, true );
}
This fix will be available in the next release so you can use it now.
|
|
|
Oliver Rau
|
Mar 16, 2010 - 10:51 AM
|
Dear ProfUIS-Team,
is it possible to change the height of a CExtRibbonGalleryWnd (the one that pops up when clicking the application button) in case that we only have one or two functional controls within it (see image below)? 
Best regards,
Martin
|
|
|
Technical Support
|
Mar 17, 2010 - 2:12 PM
|
The CExtRibbonNodeFile class is derived from CExtRibbonNodeGallery which has the following properties:
CSize m_sizePopupGalleryControl, m_sizePopupGalleryControlMin, m_sizePopupGalleryControlMax;
The CExtRibbonNodeFile class initializes the gallery control’s size in its constructor: m_sizePopupGalleryControl = m_sizePopupGalleryControlMin =
m_sizePopupGalleryControlMax = CSize( 350, 330 );You should change these properties to a smaller or larger size value. The size of ribbon file menu depends on the size of its child gallery control.
|
|
|
Jayakumar Narayanan
|
Mar 13, 2010 - 5:00 AM
|
Please help me for the following issue in my project. Situation occurs when using the sort functions from the dropdown menu when right-clicking on a column heading in the report grid there will be a popup display . Select Ascending / Decending sort, each time a sort is done on a new column this way, it displays the ’sort triangle’ icon in that column heading but does not remove it from the previous one(s) ane more than one column shows the sort triangle. But sorting is happening properly. Thanks in advance. Jayakumar Narayanan
|
|
|
Technical Support
|
Mar 15, 2010 - 5:28 AM
|
The sort commands from the context menu over the report grid’s column head hearer perform addition of a column to the sorting rules. These commands do not reset sorting rules for sorting by one column only. That’s why additional triangle icons appear in the header column cells. I.e. context menu’s sorting commands are equal to the clicks on the header cells with the Shift key pressed. We re-checked this using the ReportGrid sample application. We invoked the Report Grid | Auto Preview Mode menu command to hide in-row preview information. Then invoked the Report Grid | Behavior | Enable Cell Editing menu command to enable cell editing. Then we sorted the report grid by the Model Name column and added second sorted column called Standard Cost. Now the top rows contain the All-Purpose Bike Stand text in the Model Name column and the $59.47 text in the Standard Cost column. We changed the $59.47 value in several grid cells and re-sorted the report grid via context menu over the Standard Cost column. We saw the rows with the All-Purpose Bike Stand text in the Model Name column were kept near each other and only resorted by the Standard Cost column.
|
|
|
Jayakumar Narayanan
|
Mar 13, 2010 - 4:59 AM
|
Situation occurs when using the sort functions from the dropdown menu when right-clicking on a column heading in the report grid there will be a popup display . Select Ascending / Decending sort, each time a sort is done on a new column this way, it displays the ’sort triangle’ icon in that column heading but does not remove it from the previous one(s) ane more than one column shows the sort triangle. But sorting is happening properly.
|
|
|
Technical Support
|
Mar 15, 2010 - 5:28 AM
|
The sort commands from the context menu over the report grid’s column head hearer perform addition of a column to the sorting rules. These commands do not reset sorting rules for sorting by one column only. That’s why additional triangle icons appear in the header column cells. I.e. context menu’s sorting commands are equal to the clicks on the header cells with the Shift key pressed. We re-checked this using the ReportGrid sample application. We invoked the Report Grid | Auto Preview Mode menu command to hide in-row preview information. Then invoked the Report Grid | Behavior | Enable Cell Editing menu command to enable cell editing. Then we sorted the report grid by the Model Name column and added second sorted column called Standard Cost. Now the top rows contain the All-Purpose Bike Stand text in the Model Name column and the $59.47 text in the Standard Cost column. We changed the $59.47 value in several grid cells and re-sorted the report grid via context menu over the Standard Cost column. We saw the rows with the All-Purpose Bike Stand text in the Model Name column were kept near each other and only resorted by the Standard Cost column.
|
|
|
Borremans Pierre
|
Mar 10, 2010 - 8:54 AM
|
How to add icon and indent text in a cextcombobox ?
|
|
|
Technical Support
|
Mar 10, 2010 - 2:12 PM
|
This can be done using an owner draw combo box control. For example, the CExtShellComboBox control is an owner draw version of the CExtComboBox control displaying the shell tree with per-item indents and icons. You can see the CExtShellComboBox control at the top of the shell file dialog.
|
|
|
Borremans Pierre
|
Mar 9, 2010 - 6:16 AM
|
I use a grid with cell header filter and in a row CExtGridCellComboBox. I want to show the combobox only when the cursor is over and always show the filter button in the header. If I use this line : m_wndGrid.BseModifyStyle( __EGWS_BSE_SORT_COLUMNS | __EGWS_BSE_BUTTONS_IN_HOVERED_CELL, 0, false); The combobox in the cell and the filter in the column header are visible If I use this line : m_wndGrid.BseModifyStyle( __EGWS_BSE_SORT_COLUMNS | __EGWS_BSE_BUTTONS_IN_HOVERED_CELL, _EGWS_BSE_BUTTONS_PERSISTENT, false); The combobox in the cell and the filter in the column header are not visible. Thanks for your help
|
|
|
Technical Support
|
Mar 9, 2010 - 11:26 AM
|
Did you try to enable the hover events for outer header cells? This can be done with the wndGrid.HoverEventsSet( true, true ); code.
|
|
|
Borremans Pierre
|
Mar 8, 2010 - 3:22 AM
|
I use a CExtGridCellComboBox in my grid and I want to show the button of the CExtGridCellComboBox only when the mouse is over the cell. Is it possible ?
|
|
|
Borremans Pierre
|
Mar 9, 2010 - 3:44 AM
|
ok I find the solution using __EGWS_BSE_BUTTONS_IN_HOVERED_CELL
|
|
|
Borremans Pierre
|
Mar 8, 2010 - 2:15 AM
|
in a dialog we have a gradient backgound but the controls take the color of the skin. We want to have control with transparent background. I try to override the function _Renderimpl but the control have a grey backgound. For information we redraw the backgournd of the cdialog with this code : (for having a gradient background)
CMYdialog::OnEraseBkgnd(CDC* pDC)
{
// return CDialog::OnEraseBkgnd(pDC);
CRect rect;
GetClientRect(&rect);
//int r1=121,g1=126,b1=150; //Any start color
//int r2=121,g2=126,b2=150; //Any stop color
int r1= 160, g1=180, b1 =225;
int r2= 160, g2=180, b2 =225;
for(int i=0;i<rect.Width();i++)
{
int r,g,b;
r = r1 + (i * (r2-r1) / rect.Width());
g = g1 + (i * (g2-g1) / rect.Width());
b = b1 + (i * (b2-b1) / rect.Width());
pDC->FillSolidRect(i,0,1,rect.Height(),RGB(r,g,b));
}
return TRUE;
}Does someone have a solution ? thanks
|
|
|
Borremans Pierre
|
Mar 8, 2010 - 5:50 AM
|
|
|
|
|
Oliver Rau
|
Mar 5, 2010 - 5:47 AM
|
Dear ProfUIS-Team,
we need to disable the minimize button of the ribbon files’ options menu. Therefore we switched the corresponding flag for the minimize button in all of your resource files to false. MS Visual Studio dialog tester shows the correct behaviour, but there’s no impact on the demo application itself, i.e. the attribute must have got lost somewhere else. Any idea? Thanks in advance.
Best regards,
Martin
|
|
|
Technical Support
|
Mar 5, 2010 - 10:24 AM
|
We added a new CExtRibbonBar::m_bAllowMinimizeRibbonOptionsDialog flag and set it to true by default. We also added the following code to the end of the CExtRibbonOptionsDialog::OnInitDialog() method:
if( ! m_pRibbonBar->m_bAllowMinimizeRibbonOptionsDialog )
{
CMenu * pSysMenu = GetSystemMenu( FALSE );
if( pSysMenu != NULL )
{
ASSERT_KINDOF( CMenu, pSysMenu );
pSysMenu->EnableMenuItem( SC_MINIMIZE, MF_BYCOMMAND|MF_DISABLED );
}
ModifyStyle( WS_MINIMIZEBOX, 0, SWP_FRAMECHANGED );
}
Now you can change the CExtRibbonBar::m_bAllowMinimizeRibbonOptionsDialog flag of your ribbon bar to false and the ribbon options dialog minimization will be disabled.
|
|
|
HP Jiang
|
Mar 5, 2010 - 12:05 AM
|
hi,
my dialog class is inherited from public CExtNCW<CExtResizableDialog>. and my application is built with the skin library of version 2.88. it’s a MDI application.
After popping up a dialog in my application, dragging the dialog title bar sometimes causes my application hang, then exit automatically. I am using the BlackDiamond.Skin.
anybody has the same problem as mine?
thanks
Searoc
|
|
|
Technical Support
|
Mar 9, 2010 - 8:38 AM
|
If the dialog window hangs forever, then you can attach the debugger, break the application execution and take a look at the call stack to clarify what’s wrong. You can also use the SPY++ utility application to see what’s happen when the dragged dialog hangs. You should spy all the messages of your application in SPY++. We suspect some subsystem in your application overloads the UI thread’s message queue with too much messages.
|
|
|
HP Jiang
|
Mar 10, 2010 - 8:08 PM
|
thank you for your help. I made some tests, and below is the result: 1. I created a Grid inside my Control bar, this Grid is CExtNSB < CFilteredGridWnd > m_wndFilteredGrid; after drag any other Dialogs on top of this controlbar quickly, my application cpu usage increases to 99%, it seems redraw somthing. class CFilteredGridWnd : public CThemedGrid 2. another test: dragging a dialog containing a Grid inherited from CThemedGrid several times and moving quickl, my application cpu usage increases to 99%, it seems redraw somthing. code of CThemedGrid is in below, which is actually from your example.
class CThemedGrid : public CExtGridWnd
{
DECLARE_DYNAMIC(CThemedGrid)
public:
CThemedGrid();
virtual ~CThemedGrid();
virtual void OnSiwPaintBackground(CDC & dc, bool bFocusedControl) const;
//virtual void OnSiwPaintForeground(
// CDC & dc,
// bool bFocusedControl
// ) const;
protected:
DECLARE_MESSAGE_MAP()
private:
int m_nBkType;
static CBitmap g_bmpBk;
static CSize g_sizeBmpBk;
};
CBitmap CThemedGrid::g_bmpBk;
CSize CThemedGrid::g_sizeBmpBk( 0, 0 );
IMPLEMENT_DYNAMIC(CThemedGrid, CExtGridWnd)
CThemedGrid::CThemedGrid():m_nBkType(1)//1: get the global painter 2: get outside from dialog maybe
{
if( g_bmpBk.GetSafeHandle() == NULL )
{
if( g_bmpBk.LoadBitmap( IDB_BITMAP_GRID_BK_IMAGE ) )
{
ASSERT( g_bmpBk.GetSafeHandle() != NULL );
BITMAP bmpInfo;
::memset( &bmpInfo, 0, sizeof(BITMAP) );
g_bmpBk.GetBitmap( &bmpInfo );
g_sizeBmpBk.cx = bmpInfo.bmWidth;
g_sizeBmpBk.cy = bmpInfo.bmHeight;
ASSERT( g_sizeBmpBk.cx > 0 && g_sizeBmpBk.cy > 0 );
}
} // if( g_bmpBk.GetSafeHandle() == NULL )
}
CThemedGrid::~CThemedGrid()
{
}
BEGIN_MESSAGE_MAP(CThemedGrid, CExtGridWnd )
END_MESSAGE_MAP()
void CThemedGrid::OnSiwPaintBackground(CDC & dc, bool bFocusedControl) const
{
ASSERT_VALID( this );
CExtGridWnd :: OnSiwPaintBackground( dc, bFocusedControl );
if( m_nBkType == 0 )
return;
CRect rcGridInner = OnSwGetClientRect();
if( ! dc.RectVisible( &rcGridInner ) )
return;
if( m_nBkType == 1 )
{
bool bFillArea = true;
if( g_PaintManager->GetCb2DbTransparentMode( (CWnd*)this ) )
{
if( g_PaintManager->PaintDockerBkgnd( true, dc, (CWnd*)this ) )
bFillArea = false;
} // if( g_PaintManager->GetCb2DbTransparentMode( (CWnd*)this ) )
if( bFillArea )
{
COLORREF clrFill =
g_PaintManager->GetColor( CExtPaintManager::CLR_3DFACE_OUT, (CObject*)this );
dc.FillSolidRect( &rcGridInner, clrFill );
} // if( bFillArea )
} // if( m_nBkType == 1 )
else if( m_nBkType == 2 )
{
if( g_bmpBk.GetSafeHandle() != NULL )
{
ASSERT( g_sizeBmpBk.cx > 0 && g_sizeBmpBk.cy > 0 );
CDC dcSrc;
if( dcSrc.CreateCompatibleDC(&dc) )
{
CBitmap * pBmpOld = dcSrc.SelectObject( &g_bmpBk );
CSize sizeGridInner = rcGridInner.Size();
int nStepCountX = sizeGridInner.cx / g_sizeBmpBk.cx;
if( (sizeGridInner.cx % g_sizeBmpBk.cx) != 0 )
nStepCountX ++;
int nStepCountY = sizeGridInner.cy / g_sizeBmpBk.cy;
if( (sizeGridInner.cy % g_sizeBmpBk.cy) != 0 )
nStepCountY ++;
for( int nStepX = 0; nStepX < nStepCountX; ++nStepX )
{
for( int nStepY = 0; nStepY < nStepCountY; ++nStepY )
{
dc.BitBlt(
rcGridInner.left + nStepX*g_sizeBmpBk.cx,
rcGridInner.top + nStepY*g_sizeBmpBk.cy,
g_sizeBmpBk.cx,
g_sizeBmpBk.cy,
&dcSrc,
0,
0,
SRCCOPY
);
} // for( int nStepY = 0; nStepY < nStepCountY; ++nStepY )
} // for( int nStepX = 0; nStepX < nStepCountX; ++nStepX )
dcSrc.SelectObject( pBmpOld );
} // if( dcSrc.CreateCompatibleDC(&dc) )
} // if( g_bmpBk.GetSafeHandle() != NULL )
} // else if( m_nBkType == 2 )
}
any idea?
|
|
|
Technical Support
|
Mar 11, 2010 - 7:35 AM
|
The CPU eating issue is definitively hidden somewhere outside the source code from your message. Could you please create a simple test project reproducing this CPU eating issue and send it to the support mail box at this web site?
|
|
|
HP Jiang
|
Mar 14, 2010 - 8:42 PM
|
I found the problem lied in the CExtToolControlBar working with the CExtControlBar. First of all, my class CScenarioPanel : public CExtNCW<CExtResizableDialog>, and a CExtToolControlBar toolbar is put in the CScenarioPanel. In my MDI applicaiton, CScenarioPanel is created inside of the CExtControlBar. pls see picture attached here. CExtToolControlBar caused this cpu eating problem, since that problem is gone after I repalced it with individual buttons. some code is listed in below to show my way to instance the toolbar of CExtToolControlBar void CScenarioPanel::DoDataExchange(CDataExchange* pDX)
{
.....
DDX_Control(pDX, IDR_TB_SCENARIO, lv_ToolBar); .... }
BOOL CScenarioPanel::OnInitDialog()
{
CExtNCW<CExtResizableDialog>::OnInitDialog();
if( !lv_ToolBar.LoadToolBar( IDR_TB_SCENARIO ) )
{
TRACE0( "Failed to create toolbar" );
return -1;
} RepositionBars(0, 0xFFFF, IDC_SCENARIO_LIST);//IDC_SCENARIO_LIST is the ID of the Grid below the Toolbar. ...
}
BTW, if I use RepositionBars(0, 0xFFFF, 0); the applciation crashes at the initialization stage.
1.bp.blogspot.com/_V4iDvQZiP7g/S52cC23-QHI/AAAAAAAAFGo/v80k7v7B2RQ/s1600-h/problem.jpg
|
|
|
Technical Support
|
Mar 15, 2010 - 10:44 AM
|
We have a lot of toolbars inside resizable control bars in the ProfStudio sample application. But we never faced CPU over usage and repositioning crash problems. We suspect these issue can depend on some of your command updating methods or OnCmdMsg() virtual methods. Could you please show us the call stack at the crash time?
|
|
|
HP Jiang
|
Mar 7, 2010 - 6:51 PM
|
I don’t use any timer and overidding OnIdle().
|
|
|
Technical Support
|
Mar 5, 2010 - 10:22 AM
|
Do you use any heavy code invoked on timers or during the idle time processing (overridden OnIdle() virtual method)?
|
|
|
Johannes Jahn
|
Mar 4, 2010 - 1:37 AM
|
If you sometimes dock a floating controlbar into an existing layout it seems that two controlbars are overlapped. Watch for these pictures. to reproduce this issue use the MDI_DynamicInnerOuterBars-m.exe sample 
after docking 
best regards J Jahn
|
|
|
Technical Support
|
Mar 9, 2010 - 8:38 AM
|
Unfortunately, there is no such algorithm in Prof-UIS 2.88. But it will appear in the next release so you can use and test it right now. Please add the following static method into the CExtControlBar class:
static void stat_CompressFrameLayout(
CFrameWnd * pDockSite,
CSize sizeFreeSpaceAtCenterRequired = CSize(100,100),
bool bCompressInnerFirst = true,
bool bCompressProportionally = false,
bool bRecalcLayout = true,
bool bDelayRecalcLayout = true,
UINT nCenterDlgCtrlID = AFX_IDW_PANE_FIRST
);
void CExtControlBar::stat_CompressFrameLayout(
CFrameWnd * pDockSite,
CSize sizeFreeSpaceAtCenterRequired, // = CSize(100,100)
bool bCompressInnerFirst, // = true
bool bCompressProportionally, // = false
bool bRecalcLayout, // = true
bool bDelayRecalcLayout, // = true
UINT nCenterDlgCtrlID // = AFX_IDW_PANE_FIRST
)
{
if( sizeFreeSpaceAtCenterRequired.cx < 0
|| sizeFreeSpaceAtCenterRequired.cy < 0
|| pDockSite->GetSafeHwnd() == NULL
|| pDockSite->IsKindOf( RUNTIME_CLASS(CMiniDockFrameWnd) )
)
{ // incorrect parameter(s)
ASSERT( FALSE );
return;
} // incorrect parameter(s)
ASSERT_VALID( pDockSite );
CRect rcFrameInner;
pDockSite->GetClientRect( &rcFrameInner );
RepositionBarsEx(
pDockSite,
0,
0x0FFFF,
nCenterDlgCtrlID,
CWnd::reposQuery,
rcFrameInner,
rcFrameInner
);
bool bLayoutChanged = false;
CSize sizeFreeSpaceAtCenterCurrent = rcFrameInner.Size();
for( int nSpaceType = 0; nSpaceType <= 1; nSpaceType ++ )
{ // nSpaceType==0 - horizontal space search, nSpaceType==1 - vertical space search
bool bHorzSpaceSearch = ( nSpaceType == 0 ) ? true : false;
LONG nSizeRequired = bHorzSpaceSearch ? sizeFreeSpaceAtCenterRequired.cx : sizeFreeSpaceAtCenterRequired.cy;
LONG nSizeCurrent = bHorzSpaceSearch ? sizeFreeSpaceAtCenterCurrent.cx : sizeFreeSpaceAtCenterCurrent.cy;
if( nSizeRequired <= nSizeCurrent )
continue;
LONG nSizeAvailable = 0;
UINT nDockBarID1 = bHorzSpaceSearch ? AFX_IDW_DOCKBAR_LEFT : AFX_IDW_DOCKBAR_TOP;
UINT nDockBarID2 = bHorzSpaceSearch ? AFX_IDW_DOCKBAR_RIGHT : AFX_IDW_DOCKBAR_BOTTOM;
CList < CExtDockBar *, CExtDockBar * > listDockBars;
CList < LONG, LONG > listAvailableSizes;
CWnd * pWnd = pDockSite->GetWindow( GW_CHILD );
for( ; pWnd != NULL; pWnd = pWnd->GetWindow( GW_HWNDNEXT ) )
{
CExtDockBar * pDockBar = DYNAMIC_DOWNCAST( CExtDockBar, pWnd );
if( pDockBar == NULL || pDockBar->IsKindOf( RUNTIME_CLASS(CExtDockOuterBar) ) )
continue;
UINT nDockBarID = pDockBar->GetDlgCtrlID();
if( ! ( nDockBarID == nDockBarID1 || nDockBarID == nDockBarID2 ) )
continue;
if( ( pDockBar->GetStyle() & WS_VISIBLE ) == 0 )
continue;
CRect rcDockBarWnd;
pDockBar->GetWindowRect( &rcDockBarWnd );
LONG nDockBarMinSize = 0, nDockBarCurrentSize = bHorzSpaceSearch ? rcDockBarWnd.Width() : rcDockBarWnd.Height();
CWnd * pTestBar = pDockBar->GetWindow( GW_CHILD );
for( ; pTestBar != NULL; pTestBar = pTestBar->GetWindow( GW_HWNDNEXT ) )
{
CExtControlBar * pBar = DYNAMIC_DOWNCAST( CExtControlBar, pTestBar );
if( pBar == NULL )
continue;
if( ! pBar->IsVisible() )
continue;
LONG nBarMinSize = bHorzSpaceSearch ? pBar->_CalcDesiredMinHW() : pBar->_CalcDesiredMinVH();
nDockBarMinSize = max( nDockBarMinSize, nBarMinSize );
} // for( ; pTestBar != NULL; pTestBar = pTestBar->GetWindow( GW_HWNDNEXT ) )
LONG nDockBarAvailableSize = nDockBarCurrentSize - nDockBarMinSize;
if( nDockBarAvailableSize <= 0 )
continue;
nSizeAvailable += nDockBarAvailableSize;
if( bCompressInnerFirst )
{
listDockBars.AddHead( pDockBar );
listAvailableSizes.AddHead( nDockBarAvailableSize );
}
else
{
listDockBars.AddTail( pDockBar );
listAvailableSizes.AddTail( nDockBarAvailableSize );
}
} // for( ; pWnd != NULL; pWnd = pWnd->GetWindow( GW_HWNDNEXT ) )
LONG nSizeToCompress = min( nSizeAvailable, nSizeRequired );
if( nSizeToCompress <= 0 )
continue;
bLayoutChanged = true;
ASSERT( listDockBars.GetCount() == listAvailableSizes.GetCount() );
CMap < CExtDockBar *, CExtDockBar *, LONG, LONG > mapSizesToCompress;
for( ; nSizeToCompress > 0; )
{
POSITION posDockBar = listDockBars.GetHeadPosition();
POSITION posAvailableSize = listAvailableSizes.GetHeadPosition();
LONG nStepResult = 0;
for( ; posDockBar != NULL && nSizeToCompress > 0; )
{
CExtDockBar * pDockBar = listDockBars.GetNext( posDockBar );
LONG nDockBarSizeCompressed = 0, nDockBarAvailableSize = listAvailableSizes.GetNext( posAvailableSize );
if( ! mapSizesToCompress.Lookup( pDockBar, nDockBarSizeCompressed ) )
nDockBarSizeCompressed = 0;
nDockBarAvailableSize -= nDockBarSizeCompressed;
ASSERT( nDockBarAvailableSize >= 0 );
if( nDockBarAvailableSize == 0 )
continue;
if( bCompressProportionally )
{
nDockBarSizeCompressed ++;
nSizeToCompress --;
nStepResult ++;
}
else
{
LONG nCompress = min( nDockBarAvailableSize, nSizeToCompress );
nDockBarSizeCompressed += nCompress;
nSizeToCompress -= nCompress;
nStepResult += nCompress;
}
mapSizesToCompress.SetAt( pDockBar, nDockBarSizeCompressed );
ASSERT( nSizeToCompress >= 0 );
} // for( ; posDockBar != NULL && nSizeToCompress > 0; )
ASSERT( nStepResult >= 0 );
if( nStepResult == 0 )
break;
} // for( ; nSizeToCompress > 0; )
POSITION pos = mapSizesToCompress.GetStartPosition();
for( ; pos != NULL ; )
{
CExtDockBar * pDockBar = NULL;
LONG nDockBarSizeCompressed = 0;
mapSizesToCompress.GetNextAssoc( pos, pDockBar, nDockBarSizeCompressed );
CWnd * pTestBar = pDockBar->GetWindow( GW_CHILD );
for( ; pTestBar != NULL; pTestBar = pTestBar->GetWindow( GW_HWNDNEXT ) )
{
CExtControlBar * pBar = DYNAMIC_DOWNCAST( CExtControlBar, pTestBar );
if( pBar == NULL )
continue;
//if( ! pBar->IsVisible() )
// continue;
CRect rcBarWnd;
pBar->GetWindowRect( &rcBarWnd );
CSize sizeBar = rcBarWnd.Size();
if( bHorzSpaceSearch )
{
sizeBar.cx -= nDockBarSizeCompressed;
pBar->SetInitDesiredSizeVertical( sizeBar );
}
else
{
sizeBar.cy -= nDockBarSizeCompressed;
pBar->SetInitDesiredSizeHorizontal( sizeBar );
}
} // for( ; pTestBar != NULL; pTestBar = pTestBar->GetWindow( GW_HWNDNEXT ) )
} // for( ; pos != NULL ; )
} // nSpaceType==0 - horizontal space search, nSpaceType==1 - vertical space search
if( ! bLayoutChanged )
return;
if( bRecalcLayout )
pDockSite->RecalcLayout();
else if( bDelayRecalcLayout )
pDockSite->DelayRecalcLayout();
}
We used the MDI sample application to test the method above. We added the following code into this sample application: LRESULT CMainFrame::WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = CExtNCW < CMDIFrameWnd > :: WindowProc( message, wParam, lParam );
switch( message )
{
case WM_SIZE:
if( wParam != SIZE_MINIMIZED )
CExtControlBar::stat_CompressFrameLayout( this );
break;
}
return lResult;
}
|
|
|
Johannes Jahn
|
Mar 4, 2010 - 11:00 AM
|
Is there any algorithm who makes the resizing automatically.
|
|
|
Technical Support
|
Mar 4, 2010 - 9:04 AM
|
This is the overflow situation. It will disappear if you resize bars and make them smaller.
|
|
|
Johannes Jahn
|
Mar 7, 2010 - 11:14 AM
|
Is there any algorithm who makes the resizing automatically.
|
|
|
Borremans Pierre
|
Mar 2, 2010 - 2:52 AM
|
when the CExtComboBox is disabled we want to change the background color. We only want to change the color of the edit inside the CExtComboBox Which function I must override ?
|
|
|
Technical Support
|
Apr 8, 2010 - 9:54 AM
|
It’s possible to repaint the combo box, but your painting code will not affect the edit control which is a single child window inside the combo box window. The editor control is subclassed with the CExtComboEditCtrlHook class which is derived from the CExtEditBase class. This means you can use the CExtEditBase::SetBkColor() and CExtEditBase::SetTextColor() methods to change the editor colors. You can also handle the WM_ENABLE message in your CExtComboBox-derived class and change the editor colors depending on the enabled state of the combo box window.
|
|
|
Borremans Pierre
|
Apr 7, 2010 - 2:11 AM
|
To simplify, we want to have the same background color for all disabled control. How to do this ?
|
|
|
Borremans Pierre
|
Mar 25, 2010 - 8:30 AM
|
I try it wut without success. As I explain I want to have the same color for the cextcombobox in disabled mode than a Cextedit in disabled mode. 
If I change the color of my paintmanager the color change, I think that I mus override a function in the paintmanager but which function and how to do change the background color only when the combobox is disabled ? thanks for your help
|
|
|
Technical Support
|
Mar 3, 2010 - 10:08 AM
|
Please override the CExtComboBoxBase::OnSubclassInnerEdit() and CExtComboBoxBase::OnQueryInnerEditCtrl() virtual methods. Your methods should subclass the edit control and return pointer to your CExtComboEditCtrlHook-derived editor. Your editor should override the CExtEditBase::OnQueryBackColor() and CExtEditBase::OnQueryTextColor() virtual methods.
|
|
|
Oliver Rau
|
Mar 2, 2010 - 2:19 AM
|
Dear ProfUIS-Team,
the options dialog for the quick access bar of the RibbonBarMDI sample application has a listbox container where you can add controls. No matter what theme you select there is no border around this container, something that can be kind of puzzling for some users, especially if the container is empty ("...oooh, I have trash, but where is the garbage can?" ;-). Sure, this depends on personal taste and habit, but we have some requests to add a border. What would be the best way to do this?
Best regards,
Martin
|
|
|
Technical Support
|
Mar 10, 2010 - 2:23 PM
|
We removed list box borders by customer requests. These borders can be returned back easily. Just comment the following lines of code in the CExtRibbonOptionsPageCustomizeQATB::OnInitDialog() method:
m_listBoxChooseCommandsFrom.m_rcNcsbCustomNcAreaSizes.SetRect( 0, 0, 0, 0 );
m_listBoxCustomizeTarget.m_rcNcsbCustomNcAreaSizes.SetRect( 0, 0, 0, 0 );
m_listBoxChooseCommandsFrom.m_clrNcsbCustomNcAreaFill = RGB( 0, 0, 0 );
m_listBoxCustomizeTarget.m_clrNcsbCustomNcAreaFill = RGB( 0, 0, 0 );
m_listBoxChooseCommandsFrom.ModifyStyle( WS_BORDER, 0, SWP_FRAMECHANGED );
m_listBoxCustomizeTarget.ModifyStyle( WS_BORDER, 0, SWP_FRAMECHANGED );
m_listBoxChooseCommandsFrom.ModifyStyleEx( WS_EX_STATICEDGE|WS_EX_CLIENTEDGE|WS_EX_DLGMODALFRAME, 0, SWP_FRAMECHANGED );
m_listBoxCustomizeTarget.ModifyStyleEx( WS_EX_STATICEDGE|WS_EX_CLIENTEDGE|WS_EX_DLGMODALFRAME, 0, SWP_FRAMECHANGED );
We can simply make the border removing optional.
|
|
|
Oliver Rau
|
Mar 11, 2010 - 5:02 AM
|
Yes, that’s it - thank you very much!!!
|
|
|
Oliver Rau
|
Mar 5, 2010 - 8:17 AM
|
Sorry again - quick link but wrong image ... here’s the correct one: 
|
|
|
Technical Support
|
Mar 5, 2010 - 10:24 AM
|
We added the following local class in scope of the CExtRibbonOptionsPage class declaration:
class __PROF_UIS_API CSimpleCommandsListBox : public CExtNCSB < CExtWFF < CExtCustomizeCommandListBox > >
{
protected:
bool _IsDisabledBackground() const
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
if( GetCount() != 0 )
return false;
return true;
}
void _DrawDisabledBackground( CDC & dc )
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
ASSERT( dc.GetSafeHdc() != NULL );
CRect rc;
GetClientRect( &rc );
dc.FillSolidRect( &rc, ::GetSysColor( COLOR_3DFACE ) );
}
virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
switch( message )
{
case WM_PAINT:
if( _IsDisabledBackground() )
{
CPaintDC dc( this );
_DrawDisabledBackground( dc );
return 0;
}
break;
case WM_ERASEBKGND:
case WM_PRINT:
case WM_PRINTCLIENT:
if( _IsDisabledBackground() )
{
_DrawDisabledBackground( * ( CDC::FromHandle( (HDC) wParam ) ) );
return 1L;
}
break;
}
LRESULT lResult = CExtNCSB < CExtWFF < CExtCustomizeCommandListBox > > :: WindowProc( message, wParam, lParam );
switch( message )
{
case LB_ADDSTRING:
case LB_INSERTSTRING:
case LB_DELETESTRING:
case LB_SETCOUNT:
Invalidate();
UpdateWindow();
break;
}
return lResult;
}
};
Then we replaced the following two properties of the CExtRibbonOptionsPageCustomizeQATB class: CExtNCSB < CExtWFF < CExtCustomizeCommandListBox > > m_listBoxChooseCommandsFrom;
CExtNCSB < CExtWFF < CExtCustomizeCommandListBox > > m_listBoxCustomizeTarget;
With the following: CSimpleCommandsListBox m_listBoxChooseCommandsFrom;
CSimpleCommandsListBox m_listBoxCustomizeTarget;
Now the empty list boxes without borders become recognizable. Please let us know your point of view.
|
|
|
Oliver Rau
|
Mar 9, 2010 - 12:26 AM
|
Thank you for the modification! Unfortunately we got the following compile error on template instantiation:
Error 2 error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments d:\Prof-UIS\Include\ExtScrollWnd.h 451
... with the following output:
[...] 1>ExtPaintManager.cpp
1>d:\Prof-UIS\Include\ExtScrollWnd.h(451) : error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments
1> with
1> [
1> CExtWFFBase=CExtCustomizeCommandListBox
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(425) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(1183) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtRibbonBar.h(2237) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1>ExtPaintManager2.cpp
1>d:\Prof-UIS\Include\ExtScrollWnd.h(451) : error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments
1> with
1> [
1> CExtWFFBase=CExtCustomizeCommandListBox
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(425) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(1183) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtRibbonBar.h(2237) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1>ExtPopupCtrlMenu.cpp
1>d:\Prof-UIS\Include\ExtScrollWnd.h(451) : error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments
1> with
1> [
1> CExtWFFBase=CExtCustomizeCommandListBox
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(425) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(1183) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtRibbonBar.h(2237) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1>ExtPopupMenuWnd.cpp
1> Prof-UIS is automatically linking with winmm.lib
1> (Windows Multimedia System)
1>d:\Prof-UIS\Include\ExtScrollWnd.h(451) : error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments
1> with
1> [
1> CExtWFFBase=CExtCustomizeCommandListBox
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(425) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(1183) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtRibbonBar.h(2237) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CExtWFF<CExtCustomizeCommandListBox>
1> ] [...] 1>extribbonbar.cpp
1>d:\Prof-UIS\Include\ExtScrollWnd.h(451) : error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments
1> with
1> [
1> CExtWFFBase=CExtCustomizeCommandListBox
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(425) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(1183) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtRibbonBar.h(2237) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1>ExtToolControlBar.cpp
1>d:\Prof-UIS\Include\ExtScrollWnd.h(451) : error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments
1> with
1> [
1> CExtWFFBase=CExtCustomizeCommandListBox
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(425) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtScrollWnd.h(1183) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1> d:\Prof-UIS\Include\ExtRibbonBar.h(2237) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CExtWFF<CExtCustomizeCommandListBox>
1> ]
1>Generating Code...
1>Build log was saved at "file://d:\Prof-UIS\Bin_800\UnicodeDebug\ProfUISDLL\BuildLog.htm"
1>ProfUISDLL - 6 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Could this be specific for our version of ProfUIS (2.87)? Or are we just missing some specific constructor, declaration ...? Best regards, Martin
|
|
|
Technical Support
|
Mar 9, 2010 - 11:17 AM
|
The problem was with the class. We are sorry for this inconvenience. Let’s try it again: class __PROF_UIS_API CSimpleFlockerFreeListBox : public CExtWFF < CExtCustomizeCommandListBox >
{
public:
CSimpleFlockerFreeListBox() { }
CSimpleFlockerFreeListBox( UINT nIDTemplate, CWnd * pParentWnd ) { nIDTemplate; pParentWnd; }
CSimpleFlockerFreeListBox( __EXT_MFC_SAFE_LPCTSTR lpszTemplateName, CWnd * pParentWnd ) { lpszTemplateName; pParentWnd; }
};
class __PROF_UIS_API CSimpleCommandsListBoxBase : public CExtNCSB < CSimpleFlockerFreeListBox >
{
public:
CSimpleCommandsListBoxBase() : CExtNCSB < CSimpleFlockerFreeListBox > ( true ) { }
};
class __PROF_UIS_API CSimpleCommandsListBox : public CSimpleCommandsListBoxBase
{
protected:
bool _IsDisabledBackground() const
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
if( GetCount() != 0 )
return false;
return true;
}
void _DrawDisabledBackground( CDC & dc )
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
ASSERT( dc.GetSafeHdc() != NULL );
CRect rc;
GetClientRect( &rc );
dc.FillSolidRect( &rc, ::GetSysColor( COLOR_3DFACE ) );
}
virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
switch( message )
{
case WM_PAINT:
if( _IsDisabledBackground() )
{
CPaintDC dc( this );
_DrawDisabledBackground( dc );
return 0;
}
break;
case WM_ERASEBKGND:
case WM_PRINT:
case WM_PRINTCLIENT:
if( _IsDisabledBackground() )
{
_DrawDisabledBackground( * ( CDC::FromHandle( (HDC) wParam ) ) );
return 1L;
}
break;
}
LRESULT lResult = CSimpleCommandsListBoxBase::WindowProc( message, wParam, lParam );
switch( message )
{
case LB_ADDSTRING:
case LB_INSERTSTRING:
case LB_DELETESTRING:
case LB_SETCOUNT:
Invalidate();
UpdateWindow();
break;
}
return lResult;
}
};
|
|
|
Oliver Rau
|
Mar 10, 2010 - 7:47 AM
|
Thank you for this modified approach, but ... ... even if I’m running into danger to steal your precious time, I’d like to illustrate our real concern. This is the current look (since v2.83): 
And this is the previous v2.82 look (the one our customers have got accustomed with): 
The 2.82 look comes close to that of Word2007 - and for some of our customers this is the main argument besides the accustomization effect. After some experiments based on your approach we achieved the following look with 2.87: 
As it is difficult and error prone to wilder in foreign code we are now facing some problems like repainting the frame on resize events (it gets hidden by the parent backgound redraw) etc. etc. So my request (regarding only the listbox frames): would it be possible to achieve this ’old-fashioned’ 2.82 look somehow? (Please, don’t kill me for this ;-) ... ) Best regards, Martin
|
|
|
Oliver Rau
|
Mar 5, 2010 - 4:14 AM
|
But for an empty list box there is no frame border visible. Any chance to make it visible? 
Martin
|
|
|
Oliver Rau
|
Mar 5, 2010 - 8:06 AM
|
Sorry for the bad link. Here is the quicker one: 
|
|
|
Technical Support
|
Mar 2, 2010 - 10:24 AM
|
|
|