Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Rado Manzela
|
May 31, 2010 - 6:16 AM
|
It seems CExtDynamicControlBar::DoFrameBarCheckCmd() does not work when the toolbar is tabbed document. Instead of switching to correct tab it shows empty dummy docked toolbar. Can you check it please?
|
|
Technical Support
|
Jun 2, 2010 - 11:35 AM
|
First of all, the CExtControlBar::DoFrameBarCheckCmd() method is designed for CExtControlBar windows, not for CExtDynamicControlBar windows. That’s why the context menus over frame areas do not contain dynamic control bars in the document mode. The document mode means the dynamic bar is just hidden and its child window is temporarily moved into some type document container window (dynamic MDI child frame, SDI tab page container). Switching to CExtDynamicControlBar::BarStateSet() method will solve all the issues. Please also note, the CExtControlBar::DoFrameBarCheckCmd() method just invokes the CExtControlBar::OnFrameBarCheckCmd() virtual method which is not overridden in the CExtDynamicControlBar class. We can override it and prevent the hidden dynamic control bars in the document mode to appear occasionally on the screen.
|
|
Rado Manzela
|
Jun 3, 2010 - 3:10 AM
|
I think CExtDynamicControlBar::BarStateSet() won’t help me, because I don’t want to change state of the bar, I just need tho show it in original state in any state it is. I have more bars in various states where user fills some data and when I validate the data and find the problem, I need to switch to appropriate bar and show notice to user he need to fix something. Can you override CExtDynamicControlBar::BarStateSet() to show any dynamic bar please? Thank you.
|
|
Technical Support
|
Jun 3, 2010 - 10:22 AM
|
The CExtDynamicControlBar::BarStateSet() method can be used for changing the bar’s visibility without its state. But we can also improve the CExtControlBar::DoFrameBarCheckCmd() method for dynamic resizable control bars. We need to discuss your task requirements in details. How the CExtControlBar::DoFrameBarCheckCmd() method should affect to the dynamic resizable control bars in any state? We especially interested in discussing behavior of this API for bars in the document mode.
|
|
Technical Support
|
May 31, 2010 - 12:59 PM
|
We checked it. We cannot reproduce it both before and after applying the fix we mentioned in our previous answer. We used the SDI_DynamicBars sample application.
|
|
Rado Manzela
|
Jun 1, 2010 - 2:47 AM
|
I’ve realized that even when I try original SDI dynamic bars binary from your site and reset registry, your sample initially creates dummy copies of dynamic bars 14, 16 and 18. When I try to change creating code to this:
m_arrAllDynamicBars.Add(
CExtDynamicBarSite::BarAlloc(
strBarCaption, // NULL,
icon,
// 0,
11100+i,
RUNTIME_CLASS(CSimpleControlBar)
)
); then when I try to show bar 17 from some menu command using
CExtDynamicControlBar::DoFrameBarCheckCmd(this,11100+17); It creates docked dummy copy of bar 17 as I’ve described before. I’m compiling static unicode version in VS 2008 if that matters.
|
|
Rado Manzela
|
May 31, 2010 - 2:25 AM
|
I’ve found bug in dynamic bars. (Tried also with latest 2.90) . Just run your SDI dynamic bars sample with clean registry to make default layout. Then drag out bar 19 to make it floating, drag 18 and paste to 19 to make it tabbed. Switch 18, then 19 back to tabbed document, then drag out 19 to make it floating. Then you will see above edit area of 18 tiny window you can resize to see it is some dummy Bar 18 window.
|
|
Rado Manzela
|
Jun 1, 2010 - 3:17 AM
|
I’m afraid it is still not working. I’ve downloaded latest 2.90 (05-31) and applied this fix. When you repeat process I’ve sent to you, but then you will drag bar 18 (after 19) out of document tab, while dragging you will be suddenly dragging bar 18 tabbed with bar 19. BTW when you’ll set bar 18 as tabbed document you will see it still flashes small dummy window for a moment until it is redrawn with other bars. Please try to play with bars little after fix :)
|
|
Technical Support
|
Jun 2, 2010 - 11:35 AM
|
We cannot catch the small dummy window on the screen. We tried to take a look with attention at the screen area when the bar was floating last time. But we didn’t noticed any small floating bars there. Where the small bar window appears exactly for a short time on the screen?
|
|
Rado Manzela
|
Jun 3, 2010 - 2:22 AM
|
It appears just for fraction of second so I cannot make screenshot. When you switch tab 19 to tabbed document as last step, it disappears and dummy window with height of title bar and width of maybe 6 pixels appears in upper left corner of floating bar 19 right under its title bar. But this is not important for me, I’ve thought it could be related to bug which I need to solve: ......drag bar 18 (after 19) out of document tab, while dragging you will be suddenly dragging bar 18 tabbed with bar 19.
|
|
Rado Manzela
|
Jun 3, 2010 - 2:24 AM
|
PS. maybe it is visible only on windows xp, and on slower computer (I have Sempron 3400+ mobile)
|
|
Technical Support
|
May 31, 2010 - 12:59 PM
|
Thank you for reporting this issue. To fix it, please update the source code for the following two methods: bool CExtDynamicControlBar::OnStartDraggingDocumentTabItem(
CExtTabWnd * pWndTab,
LONG nTabItemIndex
)
{
ASSERT( this != NULL );
ASSERT_VALID( pWndTab );
pWndTab;
nTabItemIndex;
if( ! m_bEnableDndDocumentTabs )
return false;
if( ! _DraggingIsEnabled( this ) )
return true;
CPoint point;
if( ! ::GetCursorPos( &point ) )
return false;
if( ! BarStateSet( __EDBS_DOCKED, false ) )
{
ASSERT( FALSE );
return true;
}
bool bShowContentWhenDragging = _IsShowContentWhenDragging();
CPoint ptFloat( point );
ptFloat.x -= 15;
ptFloat.y -= 45;
ASSERT_VALID( m_pDockSite );
m_pDockSite->ShowControlBar( this, TRUE, TRUE );
CExtControlBar * pFloatBar = this;
CFrameWnd * pParentFrame = GetParentFrame();
ASSERT( pParentFrame != NULL );
if( ! pParentFrame->IsKindOf( RUNTIME_CLASS(CExtMiniDockFrameWnd) ) )
{
FloatControlBar( ptFloat );
pParentFrame = GetParentFrame();
}
else
{
CExtDynControlBar * pDynBar = _GetNearestDynamicContainer();
for( ; pDynBar != NULL; pDynBar = pDynBar->_GetNearestDynamicContainer() )
pFloatBar = pDynBar;
pFloatBar->FloatControlBar( ptFloat );
}
pParentFrame->RecalcLayout();
HWND hWndOwn = m_hWnd;
if( pFloatBar != this )
{
m_pDockSite->ShowControlBar( pFloatBar, TRUE, TRUE );
pFloatBar->OnRepositionSingleChild();
::AfxGetApp()->OnIdle( 0 );
if( ! ( ::IsWindow(hWndOwn) && CWnd::FromHandlePermanent( hWndOwn ) == this ) )
return false;
}
OnRepositionSingleChild();
CPoint ptOffset( point );
CRect rcWnd;
pFloatBar->GetWindowRect( &rcWnd );
ptOffset -= rcWnd.TopLeft();
if( m_pDockSite->GetSafeHwnd() != NULL && ( ! bShowContentWhenDragging ) )
{
ASSERT_VALID( m_pDockSite );
m_pDockSite->ShowControlBar( this, TRUE, FALSE );
}
pFloatBar->_DraggingStart( point, ptOffset );
return true;
}
bool CExtDynamicControlBar::BarStateSet(
CExtDynamicControlBar::eDynamicBarState_t eDBS,
bool bShow
)
{
ASSERT_VALID( this );
ASSERT_VALID( m_pDockSite );
// if( m_eDBS == eDBS )
// return true;
m_eHelperSwitchingDBS = eDBS;
m_bHelperSwitchingIntoVisibleState = bShow;
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( eDBS == __EDBS_AUTO_HIDDEN && (!bShow) )
eDBS = __EDBS_DOCKED;
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
CExtDynamicBarSite * pDBS = GetBarSite();
if( pDBS == NULL )
return false;
CExtDynamicBarSite::eDetectedUiType_t eDUIT = pDBS->GetDetectedUiType();
switch( eDBS )
{
case __EDBS_FLOATING:
{
m_bAppearInDockSiteControlBarPopupMenu = true;
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( AutoHideModeGet() )
AutoHideModeSet( false, false, false, true );
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
bool bFloating = IsFloating();
CExtMiniDockFrameWnd * pOldMiniDockFrameWndToHide = NULL;
HWND hWndOldMiniDockFrameWndToHide = NULL;
bool bHideOldFrame = false;
CFrameWnd * pParentFrame = GetParentFrame();
ASSERT( pParentFrame != NULL );
if( ! bFloating )
{
pOldMiniDockFrameWndToHide = DYNAMIC_DOWNCAST( CExtMiniDockFrameWnd, pParentFrame );
if( pOldMiniDockFrameWndToHide != NULL )
{
hWndOldMiniDockFrameWndToHide = pOldMiniDockFrameWndToHide->GetSafeHwnd();
if( pOldMiniDockFrameWndToHide->_GetSingleVisibleBar() != this )
pOldMiniDockFrameWndToHide = NULL;
else
bHideOldFrame = true;
}
}
OnMoveChildToBar();
if( ! bFloating )
FloatControlBar();
CControlBar::DelayShow( bShow ? TRUE : FALSE );
if( hWndOldMiniDockFrameWndToHide != NULL
&& pOldMiniDockFrameWndToHide == NULL
&& ::IsWindow( hWndOldMiniDockFrameWndToHide )
)
{
bHideOldFrame = false;
pOldMiniDockFrameWndToHide = DYNAMIC_DOWNCAST( CExtMiniDockFrameWnd, CWnd::FromHandlePermanent( ( hWndOldMiniDockFrameWndToHide ) ) );
}
if( pOldMiniDockFrameWndToHide != NULL )
{
if( bHideOldFrame )
pOldMiniDockFrameWndToHide->ShowWindow( SW_HIDE );
CWnd * pWnd = pOldMiniDockFrameWndToHide->GetDlgItem( AFX_IDW_DOCKBAR_FLOAT );
if( pWnd != NULL )
{
pOldMiniDockFrameWndToHide->RepositionBars(0, 0xFFFF, AFX_IDW_DOCKBAR_FLOAT );
pWnd = pWnd->GetWindow( GW_CHILD );
if( pWnd != NULL )
{
CExtDynControlBar * pDynControlBar = DYNAMIC_DOWNCAST( CExtDynControlBar, pWnd );
if( pDynControlBar != NULL )
{
if( pDynControlBar->m_pWndDynDocker != NULL )
pDynControlBar->m_pWndDynDocker->OnDynamicLayoutOptimize();
}
}
}
pOldMiniDockFrameWndToHide->RepositionBars( 0, 0xFFFF, AFX_IDW_DOCKBAR_FLOAT );
// pOldMiniDockFrameWndToHide->RecalcLayout();
}
// if( ! bShow )
// m_pDockSite->ShowControlBar( this, FALSE, FALSE );
// else
// m_pDockSite->ShowControlBar( this, TRUE, FALSE );
if( (! bShow ) && IsVisible()
|| bShow && (! IsVisible() )
)
{
OnFrameBarCheckCmd( true ); // show/hide me
}
GetParentFrame()->RecalcLayout();
}
break;
case __EDBS_DOCKED:
{
if( IsFloating() )
{
m_bAppearInDockSiteControlBarPopupMenu = true;
OnMoveChildToBar();
DelayShow( bShow ? TRUE : FALSE );
// if( ! bShow )
// m_pDockSite->ShowControlBar( this, FALSE, FALSE );
// else
// m_pDockSite->ShowControlBar( this, TRUE, FALSE );
if( (! bShow ) && IsVisible()
|| bShow && (! IsVisible() )
)
{
OnFrameBarCheckCmd( true ); // show/hide me
}
GetParentFrame()->RecalcLayout();
break;
}
CRect rcFrameWnd( 0, 0, 0, 0 );
CFrameWnd * pWndFrame = GetParentFrame();
CExtMiniDockFrameWnd * pWndMiniFrame = NULL;
CExtDynControlBar * pDynControlBar = NULL;
if( pWndFrame != NULL )
{
pWndFrame->GetWindowRect( &rcFrameWnd );
pWndMiniFrame = DYNAMIC_DOWNCAST( CExtMiniDockFrameWnd, pWndFrame );
if( pWndMiniFrame != NULL )
{
pWndMiniFrame->ModifyStyle( FWS_SNAPTOBARS, 0 );
CWnd * pWnd = pWndMiniFrame->GetDlgItem( AFX_IDW_DOCKBAR_FLOAT );
if( pWnd != NULL )
{
pWnd = pWnd->GetWindow( GW_CHILD );
if( pWnd != NULL )
pDynControlBar = DYNAMIC_DOWNCAST( CExtDynControlBar, pWnd );
}
}
}
m_bAppearInDockSiteControlBarPopupMenu = true;
OnMoveChildToBar();
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( AutoHideModeGet() )
{
AutoHideModeSet( false, false, true, true );
if( bShow )
OnFrameBarCheckCmd( false ); // show me
} // if( AutoHideModeGet() )
else
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
{
if( bShow )
m_eDBS = eDBS; // for making OnQueryVisibilityInContainerTabs() returning true
if( (! bShow ) && IsVisible()
|| bShow && (! IsVisible() )
)
OnFrameBarCheckCmd( true ); // show/hide me
if( pWndMiniFrame != NULL )
{
CWnd * pWnd = pWndMiniFrame->GetDlgItem( AFX_IDW_DOCKBAR_FLOAT );
if( pWnd != NULL )
{
pWndFrame->MoveWindow( &rcFrameWnd );
pWndMiniFrame->RepositionBars(0, 0xFFFF, AFX_IDW_DOCKBAR_FLOAT );
if( pDynControlBar != NULL )
pDynControlBar->OnRepositionSingleChild();
}
pWndFrame->RecalcLayout();
}
} // else from if( AutoHideModeGet() )
}
break;
case __EDBS_DOCUMENT:
if( OnQueryChildHWND() == NULL )
{
ASSERT( FALSE );
return false;
} // if( OnQueryChildHWND() == NULL )
if( eDUIT == CExtDynamicBarSite::__EDUIT_UNSUPPORTED_ENVIRONMENT )
{
ASSERT( FALSE );
return false;
} // if( OnQueryChildHWND() == NULL )
m_bAppearInDockSiteControlBarPopupMenu = false;
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( AutoHideModeGet() )
AutoHideModeSet( false, false, false, true );
else
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( IsVisible() )
{
OnFrameBarCheckCmd( true ); // hide me
GetParentFrame()->RecalcLayout();
}
if( bShow )
OnMoveChildToDocument();
else
OnMoveChildToBar();
break;
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
case __EDBS_AUTO_HIDDEN:
m_bAppearInDockSiteControlBarPopupMenu = true;
ASSERT( bShow );
if( ! AutoHideModeGet() )
{
OnMoveChildToBar();
if( IsFloating()
|| GetParentFrame() != m_pDockSite
)
{
VERIFY(
DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_LEFT,
false,
m_pDockSite,
false
)
);
}
VERIFY(
AutoHideModeSet(
true,
false,
true,
false
)
);
} // if( ! AutoHideModeGet() )
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
break;
#ifdef _DEBUG
default:
{
ASSERT( FALSE );
}
break;
#endif // _DEBUG
} //switch( eDBS )
m_eDBS = eDBS;
if( bShow )
m_dwAdditionalStateFlags &= ~__EASF_INVISIBLE;
else
m_dwAdditionalStateFlags |= __EASF_INVISIBLE;
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
// if( eDBS != __EDBS_DOCUMENT && eDBS != __EDBS_FLOATING )
if( eDBS == __EDBS_AUTO_HIDDEN )
{
CExtDockDynTabBar * pDynDockBar =
DYNAMIC_DOWNCAST(
CExtDockDynTabBar,
GetParent()
);
if( pDynDockBar != NULL )
{
CExtDynTabControlBar * pTabbedBar =
DYNAMIC_DOWNCAST(
CExtDynTabControlBar,
pDynDockBar->GetParent()
);
LONG nPos, nCount = pTabbedBar->GetSwitcherItemCount();
for( nPos = 0; nPos < nCount; nPos++ )
{
CExtControlBar * pContainedBar = pTabbedBar->GetBarAt( nPos, true );
CExtDynamicControlBar * pDynamicBar = DYNAMIC_DOWNCAST( CExtDynamicControlBar, pContainedBar );
if( pDynamicBar != NULL )
pDynamicBar->m_eDBS = eDBS;
} // for( nPos = 0; nPos < nCount; nPos++ )
} // if( pDynDockBar != NULL )
}
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
return true;
}
|
|
Offer Har
|
May 30, 2010 - 2:21 AM
|
Dear Support, the following strings:
CExtSafeString CExtGridCellBool::g_strTextTrue( _T("True") );
CExtSafeString CExtGridCellBool::g_strTextFalse( _T("False") );
CExtSafeString CExtGridCellBool::g_strTextIndeterminate( _T("Indeterminate") ); Is hard-coded to English - can you please make it be read from your language resource file? I do pass the true & false to my cell, but the indeterminate does not a per-cell value, only the static value, so it’s even more problematic to change it. Thanks, Ron.
|
|
Technical Support
|
Jun 2, 2010 - 9:57 AM
|
The CExtGridCellBool cell was designed as a cell displaying user-defined text instead of True , False and Indeterminate words. Something like Yes , No and Unknown . Or something like New , Old and Mixed . It’s initially similar to the Boolean properties in the Visual Studio .NET / 2005 / 2008 / 2010 Properties window. We can add its texts into Prof-UIS resources, but Prof-UIS resource translation is not a fast process. We can translate only a few languages immediately.
|
|
Offer Har
|
May 26, 2010 - 9:23 AM
|
Dear Support, I need to load my application in a specific language - I use satellite DLLs for the resource and all is fine, but the Prof-UIS texts are in English. How do I changed them? I tried adding these two any in many places in my code, but it did not do any change to the texts:
g_ResourceManager->AllowCustomLang();
g_ResourceManager->SetLangIdDesired(__EXT_MFC_LANG_ID_PORTUGUESE_BRAZILIAN); Is there anything else I should do? Thanks, Ron.
|
|
Offer Har
|
May 30, 2010 - 6:34 AM
|
Dear Support, Everything seems to be working fine now. I have one thing that does not get translation - the system menu, and the tool-tip Close on the ’X’ of a modal dialog and message box Any Idea? Thanks, Ron.
|
|
Technical Support
|
May 26, 2010 - 12:14 PM
|
The resource DLLs should be the MFC extension DLLs and you should load them using the MFC’s AfxLoadLibrary() API. This is required for registering your DLLs inside internal MFC’s data structure chains which are used for resource searching. If you don’t want to convert your DLLs into the MFC extension DLL type, then you can load them using the classic Win32 LoadLibrary() API and then register/unregister them in the Prof-UIS Resource manager using the CExtResourceManager::RscInst_Insert() / CExtResourceManager::RscInst_Remove***() APIs.
|
|
Offer Har
|
May 26, 2010 - 9:43 PM
|
Dear Support, I’m not sure exactly what you mean. I do load my resource DLLs using AfxLoadLibrary , my problem is with resources coming from Prof-UIS which are not translated correctly - the tooltips such as ’Auto Hide’, the word ’Today’ in the calender etc. I understand that by setting the resource manager Prof-UIS should switch to my desired language, but this does not happen, even when I add the above lines. Thanks, Ron.
|
|
Technical Support
|
May 27, 2010 - 10:04 AM
|
We think you encountered a resource identifier collision problem. Prof-UIS uses resource identifiers in the 28000...32000 range. Please check your projects, including plugins, are using resource identifiers which does not intersect with this range.
Additionally, if you set the assigned language identifier to the resource manager, then you should load the plugin resource DLL which contains resources marked with exactly the same language.
|
|
Offer Har
|
May 30, 2010 - 6:34 AM
|
Dear Support, Everything seems to be working fine now. I have one thing that does not get translation - the system menu, and the tool-tip Close on the ’X’ of a modal dialog and message box Any Idea? Thanks, Ron.
|
|
Ulrich Heinicke
|
May 25, 2010 - 2:11 PM
|
Hi, i have a toolbar with text like your example ’FunnyBars’. I insert each button dynamically from single bitmaps. How can i define that RGB(255,0,255) i used for transparent? Thanks Ulrich
|
|
Technical Support
|
May 26, 2010 - 11:47 AM
|
Here is the declaration of the CExtToolControlBar::LoadToolBar() method:
BOOL CExtToolControlBar::LoadToolBar(
__EXT_MFC_SAFE_LPCTSTR lpszResourceName,
COLORREF clrTransparent // = RGB(192,192,192)
)
The RGB(192,192,192) color is used as transparent both in Prof-UIS and MFC. But you can use your preferred color. The COLORREF(-1L) value means do not make any pixels of any color transparent.
|
|
Bernd Lörler
|
May 25, 2010 - 6:40 AM
|
Hello, I’m using Prof-UIS 2.89 with VisualStudio 2005 on Windows XP. I’m new to Prof-UIS and so I don’t know, if I forgot some initializing. I try to implement the CExtFormulaGrid in an ActiveX. I do this by declaring a member in the COleControl derived class. class CProfUisOcxCtrl : public COleControl
{
CExtFormulaGridWnd m_grid; In the OnCreate-Member I create the Formula Grid. int CProfUisOcxCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
if( !m_grid.Create( this ) )
{
return -1;
}
m_grid.DefaultInit( 26, 100 );
return 0;
}
The OnSize member is used to set the grid to the size of the ActiveX void CProfUisOcxCtrl::OnSize(UINT nType, int cx, int cy)
{
COleControl::OnSize(nType, cx, cy);
m_grid.MoveWindow( 0, 0, cx, cy );
} This works, but when I’m in editing mode and click on other cell in the grid, I get an assertion in extedit.h line 509. Can you please help me fixing the problem. Best regards, Bernd
|
|
Bernd Lörler
|
May 25, 2010 - 1:46 PM
|
Thanks for the fast reply. In my projects preprocessor settings __PROF_UIS_FOR_REGULAR_DLL is defined. My InitInstance method looks like this: BOOL CProfUisOcxApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
if (bInit)
{
CExt_ProfUIS_ModuleState::InitExtension( AfxGetStaticModuleState() );
}
return bInit;
}
Did I miss something? Regards
|
|
Bernd Lörler
|
May 25, 2010 - 1:58 PM
|
Thanks for the fast reply. In my projects preprocessor settings __PROF_UIS_FOR_REGULAR_DLL is defined. My InitInstance method looks like this: BOOL CProfUisOcxApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
if (bInit)
{
CExt_ProfUIS_ModuleState::InitExtension( AfxGetStaticModuleState() );
}
return bInit;
}
Did I miss something? Regards
|
|
Technical Support
|
May 26, 2010 - 12:12 PM
|
The initialization code looks OK. Assert line 509 in the ExtEdit.h file is related to a rich editor control subclassed with the CExtEditBase -derived class. The CExtFormulaGridWnd control uses a rich edit control for in-place colorized formula editing. If an MFC project uses a rich editor, then it should invoke the ::AfxInitRichEdit() API in the InitInstance() virtual method of the CWinApp -derived class. Please check this.
|
|
Bernd Lörler
|
May 26, 2010 - 2:54 PM
|
Thanks. This seems to solve the problem.
|
|
Technical Support
|
May 25, 2010 - 9:07 AM
|
|
|
Robert Hofstetter
|
May 25, 2010 - 1:47 AM
|
Could you tell me if the CExtTreeCtrl skinnable? My dialog window has blackdiamond skin and its tree control has black texts on white background. Is it possible to make the tree control to have white texts on the same black gradient background as the dialog? If yes, could you show me some sample code? Thanks
|
|
Technical Support
|
May 25, 2010 - 9:05 AM
|
First of all, you will need to override the CExtTreeCtrl::OnPaintEntireTree() virtual method in your CExtTreeCtrl -derived class:
void C_YOUR_TreeCtrl::OnPaintEntireTree( CDC & dc )
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
CRect rcClient;
GetClientRect( &rcClient );
COLORREF clrTreeBkColor = TreeBkColorGet();
if( clrTreeBkColor == COLORREF(-1L) )
clrTreeBkColor = ::GetSysColor( COLOR_WINDOW );
if( ! PmBridge_GetPM()->PaintDockerBkgnd( true, dc, this ) ) // try to paint themed dialog background first
dc.FillSolidRect( &rcClient, clrTreeBkColor ); // if paint manager does not support it, then paint default background
CFont * pOldFont = dc.SelectObject( &m_fontNormal );
COLORREF clrBackgroundOld = dc.SetBkColor( clrTreeBkColor );
COLORREF clrText = ::GetSysColor( COLOR_BTNTEXT );
COLORREF clrTextOld = dc.SetTextColor( clrText );
int nOldBkMode = dc.SetBkMode( TRANSPARENT );
bool bFocusedWindow = OnQueryWindowFocusedState();
HTREEITEM htiFirst = GetNextItem( NULL, TVGN_FIRSTVISIBLE );
HTREEITEM htiFocus = GetFocusedItem();
HTREEITEM htiDH = GetNextItem( NULL, TVGN_DROPHILITE );
HTREEITEM hti = htiFirst;
for( ; hti != NULL; hti = GetNextItem( hti, TVGN_NEXTVISIBLE ) )
{
bool bDisabledItem = ! OnQueryItemEnabledState( hti );
bool bFocusedItem = ( hti == htiFocus ) ? true : false;
bool bSelectedItem = IsItemSelected( hti );
bool bDH = ( hti == htiDH ) ? true : false;
CRect rcItemEntire;
TreeItemRectGet( hti, rcItemEntire, e_tirt_entire );
if( rcItemEntire.top > rcClient.bottom )
break;
OnPaintTreeItem(
hti,
dc,
rcItemEntire,
bFocusedWindow,
bDisabledItem,
bSelectedItem,
bFocusedItem,
bDH/*,
clrBackground*/
);
dc.SetBkColor( clrTreeBkColor );
dc.SetTextColor( clrText );
}
dc.SetBkMode( nOldBkMode );
dc.SetTextColor( clrTextOld );
dc.SetBkColor( clrBackgroundOld );
dc.SelectObject( pOldFont );
}
This method provides the tree control with the themed dialog background. Second, you should provide all the tree items with the white text color in the normal non-selected state. The CExtTreeCtrl::TREEITEMINFO_t::m_clrTextNormal property of each tree item should be set to the RGB(255,255,255) value. I.e. you should adjust this text color after inserting each tree item.
|
|
Gevork Odabashyan
|
May 25, 2010 - 12:25 AM
|
Dear Technical Support.
In reply on Docking BUG - 5 (May 16, 2010) you wrote:
"Fixed. Please drop us a e-mail to the support mail box at this web site and we will provide you with the source code update."
But currently (May 25, 2010) I’m still waiting the source code update with fixes for the bugs:
Docking BUG -1, Docking BUG -2, Docking BUG -3, Docking BUG -4, Docking BUG -5.
I drop you my e-mail to the support@prof-uis.com 17.05.2010 but has no any response till now.
Can you say you did really fixed the bugs or only write this in replies.
And if so why you cant provide me with updated source code.
|
|
Technical Support
|
May 25, 2010 - 9:02 AM
|
We replied you May 17. It seems the reply was rejected by your email server. We have just forwarded the reply via our gmail account. If you have not received it, please provide some other email address.
|
|
Offer Har
|
May 24, 2010 - 1:18 AM
|
Dear Support, I have a control-bar and the user have the ability from a command menu to enforce this control-bar to be shown, so this is what I do:
CExtControlBar::DoFrameBarCheckCmd(pParent, id, false);
This works fine, unless the control-bar is in Auto-Hide mode - then the application crashes. This is the location in the function:
void CExtControlBar::OnFrameBarCheckCmd(
bool bResizableCheckmarks // = false
)
{
ASSERT_VALID( this );
ASSERT_VALID( m_pDockSite );
ASSERT(ID_VIEW_STATUS_BAR == AFX_IDW_STATUS_BAR);
ASSERT(ID_VIEW_TOOLBAR == AFX_IDW_TOOLBAR);
ASSERT(ID_VIEW_REBAR == AFX_IDW_REBAR);
CFrameWnd * pParentFrame = GetParentFrame();
// if( bResizableCheckmarks // (- v.2.23)
// || IsFixedDockStyle()
// )
bool bVisible = ((GetStyle() & WS_VISIBLE) != 0) ? true : false;
if( IsFixedDockStyle()
|| ( bResizableCheckmarks && bVisible ) // (+ v.2.23)
)
{
m_pDockSite->ShowControlBar(
this,
bVisible ? FALSE : TRUE,
FALSE
);
// SetTimer( __TIMER_ID_DELAYED_UPDATE, 150, NULL );
return;
}
ASSERT( ! IsFixedDockStyle() );
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( AutoHideModeGet() )
{
ASSERT_VALID( m_pDockBar );
ASSERT_KINDOF( CExtDockBar, m_pDockBar ); <<<<<< THIS ASSERT FAILS
CExtDynAutoHideArea * pWndAutoHideArea =
((CExtDockBar*)m_pDockBar)->_GetAutoHideArea(); <<<<<< HERE IT CRASHES
ASSERT_VALID( pWndAutoHideArea );
ASSERT_VALID( pWndAutoHideArea->m_pWndSlider );
if( pWndAutoHideArea->m_pWndSlider->m_bActiveState
&& pWndAutoHideArea->m_pWndSlider->_GetBar() == this
... Please fix. Thanks, Ron.
|
|
Technical Support
|
May 25, 2010 - 1:42 AM
|
Please check the auto-hidden state first. I.e. do not invoke the CFrameWnd::ShowControlBar() API for the auto-hidden bars:
CExtControlBar * pBar = . . .
CMainFrame * pMainFrame = . . .
if( pBar->AutoHideModeGet() )
pBar->AutoHideModeSet( . . . ); // this API can hide the auto-hidden bar
else
pMainFrame->ShowControlBar( pBar, . . . );
|
|
Chun Pong Lau
|
May 23, 2010 - 10:20 PM
|
Dear sir, After initialization, how can I hide/show the CExtTabPageContainerWhidbeyWnd? Regards. Chun Pong
|
|
Technical Support
|
May 27, 2010 - 10:05 AM
|
You created the tab page container window as the main SDI view window because your tab page container uses the standard MFC’s AFX_IDW_PANE_FIRST dialog control identifier. The CFrameWnd window automatically detects its child window with the AFX_IDW_PANE_FIRST dialog control identifier and automatically shows is and positions it into the center area of the frame window. This means you should use some other approach of hiding the tab page container window:
1) You can hide all its pages.
2) Or you can create some CWnd -based window as child of main frame window. This CWnd -based container window should use the AFX_IDW_PANE_FIRST dialog control identifier and the main frame window will automatically reposition it. Then you can created the tab page container window inside the CWnd -based container window. This layout will allow you to hide the tab page container window.
3) You can disable the tab page container window. It will be visible, but user will not be able to work with it.
|
|
Chun Pong Lau
|
May 26, 2010 - 7:08 PM
|
I have created my tab page container under the class CMainFrame public CExtNCW < CFrameWnd >, public CExtDynamicBarSite{} with a member declaration:
CExtTabPageContainerWhidbeyWnd m_TabContainer;
and an initialization in CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
m_TabContainer.Create(this, CRect(0,0,0,0), AFX_IDW_PANE_FIRST));
However, I cannot hide it by CFrameWnd::ShowControlBar(). If it executes:
ShowControlBar((CControlBar*)&m_TabContainer, FALSE, FALSE);
It will crash. Can you please advise?
|
|
Technical Support
|
May 25, 2010 - 1:41 AM
|
A tab page container is just a regular window. You can show or hide it using CWnd::ShowWindow() . However if you create your tab page container inside a control bar, you should show or hide your control bar using the CFrameWnd::ShowControlBar() API. If you create your tab page container inside a dynamic control bar, you can show or hide it using the CExtDynamicControlBar::BarStateSet() .
|
|
Offer Har
|
May 23, 2010 - 7:44 AM
|
Dear Support, We auto-hide a couple of control-bars to one of the sides of the main-frame. When we right-click on the auto-hide area, and not on the tabs of the hidden control-bars we get a list of all the names of the hidden control-bars. However, when choosing any of the items in this menu nothing happen. We need to do one of the two - get rid of this menu, or make it do something. Thanks, Ron.
|
|
Technical Support
|
May 25, 2010 - 1:38 AM
|
The menu item click should display the appropriate control bar from the auto hide tabs area using the sliding animation. This is related both for simple and dynamic control bars. We checked this menu is working OK in the MDIDOCVIEW, SDIDOCVIEW, MDI_DynamicBars and SDI_DynamicBars sample applications. The following lines of code should be present for all your control bars in the message map of the CMainFrame class:
ON_COMMAND_EX( ID_MY_RESIZABLE_CONTROL_BAR, OnBarCheck )
ON_UPDATE_COMMAND_UI( ID_MY_RESIZABLE_CONTROL_BAR, OnUpdateControlBarMenu )
The OnBarCheck() and OnUpdateControlBarMenu() methods are provided by the MFC’s CFrameWnd class. But if you are using Prof-UIS resizable control bars with the auto-hiding feature enabled, then you should redefine the OnBarCheck() and OnUpdateControlBarMenu() methods in your CMainFrame class: void CMainFrame::OnUpdateControlBarMenu(CCmdUI* pCmdUI)
{
CExtControlBar::DoFrameBarCheckUpdate(
this,
pCmdUI,
false
);
}
BOOL CMainFrame::OnBarCheck(UINT nID)
{
return
CExtControlBar::DoFrameBarCheckCmd(
this,
nID,
false
);
}
Please check this.
|
|
Ulrich Heinicke
|
May 22, 2010 - 10:00 AM
|
Hi,
there is a bug using CExtTabMdiWnd in VS2008 with the version 2.89. I have make an example with the wizard in VS2008. When i run the program i can’t seen any MDI-tab. Then i compile the same source with VS2005. There i can see the MDI-tab. I compile the dlls with the ingeration wizard without any changes. You can find the example under www.ibh-software.org/test.zip. Please tell me what’s wrong?
Thanks Ulrich
|
|
Technical Support
|
May 22, 2010 - 11:41 AM
|
Thank you for the test project. Here is how the MDI tabs control is created in it:
if( !m_wndMdiTabs.Create(
this,
CRect( 0, 0, 0, 0 ),
UINT( IDC_STATIC ),
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS,
__ETWS_ORIENT_TOP
|__ETWS_ENABLED_BTN_CLOSE
|__ETWS_SHOW_BTN_CLOSE
)
//PUIS_TABWINDOWFROMDI - $$__PROFUISAPPWIZ_KEY_ADF_MDITABS$$
)
Everything looks like absolutely OK. The standard MFC’s IDC_STATIC constant is used as the dialog control identifier. This constant is the real source of the problem and that is why Prof-UIS uses its own __EXT_MFC_IDC_STATIC constant instead. Here is the technical information: 1) In Visual Studio 2005 and older versions you can use any constant as dialog control identifier of the control bar like window. 2) In Visual Studio 2008 and newer versions you can use any constant but not IDC_STATIC . The status bar like windows created using the IDC_STATIC constant as the dialog control identifier simply does not become repositioned by MFC. Please replace the IDC_STATIC constant in the code snippet above with the __EXT_MFC_IDC_STATIC constant or any else.
|
|
Rado Manzela
|
May 21, 2010 - 8:45 AM
|
I have CExtThemeSwitcherToolControlBar in my SDI frame window. Code looks like this:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CExtNCW < CFrameWnd >::OnCreate(lpCreateStruct) == -1)
return -1;
VERIFY( g_CmdManager->ProfileSetup( strMainProfile, GetSafeHwnd() ) );
VERIFY( g_CmdManager->UpdateFromMenu( strMainProfile, IDR_MAINFRAME ) );
if (!m_wndMenuBar.Create( _T( "Menubar name" ), this, ID_VIEW_MENUBAR)||
!m_wndMenuBar.LoadMenuBar(IDR_MAINFRAME))
return -1;
m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
CMenu *menu = m_wndMenuBar.GetMenu();
if (! m_wndToolBarUiLook.Create( NULL, this, ID_VIEW_UI_LOOK_BAR))
return -1;
if (! m_wndToolBarUiLook.ThemeSwitcherInit()) // this fails
return -1;
CExtToolControlBar::FrameEnableDocking(this);
DockControlBar(&m_wndMenuBar);
// m_wndToolBarUiLook.EnableDocking(CBRS_ALIGN_ANY);
// DockControlBar(&m_wndToolBarUiLook);
RecalcLayout();
return 0;
} It works in debug build, but m_wndToolBarUiLook.ThemeSwitcherInit() fails in release mode. For debug mode I’m usinf MFC and Prof-uis ad unicode DLL, in release mode all libraries are static unicode. I’ve tried it with prof-uis 2.87 with custom prof-uis.h and with original 2.89, both do the same. In other project which is using MBCS static libraries it works. Do you have idea what could be wrong? I’ve tried to debug it with 2.87, it was failing at HINSTANCE hInstResourceCommands =
g_ResourceManager->FindResourceHandle(
RT_TOOLBAR,
nToolBarResourceID,
NULL,
&hRsrcCommands
); with nToolBarResourceID==IDB_EXT_PM_16x16
|
|
Technical Support
|
May 21, 2010 - 12:22 PM
|
Please take a look at any .rc2 file in the res subfolder of any Prof-UIS sample project. You will find lines like these there:
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif
The lines above include Prof-UIS resources into the resources of EXE/DLL modules which are built with Prof-UIS as static library. This lets the Prof-UIS code to load required resources successfully.
|
|
Rado Manzela
|
May 24, 2010 - 2:13 AM
|
|
|
Rado Manzela
|
May 21, 2010 - 6:58 AM
|
I have SDI frame which has no real child view, only dynamic bars. I’ve used some code from your SDI_DynamicBars sample including CChildView from this sample. I’ve created two dynamic bars (containing CExtResizableDialog dialogs). It works except I cannot rearrange bars or make them floating using drag&drop on bar tab, it ignores dragging (only when I switch bar using it’s menu to "dockable" i can only dock it) and it does not display icons used as drop targets to dock the bar. I cannot find any function in documentation how to turn d&d on. Here is the code:
BOOL CSiteFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if(cs.hMenu!=NULL)
{
::DestroyMenu(cs.hMenu); // delete menu if loaded
cs.hMenu = NULL; // no menu for this window
}
if( ! CExtNCW < CFrameWnd > :: PreCreateWindow( cs ) )
return FALSE;
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
cs.lpszClass = AfxRegisterWndClass(0);
return TRUE;
}
int CSiteFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CExtNCW<CFrameWnd>::OnCreate(lpCreateStruct) == -1)
return -1;
if( ! m_wndView.Create(
this,
CRect(0,0,0,0),
AFX_IDW_PANE_FIRST
)
)
{
TRACE0("Failed to create view window\n");
return -1;
}
m_wndView.OrientationSet( __ETWS_ORIENT_TOP );
m_wndView.ShowBtnCloseSet( true );
m_wndView.ItemDraggingSet();
m_wndView.CloseOnTabsSet();
VERIFY(g_CmdManager->ProfileSetup(L"site",GetSafeHwnd()) );
if( ! CExtControlBar::FrameEnableDocking( this ) )
{
ASSERT( FALSE );
return -1;
}
if( ! CExtControlBar::FrameInjectAutoHideAreas( this ) )
{
ASSERT( FALSE );
return -1;
}
CExtDynamicBarSite::Install( this );
CExtCmdIcon icon;
m_pBarMain = CExtDynamicBarSite::BarAlloc(_T("Main"),icon,0,NULL,true);
m_pBarForm = CExtDynamicBarSite::BarAlloc(_T("Form"),icon,0,NULL,true);
ASSERT( m_pBarForm != NULL );
m_wndMain.Create(CSiteMainDlg::IDD,m_pBarMain);
m_wndForm.Create(CSiteFormDlg::IDD,m_pBarForm);
m_pBarForm->BarStateSet(CExtDynamicControlBar::__EDBS_DOCUMENT,true);
m_pBarMain->BarStateSet(CExtDynamicControlBar::__EDBS_DOCUMENT,true);
return 0;
} Is it possible to disable hiding the bar completely? (removing close button in tab, hide menu, etc.) Thank you.
|
|
Rado Manzela
|
May 24, 2010 - 3:45 AM
|
I’ve tried this but there are still dome bugs. - docking markers are still not shown in any theme
- bars in tabbed document mode still shows big red X
- in new office themes when I drag bar from tabbed document state, I can make it only floating and then I can oly move it around screen, it does not let me put in any other state than floating using d&d. In the menu "Dockable" is selected, but I cannot dock it anywhere. But it works in old themes (I can dock it)
- In old themes when I make one bar floating and then paste other bar to first to make floating tabbed bar, the X button appears in title bar again. And when I click it, it does not even hide whole window as it should, but it keeps some empty window only with menu in toolbar available. (but I need to remove the X button completely anyway so I don’t need to solve correct hiding)
- I had to copy extcontrolbartabbedfeatures.h from /src folder to /include . Is it mistake or intention to have it in your /src folder?
Here is my code:
int CSiteFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CExtNCW<CFrameWnd>::OnCreate(lpCreateStruct) == -1)
return -1;
if( ! m_wndView.Create(
this,
CRect(0,0,0,0),
AFX_IDW_PANE_FIRST
)
)
{
TRACE0("Failed to create view window\n");
return -1;
}
m_wndView.OrientationSet( __ETWS_ORIENT_TOP );
m_wndView.ShowBtnCloseSet( true );
m_wndView.ItemDraggingSet();
m_wndView.CloseOnTabsSet();
VERIFY(g_CmdManager->ProfileSetup(L"site",GetSafeHwnd()) );
if( ! CExtControlBar::FrameEnableDocking( this ) )
{
ASSERT( FALSE );
return -1;
}
if( ! CExtControlBar::FrameInjectAutoHideAreas( this ) )
{
ASSERT( FALSE );
return -1;
}
CExtDynamicBarSite::Install( this );
CExtDynamicBarSite::m_bEnableDndDocumentTabs = true;
CExtCmdIcon icon;
// CExtDynamicControlBar *m_pBarMain,*m_pBarForm;
// m_pBarMain = (CExtDynamicControlBar*)CExtDynamicBarSite::BarAlloc(_T("Main"),icon,0,NULL,true);
// m_pBarForm = (CExtDynamicControlBar*)CExtDynamicBarSite::BarAlloc(_T("Form"),icon,0,NULL,true);
m_pBarMain = (CMyDynamicControlBar*)CExtDynamicBarSite::BarAlloc(_T("Main"),icon,0,RUNTIME_CLASS(CMyDynamicControlBar),true);
m_pBarForm = (CMyDynamicControlBar*)CExtDynamicBarSite::BarAlloc(_T("Form"),icon,0,RUNTIME_CLASS(CMyDynamicControlBar),true);
m_scrMain.Create(m_pBarMain,CRect());
m_wndMain.Create(CSiteMainDlg::IDD,&m_scrMain);
m_wndForm.Create(CSiteFormDlg::IDD,m_pBarForm);
m_pBarForm->BarStateSet(CExtDynamicControlBar::__EDBS_DOCUMENT,true);
m_pBarMain->BarStateSet(CExtDynamicControlBar::__EDBS_DOCUMENT,true);
return 0;
}
BOOL CSiteFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
return __super::OnCreateClient(lpcs, pContext);
}
IMPLEMENT_DYNCREATE(CMyDynamicControlBar,CExtDynamicControlBar);
void CMyDynamicControlBar::OnNcAreaButtonsReinitialize()
{
ASSERT_VALID( this );
INT nCountOfNcButtons = NcButtons_GetCount();
if( nCountOfNcButtons > 0 )
return;
// NcButtons_Add( new CExtDynamicBarNcAreaButtonClose(this) );
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
NcButtons_Add( new CExtDynamicBarNcAreaButtonAutoHide(this) );
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
NcButtons_Add( new CExtDynamicBarNcAreaButtonMenu(this) );
}
bool CMyDynamicControlBar::OnInitDbsMenu(
CExtPopupMenuWnd * pPopup,
HWND hWndTrack,
CObject * pHelperSrc,
LPARAM lParamHelper
)
{
bool ret = CExtDynamicControlBar::OnInitDbsMenu(pPopup,hWndTrack,pHelperSrc,lParamHelper);
INT nPosToRemove = pPopup->ItemFindPosForCmdID( 30384 /* ID_EXT_DYN_BAR_HIDE */ );
if (nPosToRemove>=0)
pPopup->ItemRemove(nPosToRemove);
return ret;
}
CExtDynamicTabbedControlBar * CMyDynamicControlBar::OnDbsCreateTabbedBarInstance() const
{
ASSERT( this != NULL );
// CExtDynamicTabbedControlBar * pBar = new CExtDynamicTabbedControlBar;
CMyDynamicTabbedControlBar * pBar = new CMyDynamicTabbedControlBar;
return pBar;
}
IMPLEMENT_DYNCREATE(CMyDynamicTabbedControlBar,CExtDynamicTabbedControlBar);
void CMyDynamicTabbedControlBar::OnNcAreaButtonsReinitialize()
{
ASSERT_VALID( this );
INT nCountOfNcButtons = NcButtons_GetCount();
if( nCountOfNcButtons > 0 )
return;
// NcButtons_Add( new CExtDynamicBarNcAreaButtonClose(this) );
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
NcButtons_Add( new CExtDynamicBarNcAreaButtonAutoHide(this) );
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
NcButtons_Add( new CExtDynamicBarNcAreaButtonMenu(this) );
}
|
|
Technical Support
|
May 25, 2010 - 9:05 AM
|
You can remove the [X]-button from the document tabs using the CExtTabPageContainerWnd::CloseOnTabsSet() method. You can start drag-n-dropping of the document tabs in any theme and appropriate bar is switched into the dockable mode. You can dock it anywhere in any theme. But we fixed one issue related to this feature in the latest Prof-UIS 2.90 pre-release version. So, you may need a source code update. We have several header files in the Src folder. These header files are internal.
|
|
Rado Manzela
|
May 25, 2010 - 3:39 AM
|
I’m sorry, "1. docking markers are still not shown in any theme" was my fault - release build was linked with correct library, but incorrect resources, now this works. But other issues are remaining, plus 4. has the same problem also with new themes
|
|
Technical Support
|
May 21, 2010 - 10:39 AM
|
The tab page container window is created as the main SDI view window in your app currently supports only two item dragging modes:
1) Dragging items inside the tab page container only (CExtTabPageContainerWnd::ItemDraggingSet() ).
2) Dragging a tabbed bar out of the tab page container only (CExtDynamicBarSite::m_bEnableDndDocumentTabs ).
The mixed mode with dragging out of the document tabs, dropping into them and docking markers (guide diamonds) in the center of the document area is in our TO-DO list.
|
|
Rado Manzela
|
May 21, 2010 - 8:54 AM
|
I think problem was that I’ve complied prof-uis 2.87 with #define __EXT_MFC_NO_DOCK_MARKERS Now I’m using complete 2.89 and it works, but there is a bug. When I turn on themes Office2000, Office XP, office 2003, and native XP/Vista/7, when I drag bar out of document mode and release, instead of creating floating bar, the bar disappears.
|
|
Technical Support
|
May 21, 2010 - 12:22 PM
|
Here is how to disable the "x"-button:
http://www.prof-uis.com/prof-uis/tech-support/faq/control-bars.aspx#how-to-remove-the-close-button-x-from-the-control-bar
But in the case of dynamic bars you should use: 1) CExtDynamicControlBar instead of CExtControlBar 2) CExtDynamicTabbedControlBar instead of CExtDynTabControlBar 3) CExtDynamicBarNcAreaButtonClose instead of CExtBarNcAreaButtonClose
You can override the CExtDynamicControlBar::OnInitDbsMenu() virtual method, invoke the parent class method and remove the ID_EXT_DYN_BAR_HIDE menu command. This will disable the Hide menu item.
We confirm the bug with disappeared bars. It’s related to the SDI and tab page container environment only. MDI with/without tabs work OK. To fix it, please update the source code for the following method:
bool CExtDynamicControlBar::OnStartDraggingDocumentTabItem(
CExtTabWnd * pWndTab,
LONG nTabItemIndex
)
{
ASSERT( this != NULL );
ASSERT_VALID( pWndTab );
pWndTab;
nTabItemIndex;
if( ! m_bEnableDndDocumentTabs )
return false;
if( ! _DraggingIsEnabled( this ) )
return true;
CPoint point;
if( ! ::GetCursorPos( &point ) )
return false;
if( ! BarStateSet( __EDBS_DOCKED, false ) )
{
ASSERT( FALSE );
return true;
}
bool bShowContentWhenDragging = _IsShowContentWhenDragging();
CPoint ptFloat( point );
ptFloat.x -= 15;
ptFloat.y -= 45;
ASSERT_VALID( m_pDockSite );
m_pDockSite->ShowControlBar( this, TRUE, TRUE );
FloatControlBar( ptFloat );
GetParentFrame()->RecalcLayout();
OnRepositionSingleChild();
CPoint ptOffset( point );
CRect rcWnd;
GetWindowRect( &rcWnd );
ptOffset -= rcWnd.TopLeft();
_DraggingStart( point, ptOffset );
if( m_pDockSite->GetSafeHwnd() != NULL && ( ! bShowContentWhenDragging ) )
{
ASSERT_VALID( m_pDockSite );
m_pDockSite->ShowControlBar( this, TRUE, FALSE );
}
return true;
}
|
|
Dominik Braendlin
|
May 19, 2010 - 7:28 AM
|
Dear Tech Support, I would like to add a menu to the CExtTabMdiWhidbeyWnd TabCtrl. It should look and feel like the popup menu that shows if I right click on a Visual Studio 2008 file tab (“Save”, “Close”, “Close All But This” and so on). My first approach would be to subclass CExtTabMdiWhidbeyWnd and overwrite the OnTabWndClickedItem methode. Now I was wondering if there is a better way or if there is already an example somewhere. Thanks Adrian
|
|
Technical Support
|
May 20, 2010 - 1:38 PM
|
To override the OnTabWndClickedItem() virtual method is the correct approach. Please note, the CExtTabWnd::TAB_ITEM_INFO::LParamGet() returns the user-defined LPARAM value attached to the tab item in case of simple tab strip control. But MDI tabs are using this LPARAM for storing the HWND handle of the corresponding MDI child frame window.
|
|
tera tera
|
May 19, 2010 - 1:22 AM
|
|
|
Technical Support
|
Jun 19, 2010 - 11:47 AM
|
We tried your test project on Windows XP and Windows 7, 32 and 64 bit. We cannot reproduce the freezing issue. May be the video clip does not contain the exact sequence of actions we should do.
|
|
tera tera
|
May 20, 2010 - 2:23 AM
|
Hello. The response of your answer is bad recently........
Please answer it.
|
|
Technical Support
|
May 20, 2010 - 1:37 PM
|
Could you please re-pack the LZH file. The 7-Zip archive manager cannot open it.
|
|
tera tera
|
May 21, 2010 - 3:25 AM
|
|
|
tera tera
|
Jun 9, 2010 - 6:37 PM
|
I wait for an answer from you. Will this problem be difficult?
I seem to be very likely to be the hook-related bug............ ????
|
|
Dominik Braendlin
|
May 18, 2010 - 12:58 PM
|
Dear Tech Support,<o:p></o:p> I always wondered why I cannot load the Prof-UIS lib sln for VS2008 with a double-click. Changing the part “# Visual Studio Codename Orcas” to “# Visual Studio 2008” in the ProfUISLIB_900.sln file solved the problem.<o:p></o:p> Any reason why this has not been corrected yet?<o:p></o:p> Thanks <o:p></o:p> Adrian
|
|
Technical Support
|
May 22, 2010 - 11:40 AM
|
Fixed. Thank you. The <quot>Codename Orcas</quot> appeared because the Visual Studio 2008 projects were created using the beta version of the Visual Studio 2008 before its final release. You can drop us an e-mail to the support mail box at this web site and we will provide you with the source code update.
|
|
Ulrich Heinicke
|
May 18, 2010 - 12:21 PM
|
Hi, i insert the method OnGbwHoverRecalc like your TestTooltipsOverGridCells example in my GridWnd. In my class i have a pointer to retrieve the cell data from my grid model. For all cells its works fine, but when i want to get the tooltip text from the model in the method OnGbwHoverRecalc i get an exception. The pointer is invalid. Do you have any idea why the pointer is invalid? Thanks Ulrich
|
|
Ulrich Heinicke
|
May 18, 2010 - 1:57 PM
|
Hi, i find the mistake. Thanks Ulrich
|
|
Dominik Braendlin
|
May 18, 2010 - 7:33 AM
|
Dear Tech Support, I create a CExtButton with Create( … ) in a parent window. The parent window needs to know when the CExtButton receives the focus. In order to do so I added the ON_BN_SETFOCUS event to get notified. It seems as if the CExtButton does not send the ON_BN_SETFOCUS message to it’s parent window. I have checked the CExtButton implementation and saw that there is a SetFocus commented out v2.89 void CExtButton::OnLButtonDown(UINT nFlags, CPoint point) Ln 1752 Thanks Adrian
|
|
Technical Support
|
May 18, 2010 - 11:54 AM
|
The BN_SETFOCUS / BN_KILLFOCUS notifications are sent only if the button control has the standard BS_NOTIFY button style. Please check whether your button control has this style.
|
|
Rado Manzela
|
May 18, 2010 - 6:45 AM
|
I’m starting new project and I need just quick advice which prof-uis classes are best to use. Program will have main window which contains some tabs filling whole area. Each tab should contain some dialog content. Is it good idea to use CExtResizableDialog for main window and all dialogs inside tab?
Or is it better to start SDI project with main frame containing one child (CExtTabPageContainerWnd) where each child dialog would be derived from public CExtWA < CExtWS < CExtAFV < CFormView > > > ?
Some dialogs will contain grids and other controls which should resize with changing of main window size (making the window BIGGER than defined in resources). But some dialogs can be quite long so when it cannot fit into current window size (window is smaller than dialog defined in resources) there should be scroll bars to access whole dialog. Is this even possible to do in prof-uis? Thank you.
|
|
Technical Support
|
May 18, 2010 - 11:52 AM
|
We would prefer to use the SDI project style with the CExtTabPageContainerWnd window created as the main SDI view window using the AFX_IDW_PANE_FIRST dialog control identifier. You can create and insert the CExtResizableDialog windows as tab pages. These dialog should have child / resizable / visible type and both clip siblings / clip children options set on in the dialog template resource’s properties. If you need some or all the dialogs to be automatically scrollable when the tab page size is less than the initial dialog size, then such tab pages should be created using two windows:
- First is the CExtScrollContainerWnd scrollable container window. You should create it with the WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS styles. It should be created as child of the CExtTabPageContainerWnd window.
- Then you should create the CExtResizableDialog dialog window as child of the CExtScrollContainerWnd window.
- Finally, you should register the CExtScrollContainerWnd window as tab page using the CExtTabPageContainerWnd::PageInsert() method.
We recommend you to use the WS_CLIPCHILDREN|WS_CLIPSIBLINGS window styles everywhere inside the main frame window, including the CExtTabPageContainerWnd window.
|
|
Rado Manzela
|
May 19, 2010 - 1:49 AM
|
Thank you very much for advice.
|
|