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 |
|
Raffaele Cappelli
|
Feb 13, 2006 - 2:14 AM
|
I may have incurred in a small resizing bug of CExtMiniDockFrameWnd, which seems to happen when a floating toolbar has a width larger than _mp.m_rcWorkArea.Width in CExtMiniDockFrameWnd::OnSize. It can be reproduced as follows (e.g. starting from the MDI sample): 1) add buttons to make the toolbar very large: for (int k=0;k<10;k++) m_wndToolBar2.InsertButton(-1,ID_VIEW_LIKE_STUDIO_2005); 2) move the floating toolbar to the left so that most of it is outside the left border of the screen 3) drag its right border to make it layout as a single row. The final result should be similar to this screenshot: http://www.babaschess.net/tmp/toolbar_bug.png The problem seems to be caused by a WM_SIZE with a (probably) negative height (which is interpreted as a very large height) being sent to CExtMiniDockFrameWnd while it is already processing a WM_SIZE (this second WM_SIZE seems to be originated from the MoveWindow(&rcWnd) call inside the CExtMiniDockFrameWnd::OnSize handler, but I was not able to debug it better.
|
|
Technical Support
|
Feb 14, 2006 - 4:17 AM
|
Thank you for the bug report. We fixed this bug. Please contact us by e-mail so we can tell you how to download a bug-free update if you need it right now.
|
|
George Ross
|
Feb 12, 2006 - 8:48 AM
|
Hi when try to compile a project (which compiles and links fine when MCBS) i got a lot of linker errors. No matter if it is debug or release. I have rebuild all the profuis libraries both static and dll. Behaviour is the same with dll and static lib. ****************this is to see what profuis version i use************
WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
Prof-UIS multiple monitor support:
external
Automatically linking with Prof-UIS library: ProfUIS251su.lib
(Professional User Interface Suite)
Prof-UIS native unicode character type support:
disabled (symbol __EXT_MFC_ENABLE_TEMPLATED_CHARS is not defined)
*********************************
these are the linker errors
DlgPanelQSO.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CExtControlBar::OnGetBarCaptionText(enum CExtControlBar::e_bar_caption_text_t,class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > &)const " (?OnGetBarCaptionText@CExtControlBar@@UBEXW4e_bar_caption_text_t@1@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
DlgPanelQSO.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CExtControlBar::OnAdvancedPopupMenuTipWndDisplay(class CExtPopupMenuTipWnd &,struct tagRECT const &,wchar_t const *)const " (?OnAdvancedPopupMenuTipWndDisplay@CExtControlBar@@MBEXAAVCExtPopupMenuTipWnd@@ABUtagRECT@@PB_W@Z)
DlgPanelQSO.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CExtControlBar::Create(wchar_t const *,class CWnd *,unsigned int,unsigned long)" (?Create@CExtControlBar@@UAEHPB_WPAVCWnd@@IK@Z)
DlgPanelQSO.obj : error LNK2019: unresolved external symbol "public: int __thiscall CExtToolControlBar::LoadToolBar(wchar_t const *,unsigned long)" (?LoadToolBar@CExtToolControlBar@@QAEHPB_WK@Z) referenced in function "public: int __thiscall CExtToolControlBar::LoadToolBar(unsigned int,unsigned long)" (?LoadToolBar@CExtToolControlBar@@QAEHIK@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CExtToolControlBar::LoadToolBar(wchar_t const *,unsigned long)" (?LoadToolBar@CExtToolControlBar@@QAEHPB_WK@Z)
DlgPanelQSO.obj : error LNK2001: unresolved external symbol "public: virtual wchar_t const * __thiscall CExtResizableDialog::OnQuerySkinnedFontParmName(void)const " (?OnQuerySkinnedFontParmName@CExtResizableDialog@@UBEPB_WXZ)
DlgPanelQSO.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CExtResDlg::Create(wchar_t const *,class CWnd *)" (?Create@CExtResDlg@@UAEHPB_WPAVCWnd@@@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CExtTabWnd::OnAdvancedPopupMenuTipWndDisplay(class CExtPopupMenuTipWnd &,struct tagRECT const &,wchar_t const *)const " (?OnAdvancedPopupMenuTipWndDisplay@CExtTabWnd@@MBEXAAVCExtPopupMenuTipWnd@@ABUtagRECT@@PB_W@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CExtTabWhidbeyWnd::OnTabWndDrawItem(class CDC &,class CRect &,long,class CExtTabWnd::TAB_ITEM_INFO *,bool,bool,bool,bool,bool,bool,bool,class CRect const &,class CSize,class CFont *,wchar_t const *,class CExtCmdIcon *)" (?OnTabWndDrawItem@CExtTabWhidbeyWnd@@MAEXAAVCDC@@AAVCRect@@JPAVTAB_ITEM_INFO@CExtTabWnd@@_N333333ABV3@VCSize@@PAVCFont@@PB_WPAVCExtCmdIcon@@@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "protected: virtual wchar_t const * __thiscall CExtTabWnd::OnTabWndQueryItemTooltipText(class CExtTabWnd::TAB_ITEM_INFO const *)const " (?OnTabWndQueryItemTooltipText@CExtTabWnd@@MBEPB_WPBVTAB_ITEM_INFO@1@@Z)
MainFrm.obj : error LNK2019: unresolved external symbol "public: class CExtTabWnd::TAB_ITEM_INFO * __thiscall CExtTabWnd::ItemInsert(wchar_t const *,struct HICON__ *,bool,unsigned long,long,long,bool)" (?ItemInsert@CExtTabWnd@@QAEPAVTAB_ITEM_INFO@1@PB_WPAUHICON__@@_NKJJ2@Z) referenced in function "protected: virtual void __thiscall CExtTMWI<class CExtTabWhidbeyWnd>::_SyncAllItems(void)" (?_SyncAllItems@?$CExtTMWI@VCExtTabWhidbeyWnd@@@@MAEXXZ)
MainFrm.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CExtCmdManager::SerializeState(wchar_t const *,wchar_t const *,wchar_t const *,bool,struct HKEY__ *,bool)" (?SerializeState@CExtCmdManager@@QAE_NPB_W00_NPAUHKEY__@@1@Z) referenced in function "public: virtual int __thiscall CMainFrame::DestroyWindow(void)" (?DestroyWindow@CMainFrame@@UAEHXZ)
MainFrm.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl CExtControlBar::ProfileBarStateSave(class CFrameWnd *,wchar_t const *,wchar_t const *,wchar_t const *,struct tagWINDOWPLACEMENT *,bool,bool,struct HKEY__ *,bool)" (?ProfileBarStateSave@CExtControlBar@@SA_NPAVCFrameWnd@@PB_W11PAUtagWINDOWPLACEMENT@@_N3PAUHKEY__@@3@Z) referenced in function "public: virtual int __thiscall CMainFrame::DestroyWindow(void)" (?DestroyWindow@CMainFrame@@UAEHXZ)
MainFrm.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl CExtControlBar::ProfileBarStateLoad(class CFrameWnd *,wchar_t const *,wchar_t const *,wchar_t const *,struct tagWINDOWPLACEMENT *,bool,bool,struct HKEY__ *,bool)" (?ProfileBarStateLoad@CExtControlBar@@SA_NPAVCFrameWnd@@PB_W11PAUtagWINDOWPLACEMENT@@_N3PAUHKEY__@@3@Z) referenced in function "protected: void __thiscall CMainFrame::OpenProfile(class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (?OpenProfile@CMainFrame@@IAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
MainFrm.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CExtCmdManager::UpdateFromToolBar(wchar_t const *,unsigned int,unsigned int * *,int *,bool,bool,unsigned long)" (?UpdateFromToolBar@CExtCmdManager@@QAE_NPB_WIPAPAIPAH_N3K@Z) referenced in function "protected: void __thiscall CMainFrame::OpenProfile(class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (?OpenProfile@CMainFrame@@IAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
MainFrm.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CExtCmdManager::UpdateFromMenu(wchar_t const *,unsigned int,bool,bool)" (?UpdateFromMenu@CExtCmdManager@@QAE_NPB_WI_N1@Z) referenced in function "protected: void __thiscall CMainFrame::OpenProfile(class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (?OpenProfile@CMainFrame@@IAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
MainFrm.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CExtCmdManager::ProfileSetup(wchar_t const *,struct HWND__ *,class CExtCmdProfile *)" (?ProfileSetup@CExtCmdManager@@QAE_NPB_WPAUHWND__@@PAVCExtCmdProfile@@@Z) referenced in function "protected: void __thiscall CMainFrame::OpenProfile(class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (?OpenProfile@CMainFrame@@IAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
MainFrm.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CExtCmdManager::CmdSetIcon(wchar_t const *,unsigned int,struct HICON__ *,bool)" (?CmdSetIcon@CExtCmdManager@@QAE_NPB_WIPAUHICON__@@_N@Z) referenced in function "protected: int __thiscall CMainFrame::OnCreate(struct tagCREATESTRUCTW *)" (?OnCreate@CMainFrame@@IAEHPAUtagCREATESTRUCTW@@@Z)
MainFrm.obj : error LNK2019: unresolved external symbol "public: wchar_t const * __thiscall CExtCmdManager::ProfileNameFromWnd(struct HWND__ *)" (?ProfileNameFromWnd@CExtCmdManager@@QAEPB_WPAUHWND__@@@Z) referenced in function "protected: int __thiscall CMainFrame::OnCreate(struct tagCREATESTRUCTW *)" (?OnCreate@CMainFrame@@IAEHPAUtagCREATESTRUCTW@@@Z)
MapProperties.obj : error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __thiscall CExtPropertyValue::BuildCompoundTextActive(void)const " (?BuildCompoundTextActive@CExtPropertyValue@@UBE?AV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@XZ)
MapProperties.obj : error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __thiscall CExtPropertyValue::BuildCompoundTextDefault(void)const " (?BuildCompoundTextDefault@CExtPropertyValue@@UBE?AV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@XZ)
MapProperties.obj : error LNK2001: unresolved external symbol "public: virtual class CExtPropertyItem * __thiscall CExtPropertyItem::ItemGetByName(wchar_t const *,int &,struct CRuntimeClass *)" (?ItemGetByName@CExtPropertyItem@@UAEPAV1@PB_WAAHPAUCRuntimeClass@@@Z)
MapProperties.obj : error LNK2001: unresolved external symbol "public: virtual wchar_t const * __thiscall CExtPropertyItem::DescriptionGet(void)const " (?DescriptionGet@CExtPropertyItem@@UBEPB_WXZ)
MapProperties.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CExtPropertyItem::NameSet(wchar_t const *)" (?NameSet@CExtPropertyItem@@UAEXPB_W@Z)
MapProperties.obj : error LNK2001: unresolved external symbol "public: virtual wchar_t const * __thiscall CExtPropertyItem::NameGet(void)const " (?NameGet@CExtPropertyItem@@UBEPB_WXZ)
MapProperties.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall CExtPropertyItem::DescriptionSet(wchar_t const *)" (?DescriptionSet@CExtPropertyItem@@UAEXPB_W@Z) referenced in function "public: __thiscall MAPPROPERTIES::CMapProperty_VectorRoad::CMapProperty_VectorRoad(class ShapeFiles::ShapeArc *,class ViewMap *)" (??0CMapProperty_VectorRoad@MAPPROPERTIES@@QAE@PAVShapeArc@ShapeFiles@@PAVViewMap@@@Z)
MapProperties.obj : error LNK2019: unresolved external symbol "public: __thiscall CExtPropertyValue::CExtPropertyValue(wchar_t const *,class CExtGridCell *,class CExtGridCell *,bool,bool)" (??0CExtPropertyValue@@QAE@PB_WPAVCExtGridCell@@1_N2@Z) referenced in function "public: __thiscall MAPPROPERTIES::CMapProperty_VectorRoad::CMapProperty_VectorRoad(class ShapeFiles::ShapeArc *,class ViewMap *)" (??0CMapProperty_VectorRoad@MAPPROPERTIES@@QAE@PAVShapeArc@ShapeFiles@@PAVViewMap@@@Z)
MapProperties.obj : error LNK2019: unresolved external symbol "public: long __thiscall CExtGridCellComboBox::InsertString(wchar_t const *,unsigned long,long)" (?InsertString@CExtGridCellComboBox@@QAEJPB_WKJ@Z) referenced in function "public: __thiscall MAPPROPERTIES::CMapProperty_Label::CMapProperty_Label(class ShapeFiles::ShapeArc *,class ViewMap *)" (??0CMapProperty_Label@MAPPROPERTIES@@QAE@PAVShapeArc@ShapeFiles@@PAVViewMap@@@Z)
MapProperties.obj : error LNK2019: unresolved external symbol "public: __thiscall CExtPropertyStore::CExtPropertyStore(wchar_t const *)" (??0CExtPropertyStore@@QAE@PB_W@Z) referenced in function "public: class CExtPropertyStore * __thiscall MAPPROPERTIES::MapProperties::GetPropertyStore(void)" (?GetPropertyStore@MapProperties@MAPPROPERTIES@@QAEPAVCExtPropertyStore@@XZ)
MapProperties.obj : error LNK2019: unresolved external symbol "public: __thiscall CExtPropertyCategory::CExtPropertyCategory(wchar_t const *)" (??0CExtPropertyCategory@@QAE@PB_W@Z) referenced in function "public: virtual void __thiscall MAPPROPERTIES::MainLayerMapProperties::IniProperties(class Maps *,class MapDetailsBase *,wchar_t const *)" (?IniProperties@MainLayerMapProperties@MAPPROPERTIES@@UAEXPAVMaps@@PAVMapDetailsBase@@PB_W@Z)
ViewPacketFrame.obj : error LNK2019: unresolved external symbol "public: int __thiscall CExtTabPageContainerWnd::PageInsert(class CWnd *,wchar_t const *,struct HICON__ *,bool,int,bool)" (?PageInsert@CExtTabPageContainerWnd@@QAEHPAVCWnd@@PB_WPAUHICON__@@_NH3@Z) referenced in function "public: int __thiscall ViewPacketFrame::OnCreate(struct tagCREATESTRUCTW *)" (?OnCreate@ViewPacketFrame@@QAEHPAUtagCREATESTRUCTW@@@Z)
Release/AGWDXCenter.exe : fatal error LNK1120: 30 unresolved externals
Thanks in advance for any help
George
|
|
Technical Support
|
Feb 12, 2006 - 11:33 AM
|
The error output looks like you are trying to link your project with Prof-UIS 2.20 instead of 2.51. There must be some error like an invalid library path in the library folders list of the Visual Studio settings. Did you manage to build UNICODE versions of Prof-UIS samples?
|
|
Raffaele Cappelli
|
Feb 10, 2006 - 9:37 AM
|
I have noted what may be a small bug: if you let Prof-UIS CExtMenuControlBar replace both the MDI frame system menu and the MDI child frame system menu, the accelerator associated to the SC_CLOSE command (displayed in the menu) is Alt+F4 in both the menus if you open the frame menu first, or Ctrl+F4 in both if you open the child system menu first. This may be due to the fact that the two commands have the same id but different accelerators, or maybe I am doing something wrong.
|
|
Technical Support
|
Feb 11, 2006 - 1:04 PM
|
Thank you for the bug report. We fixed the bug in the CExtPopupMenuWnd::_TrackPopupMenu() method (the ExtPopupMenuWnd.cpp file): BOOL CExtPopupMenuWnd::_TrackPopupMenu(
DWORD dwTrackFlags,
int x,
int y,
LPCRECT lpRect,
LPVOID pCbPaintCombinedCookie, // = NULL
pCbPaintCombinedContent pCbPCC, // = NULL
bool bCookieIsObject // = false
)
{
ASSERT_VALID( this );
bool bForceExpandRarelyUsed = (dwTrackFlags&TPMX_NO_HIDE_RARELY)
? true : false;
if( ! g_bMenuExpanding )
bForceExpandRarelyUsed = true;
ASSERT( m_hWndCmdReceiver != NULL );
ASSERT( ::IsWindow(m_hWndCmdReceiver) );
ASSERT( GetSafeHwnd() == NULL );
CExtPopupMenuSite & _site = GetSite();
if( (!_FindCustomizeMode())
&& _site.IsTopPopup(this)
)
{
ASSERT( m_bTopLevel );
MsgPrepareMenuData_t _mpmEntireTree( this );
_mpmEntireTree.SendMessage( m_hWndCmdReceiver, false );
if( _mpmEntireTree.m_bMenuCanceled )
return FALSE;
if( _mpmEntireTree.m_bMenuChanged )
{
_SyncItems();
_UpdateCmdUI();
}
ASSERT( m_bTopLevel );
ASSERT( _site.IsTopPopup(this) );
}
MsgPrepareMenuData_t _mpmOneTreeLevel( this );
_mpmOneTreeLevel.SendMessage( m_hWndCmdReceiver, true );
if( _mpmOneTreeLevel.m_bMenuCanceled )
return FALSE;
if( _mpmOneTreeLevel.m_bMenuChanged )
{
_SyncItems();
_UpdateCmdUI();
}
if( !_FindCustomizeMode() )
{ // BLOCK: update system commands
INT iter = 0;
for(; iter < m_items_all.GetSize(); ++iter )
{
MENUITEMDATA & mi = ItemGetInfo( iter );
if( mi.IsSeparator() )
continue;
UINT nCmdID = mi.GetCmdID();
if( ! CExtCmdManager::IsSystemCommand( nCmdID ) )
continue;
WINDOWPLACEMENT wndpl;
::memset(&wndpl,0,sizeof(WINDOWPLACEMENT));
wndpl.length = sizeof(WINDOWPLACEMENT);
VERIFY(
::GetWindowPlacement(
mi.GetCmdReceiver(),
&wndpl
)
);
DWORD dwWndStyle = (DWORD)
::GetWindowLong(
mi.GetCmdReceiver(),
GWL_STYLE
);
DWORD dwWndExStyle = (DWORD)
::GetWindowLong(
mi.GetCmdReceiver(),
GWL_EXSTYLE
);
bool bSysCmdEnabled = false;
switch( nCmdID )
{
case SC_CLOSE:
{
bSysCmdEnabled = true;
HMENU hSysMenu = ::GetSystemMenu( mi.GetCmdReceiver(), FALSE );
MENUITEMINFO _mii;
::memset( &_mii, 0, sizeof(MENUITEMINFO) );
_mii.cbSize = sizeof(MENUITEMINFO);
_mii.fMask = MIIM_STATE;
if( hSysMenu != NULL
&& ::GetMenuItemInfo(
hSysMenu,
SC_CLOSE,
FALSE,
&_mii
)
)
{
if( (_mii.fState & MFS_DISABLED) != 0 )
bSysCmdEnabled = false;
} // if( hSysMenu != NULL ...
}
break;
case SC_SIZE:
case SC_MOVE:
if( wndpl.showCmd != SW_SHOWMINIMIZED
&& wndpl.showCmd != SW_SHOWMAXIMIZED
&& !g_bFullScreenMode
)
bSysCmdEnabled = true;
break;
case SC_MINIMIZE:
if( (dwWndStyle & WS_MINIMIZEBOX) != 0
&& wndpl.showCmd != SW_SHOWMINIMIZED
)
bSysCmdEnabled = true;
break;
case SC_MAXIMIZE:
if( (dwWndStyle & WS_MAXIMIZEBOX) != 0
&& wndpl.showCmd != SW_SHOWMAXIMIZED
&& !g_bFullScreenMode
)
bSysCmdEnabled = true;
break;
case SC_RESTORE:
if( (dwWndStyle & (WS_MINIMIZEBOX|WS_MAXIMIZEBOX)) != 0
&& ( wndpl.showCmd == SW_SHOWMAXIMIZED
|| wndpl.showCmd == SW_SHOWMINIMIZED
//||wndpl.showCmd == SW_SHOWNORMAL
)
)
bSysCmdEnabled = true;
break;
case SC_CONTEXTHELP:
if( (dwWndExStyle & WS_EX_CONTEXTHELP) != 0 )
bSysCmdEnabled = true;
break;
case SC_HOTKEY:
default:
continue;
} // switch( nCmdID )
CExtCmdItem * pCmdItem =
g_CmdManager->CmdGetPtr(
g_CmdManager->ProfileNameFromWnd( m_hWndCmdReceiver ),
nCmdID
);
ASSERT( pCmdItem != NULL );
pCmdItem->StateEnable( bSysCmdEnabled );
mi.Enable( bSysCmdEnabled );
ASSERT( CExtCmdManager::IsSystemCommand( nCmdID ) );
HMENU hSysMenu = ::GetSystemMenu( mi.GetCmdReceiver(), FALSE );
if( hSysMenu != NULL )
{
MENUITEMINFO _mii;
::memset( &_mii, 0, sizeof(MENUITEMINFO) );
_mii.cbSize = sizeof(MENUITEMINFO);
_mii.fMask =
MIIM_CHECKMARKS|MIIM_DATA|MIIM_ID|MIIM_STATE
|MIIM_SUBMENU|MIIM_TYPE;
_mii.cch = __MAX_UI_ITEM_TEXT;
CExtSafeString sMenuItemText;
_mii.dwTypeData = sMenuItemText.GetBuffer( __MAX_UI_ITEM_TEXT );
ASSERT( _mii.dwTypeData != NULL );
if( _mii.dwTypeData != NULL )
{
if( ::GetMenuItemInfo(
hSysMenu,
nCmdID,
FALSE,
&_mii
)
)
{
sMenuItemText.ReleaseBuffer();
sMenuItemText.Replace( _T("\n"), _T("") );
sMenuItemText.Replace( _T("\r"), _T("") );
sMenuItemText.TrimLeft();
sMenuItemText.TrimRight();
if( ! sMenuItemText.IsEmpty() )
{
int nSep =
sMenuItemText.ReverseFind( _T(’\t’) );
if( nSep >= 0 )
{
int nLen = sMenuItemText.GetLength();
pCmdItem->m_sAccelText = sMenuItemText.Right( nLen - nSep );
pCmdItem->m_sAccelText.TrimLeft();
pCmdItem->m_sAccelText.TrimRight();
pCmdItem->m_sMenuText = sMenuItemText.Left( nSep );
pCmdItem->m_sMenuText.TrimLeft();
pCmdItem->m_sMenuText.TrimRight();
}
else
{
pCmdItem->m_sMenuText = sMenuItemText;
pCmdItem->m_sAccelText = _T("");
}
mi.SetPopupText( pCmdItem->m_sMenuText );
mi.SetAccelText( pCmdItem->m_sAccelText );
} // if( ! sMenuItemText.IsEmpty() )
}
else
sMenuItemText.ReleaseBuffer();
} // if( _mii.dwTypeData != NULL )
if( (_mii.fState&MFS_DEFAULT) != 0 )
mi.SetDefault();
} // if( hSysMenu != NULL )
} // for(; iter < m_items_all.end(); ++iter )
} // BLOCK: update system commands
CWnd * pWndCmdReceiver =
CWnd::FromHandle( m_hWndCmdReceiver );
ASSERT_VALID( pWndCmdReceiver );
bool bOldTopLevel = m_bTopLevel;
bool bOldExpandAvailable = m_bExpandAvailable;
DWORD dwPortedTrackFlags = m_dwTrackFlags&(TPMX_PALETTE|TPMX_PALETTE_TB_BKGND);
_Init();
m_bTopLevel = bOldTopLevel;
m_bExpandAvailable = bOldExpandAvailable;
m_dwTrackFlags = dwTrackFlags | dwPortedTrackFlags;
m_pCbPaintCombinedCookie = pCbPaintCombinedCookie;
m_pCbPaintCombinedContent = pCbPCC;
m_bCookieIsObject = bCookieIsObject;
if( !m_bTopLevel )
{
ASSERT( m_pWndParentMenu != NULL );
if( m_pWndParentMenu->m_bExpandWasPressed )
{
if( m_bExpandAvailable )
{
m_bExpandAvailable = false;
m_bExpandWasPressed = true;
_SyncItems();
}
else
m_bExpandWasPressed = true;
}
} // if( !m_bTopLevel )
else
{
if( bForceExpandRarelyUsed )
{
if( m_bExpandAvailable )
{
m_bExpandAvailable = false;
m_bExpandWasPressed = true;
_SyncItems();
}
else
m_bExpandWasPressed = true;
} // if( bForceExpandRarelyUsed )
else
_SyncItems();
} // else from if( !m_bTopLevel )
// adjust screen position
m_ptTrack.x = x;
m_ptTrack.y = y;
if( m_ptTrack.x < 0 || m_ptTrack.y < 0 )
{
if( ! ::GetCursorPos(&m_ptTrack) )
return FALSE;
}
if( lpRect != NULL )
{
m_rcExcludeArea = *lpRect;
m_bExcludeAreaSpec = true;
}
else
{
m_bExcludeAreaSpec = false;
m_rcExcludeArea.left = m_ptTrack.x - __EXCLUDE_AREA_GAP_DX;
m_rcExcludeArea.right = m_ptTrack.x + __EXCLUDE_AREA_GAP_DX;
m_rcExcludeArea.top = m_ptTrack.y - __EXCLUDE_AREA_GAP_DY;
m_rcExcludeArea.bottom = m_ptTrack.y + __EXCLUDE_AREA_GAP_DY;
}
m_bCombineWithEA = false;
if( m_bExcludeAreaSpec )
{
switch( (dwTrackFlags&TPMX_COMBINE_MASK) )
{
case TPMX_COMBINE_ANY_SUITABLE:
m_bCombineWithEA = true;
break;
case TPMX_COMBINE_DEFAULT:
m_bCombineWithEA =
PmBridge_GetPM()->
IsMenuMustCombineExcludeArea();
break;
} // switch( (dwTrackFlags&TPMX_COMBINE_MASK) )
} // if( m_bExcludeAreaSpec )
CSize _size = _CalcTrackSize();
bool bPointAdjusted = true;
if( m_bExcludeAreaSpec )
{
bool bRTL = OnQueryLayoutRTL();
if( bRTL && (!m_bTopLevel) )
{
CExtPopupMenuWnd * pTop = m_pWndParentMenu;
for( ; pTop != NULL; pTop = pTop->m_pWndParentMenu )
{
if( pTop->m_bTopLevel )
break;
} // for( ; pTop != NULL; pTop = pTop->m_pWndParentMenu )
if( pTop != NULL )
{
switch( (pTop->m_dwTrackFlags & TPMX_ALIGN_MASK) )
{
case TPMX_TOPALIGN:
case TPMX_BOTTOMALIGN:
m_dwTrackFlags &= ~(TPMX_ALIGN_MASK);
m_dwTrackFlags |= TPMX_RIGHTALIGN;
break;
} // switch( (pTop->m_dwTrackFlags & TPMX_ALIGN_MASK) )
} // if( pTop != NULL )
} // if( bRTL && (!m_bTopLevel) )
switch( (m_dwTrackFlags & TPMX_ALIGN_MASK) )
{
case TPMX_LEFTALIGN:
m_ptTrack.x = m_rcExcludeArea.right;
m_ptTrack.y = m_rcExcludeArea.top;
break;
case TPMX_RIGHTALIGN:
m_ptTrack.x = m_rcExcludeArea.left - _size.cx;
m_ptTrack.y = m_rcExcludeArea.top;
break;
case TPMX_TOPALIGN:
m_ptTrack.x = m_rcExcludeArea.left;
m_ptTrack.y = m_rcExcludeArea.bottom;
break;
case TPMX_BOTTOMALIGN:
m_ptTrack.x = m_rcExcludeArea.left;
m_ptTrack.y = m_rcExcludeArea.top - _size.cy;
break;
default:
bPointAdjusted = false;
break;
} // switch( (m_dwTrackFlags & TPMX_ALIGN_MASK) )
} // if( m_bExcludeAreaSpec )
if( ! bPointAdjusted )
{
if( (m_dwTrackFlags & TPMX_ALIGN_MASK) == TPMX_RIGHTALIGN )
m_ptTrack.x -= _size.cx;
else
{
if( (m_dwTrackFlags & TPMX_ALIGN_MASK) == TPMX_CENTERALIGN )
m_ptTrack.x -= _size.cx/2;
}
if( (m_dwTrackFlags & TPMX_ALIGN_MASK) == TPMX_BOTTOMALIGN )
m_ptTrack.y -= _size.cy;
else
{
if( (m_dwTrackFlags & TPMX_ALIGN_MASK) == TPMX_VCENTERALIGN )
m_ptTrack.y -= _size.cy/2;
}
} // if( !bPointAdjusted )
bool bCreateResult =
_CreateHelper( pWndCmdReceiver );
if( !bCreateResult )
return FALSE;
if( dwTrackFlags & TPMX_SELECT_ANY )
{
int nItem = _GetNextItem(__NI_ANY);
if( nItem >= 0 )
{
HWND hWndOwn = m_hWnd;
_ItemFocusSet(
nItem,
FALSE,
FALSE
);
if( ! ::IsWindow( hWndOwn ) )
return FALSE;
}
}
HWND hWndOwn = m_hWnd;
if( (dwTrackFlags&TPMX_FORCE_NO_ANIMATION) != 0
|| _FindCustomizeMode()
)
m_AnimationType = __AT_NONE;
else
{
m_AnimationType = g_DefAnimationType;
if( CExtToolControlBar::g_bMenuTracking )
m_AnimationType = __AT_NONE;
m_ePlaySoundOnAnimationFinished =
CExtSoundPlayer::__ON_MENU_POPUP_DISPLAYED;
_StartAnimation();
if( ! ::IsWindow( hWndOwn ) )
return FALSE;
} // if( _FindCustomizeMode() )
if( m_AnimationType == __AT_NONE )
{
m_AnimationType = __AT_CONTENT_DISPLAY;
_StartAnimation();
if( ! ::IsWindow( hWndOwn ) )
return FALSE;
ASSERT( m_AnimationType == __AT_CONTENT_DISPLAY );
}
if( m_rgnWnd.GetSafeHandle() != NULL )
{
ASSERT( m_bExcludeAreaSpec );
ASSERT( m_bCombineWithEA );
ASSERT( m_eCombineAlign != __CMBA_NONE );
CRgn rgnTmp;
VERIFY( rgnTmp.CreateRectRgn(0,0,0,0) );
rgnTmp.CopyRgn( &m_rgnWnd );
ASSERT( rgnTmp.GetSafeHandle() != NULL );
VERIFY(
SetWindowRgn(
(HRGN)rgnTmp.Detach(),
FALSE
)
);
} // if( m_rgnWnd.GetSafeHandle() != NULL )
SetWindowPos(
&CWnd::wndTopMost, 0, 0, 0, 0,
SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE
|SWP_SHOWWINDOW|SWP_NOZORDER
);
ASSERT( IsWindowVisible() );
if( ! _FindCustomizeMode() )
_SetCapture();
#if (!defined __EXT_MFC_NO_CUSTOMIZE)
else
{
CExtCustomizeSite * pSite = _FindCustomizeSite();
ASSERT( pSite != NULL );
pSite->RegisterCommandDropTarget( this, this );
}
#endif // (!defined __EXT_MFC_NO_CUSTOMIZE)
return TRUE;
}
|
|
Chris Fudge
|
Feb 8, 2006 - 3:39 PM
|
Is there a parameter I need to specify when creating multiple Toolbars to get a newly added one to be positioned below the existing toolbars if the edge of the window is reached?
Im creating my toolbars from an array :
if( !m_ToolBarArray[m_nToolbarCount].Create( NULL, // _T("Main Toolbar"), this, AFX_IDW_TOOLBAR, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_FLYBY | CBRS_SIZE_DYNAMIC| CBRS_TOOLTIPS| CBRS_HIDE_INPLACE)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create }
However when they reach the edge of the screen they do not automatically wrap to the next row.
I have deliberately disabled the "Add/Remove buttons" and "show/hide panels" toolbar popup as I want all buttons to be visible at all times.
Thanks.
|
|
Technical Support
|
Feb 9, 2006 - 10:07 AM
|
Let us assume we have two toolbars m_wndToolBar1 and m_wndToolBar2. The following code docks m_wndToolBar2 after m_wndToolBar1: pMainFrame->DockControlBar( &m_wndToolBar1 );
pMainFrame->RecalcLayout();
CRect wrAlreadyDockedBar;
pMainFrame->m_wndToolBar1.GetWindowRect( &wrAlreadyDockedBar );
wrAlreadyDockedBar.OffsetRect( 1, 0 );
pMainFrame->DockControlBar( &pMainFrame->m_wndToolBar2, AFX_IDW_DOCKBAR_TOP, &wrAlreadyDockedBar );
pMainFrame->RecalcLayout(); At this point the second toolbar is completely redocked (to its new position). We can analyze whether its right side is intersected with the right side of the main frame window: pMainFrame->m_wndToolBar2.GetWindowRect( &wrAlreadyDockedBar );
CRect rcMainFrame;
pMainFrame->GetClientRect( &rcMainFrame );
pMainFrame->ClientToScreen( &rcMainFrame );
bool bInstresected = ( wrAlreadyDockedBar.right > rcMainFrame.right ) ? true : false; If the right side of the second toolbar intersects with the right side of the main frame window, then you can re-dock it to the next row.
|
|
Chris Fudge
|
Feb 9, 2006 - 10:27 AM
|
Thank you,
How do I re-dock to the next row ? I have tried
wrAlreadyDockedBar.OffsetRect( 0, 1 );
and using that rectangle but it didnt seem to work.
|
|
Technical Support
|
Feb 9, 2006 - 1:04 PM
|
The wrAlreadyDockedBar.OffsetRect( 0, 1 ) code makes switching to the next row, but we need to specify the rectangle which is at the left side of the main frame window and shifted to the next row at the same time. According to the source code in our previous sample: wrAlreadyDockedBar.OffsetRect(
wrAlreadyDockedBar.left - rcMainFrame.left,
1
);
|
|
Chris Fudge
|
Feb 8, 2006 - 6:20 AM
|
I am trying to add/remove toolbars (CExtToolControlBar) at runtime. I am adding them ok however when I remove them , the docking site where the toolbar was before being removed doesnt shrink back to its original state - Leaving a redundant area which any remaining toolbars cannot dock into.
I am using the following code to remove a toolbar:
RemoveControlBar( &m_ToolBarArray[i] ); m_ToolBarArray[i].m_pDockSite = NULL; m_ToolBarArray[i].m_pDockBar = NULL; m_ToolBarArray[i].DestroyWindow(); CExtDockBar::_OptimizeCircles( this ); RecalcLayout();
(note: m_ToolBarArray is of type : CExtToolControlBar m_ToolBarArray[MAX_TOOLBARS]; )
Do I need to be removing them a different way?
|
|
Technical Support
|
Feb 8, 2006 - 10:38 AM
|
Here is the function for killing any CExtControlBar window: #include "../Src/ExtDockBar.h"
#include "../Src/ExtControlBarTabbedFeatures.h"
void KillBar(
CExtControlBar * pBar,
bool bForceNoOptimizeMode = false
)
{
ASSERT_VALID( pBar );
ASSERT_VALID( pBar->m_pDockBar );
ASSERT_VALID( pBar->m_pDockSite );
CFrameWnd * pDockSite = pBar->m_pDockSite;
ASSERT( pDockSite->GetSafeHwnd() != NULL );
CMiniDockFrameWnd * pMiniFrame = NULL;
if( pBar->IsFloating() )
{
pMiniFrame =
DYNAMIC_DOWNCAST(
CMiniDockFrameWnd,
pBar->GetDockingFrame()
);
ASSERT_VALID( pMiniFrame );
} // if( pBar->IsFloating() )
else
{
ASSERT( ! pBar->m_pDockBar->m_bFloating );
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( pBar->AutoHideModeGet() )
{
ASSERT_KINDOF( CExtDockBar, pBar->m_pDockBar );
CExtDynAutoHideArea * pWndAutoHideArea =
((CExtDockBar*)pBar->m_pDockBar)->_GetAutoHideArea();
ASSERT_VALID( pWndAutoHideArea );
CExtDynAutoHideSlider * pWndSlider =
pWndAutoHideArea->GetAutoHideSlider();
ASSERT_VALID( pWndSlider );
if( (pWndSlider->GetStyle()&WS_VISIBLE) != 0 )
pWndSlider->SendMessage( WM_CANCELMODE );
pWndAutoHideArea->RemoveControlBar( pBar, true );
} // if( pBar->AutoHideModeGet() )
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( pBar->m_pDockBar->IsKindOf(RUNTIME_CLASS(CExtDockBar)) )
{
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( pBar->m_pDockBar->IsKindOf(RUNTIME_CLASS(CExtDockDynTabBar)) )
{
CExtDynTabControlBar * pTabbedBar =
STATIC_DOWNCAST(
CExtDynTabControlBar,
pBar->m_pDockBar->GetParent()
);
LONG nIdx = pTabbedBar->FindControlBar( pBar );
if( nIdx >= 0 )
{
LONG nSel = pTabbedBar->GetSwitcherSelection();
if( nIdx != nSel )
pTabbedBar->SetSwitcherSelection( nIdx );
pTabbedBar->RemoveSelFromSwitcher();
} // if( nIdx >= 0 )
} // if( pBar->m_pDockBar->IsKindOf(RUNTIME_CLASS(CExtDockDynTabBar)) )
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
VERIFY(
((CExtDockBar *)pBar->m_pDockBar)->
RemoveControlBar( pBar, -1, 0, false )
);
}
else
{
VERIFY( pBar->m_pDockBar->RemoveControlBar(pBar) );
}
} // else from if( pBar->IsFloating() )
pDockSite->RemoveControlBar( pBar );
pBar->m_pDockSite = NULL;
pBar->m_pDockBar = NULL;
if( pMiniFrame != NULL )
pMiniFrame->DestroyWindow();
else
pBar->DestroyWindow();
if( ! bForceNoOptimizeMode )
CExtDockBar::_OptimizeCircles( pDockSite );
}
|
|
Chris Fudge
|
Feb 8, 2006 - 3:35 PM
|
|
|
Roger Taplin
|
Feb 7, 2006 - 7:11 PM
|
I’ve just installed Prof-UIS v2.52 for use with Visual C++ v.6 (SP5). After manually setting the include, source and library paths I find that almost all of the Prof-UIS examples compile successfully. The few exceptions (eg. Page Container) all come up with the following compilation error: comdef.h(1078) : error C2065: ’IXMLElementNotificationSink’ : undeclared identifier Can you suggest a work-around? Thanks, Roger Taplin
|
|
Technical Support
|
Feb 8, 2006 - 10:36 AM
|
Please check the include directories in the Visual Studio settings (select Tools | Options and then the Directories tab). Any Platform SDK directory should be at the bottom of the list. Here is a typical Include files list on a computer where both Visual Studio 6.0 and .NET 2003 are installed: C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE
C:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\INCLUDE
C:\Program Files (x86)\Microsoft Visual Studio\VC98\ATL\INCLUDE
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\include
C:\ . . . \PROF-UIS\INCLUDE
|
|
Emil Pop
|
Feb 1, 2006 - 7:43 AM
|
I am working on an MDI application and I am using a series of dockable controls that slide over the child frames/views. Whenever the view being covered is graphic intensive, sliding the control bar becomes slow. What I want to achieve is the following: whenever a dockable control bar is hidden in a tab container and then selected, the control bar should become visible in one step (no animation for sliding). Similarly whenever the control bar turns from visible to hidden into the tab container it would be nisce to do it in one step (again, no animation). Is it possible to achieve this while using a plain CExtControlBar object (I am not using the dynamic control bars derived from the former)? Thanks, Emil
|
|
Technical Support
|
Feb 1, 2006 - 10:59 AM
|
You can disable the auto-hide animation for all the bars using the following code: CExtControlBar::g_bDisableAutoHideAnimationExpanding = true;
CExtControlBar::g_bDisableAutoHideAnimationCollapsing = true;
|
|
Emil Pop
|
Feb 2, 2006 - 9:26 AM
|
|
|
Emil Pop
|
Feb 1, 2006 - 7:36 AM
|
Whenever the style of the Windows’ desktop changes via Mouse Right-Click on the desktop/Properties/Appearance Tab/Advanced/Item: Palette Title/ Change fonts, the fonts of the title bar created using CExtControlBar remain the same although they should change.
On the other hand, Microsoft Visual Studio Resizable control bars (i.e., Solution, Resources, etc) change their font. The same is valid for other Microsoft Office Applications.
For clarity, I e-mailed you a sample outlining the font resizing comparison using an application based on Prof-UIS as opposed to MS Visio. Would it be possible to have the Palette Titles changed in Prof-UIS too? Thanks, Emil
|
|
Technical Support
|
Feb 2, 2006 - 5:58 AM
|
We received your e-mail with the screenshot and replied you back with a sample application attached.
|
|
Emil Pop
|
Feb 2, 2006 - 9:34 AM
|
Hi, I received a zipped executable with which I am not sure what to do. I ran it and I took two snapshots before and after changing the style. They include: - your executable - Visual Studio 2003 (for comparison) - Display Properties/Advanced Appearance to show the style setup. I will email you the results Emil
|
|
Technical Support
|
Feb 3, 2006 - 5:40 AM
|
We updated the sample and sent it to you by e-mail.
|
|
Emil Pop
|
Feb 3, 2006 - 2:57 PM
|
The font looks OK now. However the bitmap for closing the control bar ( e.g., the ’X’) stays the same. I assume the pin bitmap for the hiding button won’t change either. How is this going to work now? Do you intend to incorporate the changes in some future interim release? Thanks, Emil
|
|
Technical Support
|
Feb 4, 2006 - 10:22 AM
|
The changes you saw have already added to Prof-UIS 2.53 we are working on and we can provide you with the updated code (on your e-mail request). The buttons in the caption of the resizable control bar are based on bitmap-like glyphs. They have been always implemented using glyphs in Prof-UIS. The same buttons in Visual Studio are based on the characters drawn with the Marlett font. We can switch to the Marlett font in all the paint managers but the skinable paint manager. The latter is configured with an XML and uses PNG images for drawing. But we think this is not an essential improvement because nobody else uses captions with 35 pixel height.
|
|
Emil Pop
|
Feb 5, 2006 - 6:35 PM
|
You are right, the signs are not really that important (except for consistency reasons). I guess I am OK with the changes you intend to incorporate in Prof-UIS 2.53 (e.g., do not send me an interim patch). Thank you, Emil
|
|
Marcus Gebler
|
Jan 31, 2006 - 8:45 AM
|
Is it possible to exclude a control bar from being profiled ( CExtControlBar::ProfileBarStateSerialize )? Is it possible to dock the control bars within a mdi client window and to profile them ( CExtControlBar::ProfileBarStateSerialize ) without the ugly flickering (offscreen docking and profiling) ? With best regards Marcus
|
|
Marcus Gebler
|
Jan 31, 2006 - 1:10 PM
|
1. When will this version be available? 2. Sorry, I meant of course the MDI child frame window. In my case I am creating a new MDI Window by calling the CreateNewChild method. Then a xml-file, which also includes information about the control-bars that have to be docked, is parsed and the control bars are created (but not docked at this moment). The xml-file also includes the profile-data (redirected via CArchive + CMemFile), which is propagated by calling the CExtControlBar::ProfileBarStateSerialize method. This loading-procedure leads to a lot of resizing and positioning of the docked control bars - and looks like "flickering". Is it possible to move the MDI child frame window "off screen" - do all this loading stuff - and finally move the window to its ultimate position - or is there a better solution? 3. How will the upcoming "Prof-UIS ribbon control" work? Concatenating dialog bars? 4. Will there be a "Office 2005" - PaintManager theme ? Best regards Marcus
|
|
Technical Support
|
Feb 1, 2006 - 11:05 AM
|
1. We plan to add this feature within two months. 2. There is nothing special about the described design. If the bars in your MDI child frame window produce some flickering, then the same code in the main frame window should produce the same effects. Please ensure the following: you have created, restored or initially docked all the bars and only then performed the UI initialization. Invocations of COM API before initializing the control bars may let your MDI child frame window appear on the screen earlier than it should. 3. Although the Ribbon window in Office 12 is a solid control, we have to implement it as a container because someone will certainly need to insert dialog pages into it. 4. We guess you mean Office 12 by "Office 2005". This theme can be implemented as a new skin. Of course, we need to support the smooth aero behavior based on fade-in / fade-out effects.
|
|
Technical Support
|
Jan 31, 2006 - 12:06 PM
|
At present the serialization of control bars is based on using the CArchive class and it is impossible to exclude a particular bar from being serialized. But we are working on an alternative state serialization sub system, which is based on tree like named parameters and XML. It allows you to exclude some bars and does not require all the control bars to have been created when it starts restoring the state. Please tell what you mean by "dock the control bars withing a mdi client window"? Control bars can be docked inside the frame window only. The frame window can be an SDI main frame window (the CFrameWnd class), MDI main frame (the CMDIFrameWnd class) or MDI child frame window (the CMDIChildWnd class). Control bars cannot be docked in the MDI client window.
|
|
Andrew Harding
|
Jan 30, 2006 - 11:33 AM
|
Is there a built in mechanism to allow the user to reorder the tabs by dragging them to the desired position? I saw a ModifyTabStyle() function that I believed may help but I couldn’t find any documentation to describe what styles I could implement.
|
|
Technical Support
|
Jan 30, 2006 - 12:32 PM
|
You need the CExtTabPageContainerWnd::ItemDraggingSet() method, which enables or disables the feature that allows the user to change the position of any tab page with the mouse.
|
|
Mario Gudelj
|
Jan 30, 2006 - 10:25 AM
|
Hi,
We have recently upgraded from prof-uis 2.27 to 2.40 and a small problem has appeared.
We have an MDI app that supports runtime language switching. Each language has its own resource-only DLL. When changing languages, appropriate lanugage DLL is loaded, resource handle is set using AfxSetResourceHandle and resources are updated (e.g. MDI frame’s context menu and accelerator table, some strings in list and tree controls, etc.). This is also done on application startup.
This worked OK in 2.27, but in 2.40 there is a problem with the main menu bar. When switching languages, main menu bar strings are updated correctly. However, entries in the individual menus (e.g. ’File’ menu) are not updated. All other resources (dialogs, strings, popup menus) are updated properly. We didn’t change any code when upgrading from 2.27 to 2.40.
Is there a way to update menus?
The problem doesn’t appear on application startup.
Thank you,
|
|
Technical Support
|
Jan 30, 2006 - 12:26 PM
|
Did you invoke the CExtMenuControlBar::UpdateMenuBar() method after reloading the language DLL? Besides, the last Prof-UIS versions allow you to keep all the resources in one module and avoid creating multiple DLLs.
|
|
Mario Gudelj
|
Jan 31, 2006 - 1:56 AM
|
Found the problem. I wasn’t calling g_CmdManager->UpdateFromMenu for our menus (with both bool params set to true)
|
|
Stephan Finkler
|
Jan 27, 2006 - 2:24 AM
|
I’ve got a CmdItem in the toolbar with a combo state (like StyleEditor sample ID_SE_FONT_LIST).
If I press the ALT GR key (German Keyboard) the combobox looses the focus. So it is impossible to insert special characters e.g. Euro symbol
Any idea?
|
|
Technical Support
|
Jan 27, 2006 - 10:31 AM
|
There are two things that need to be discussed about the in-place active editor in the built in combo box button. Both can be demonstrated with the StyleEditor sample application. 1) We cannot confirm that there is a problem when pressing the left or right ALT key in the editor. It works exactly like in MS Office applications. The WM_SYSKEYDOWN with VK_MENU key code specified does not destroy the editor. The corresponding WM_SYSKEYUP activates the menu bar. 2) The in-place editor does not allow you to type characters using the code input as you did. This bug can be fixed by updating the source code for the CExtBarTextFieldButton::CInPlaceEditWnd::PreTranslateMessage() and CExtBarTextFieldButton::CInPlaceEditWnd::WindowProc() methods in ExtPopupCtrlMenu.cpp file: BOOL CExtBarTextFieldButton::CInPlaceEditWnd::PreTranslateMessage( MSG * pMsg )
{
ASSERT_VALID( m_pBar );
if( ! _IsValidState() )
return CEdit::PreTranslateMessage( pMsg );
if( !m_bCanceling )
{
if( pMsg->message == WM_KEYDOWN )
{
bool bAlt =
( (::GetAsyncKeyState(VK_MENU)&0x8000) != 0 )
? true : false;
if( !bAlt )
{
bool bCtrl =
( (::GetAsyncKeyState(VK_CONTROL)&0x8000) != 0 )
? true : false;
bool bShift =
( (::GetAsyncKeyState(VK_SHIFT)&0x8000) != 0 )
? true : false;
if( bCtrl
&& (!bShift)
&& ( int(pMsg->wParam) == VK_INSERT
|| int(pMsg->wParam) == int( _T(’C’) )
)
)
{
SendMessage( WM_COPY, 0, 0 );
return TRUE;
}
if( ( bCtrl && (!bShift) && int(pMsg->wParam) == int( _T(’V’) ) )
|| ( (!bCtrl) && bShift && int(pMsg->wParam) == VK_INSERT )
)
{
SendMessage( WM_PASTE, 0, 0 );
return TRUE;
}
if( ( bCtrl && (!bShift) && int(pMsg->wParam) == int( _T(’X’) ) )
|| ( (!bCtrl) && bShift && int(pMsg->wParam) == VK_DELETE )
)
{
SendMessage( WM_CUT, 0, 0 );
return TRUE;
}
if( bCtrl && (!bShift) && int(pMsg->wParam) == int( _T(’A’) ) )
{
SetSel( 0, -1 );
return TRUE;
}
} // if( !bAlt )
} // if( pMsg->message == WM_KEYDOWN )
else if(
pMsg->message == WM_LBUTTONDOWN
|| pMsg->message == WM_MBUTTONDOWN
|| pMsg->message == WM_RBUTTONDOWN
)
{
if( pMsg->hwnd != m_hWnd )
{
m_bCanceling = true;
PostMessage( (WM_USER+0x666) );
}
}
} // if( !m_bCanceling )
// HASH Added START
// (Allows single key accelerators)
if( ( pMsg->message == WM_KEYDOWN
|| pMsg->message == WM_CHAR
|| pMsg->message == WM_SYSKEYDOWN
|| pMsg->message == WM_SYSKEYUP
)
&& pMsg->hwnd == m_hWnd
)
{
::TranslateMessage( pMsg );
::DispatchMessage( pMsg );
return TRUE;
}
// HASH Added END
return CEdit::PreTranslateMessage( pMsg );
}
LRESULT CExtBarTextFieldButton::CInPlaceEditWnd::WindowProc(
UINT message,
WPARAM wParam,
LPARAM lParam
)
{
ASSERT_VALID( m_pBar );
if( ! _IsValidState() )
return CEdit::WindowProc( message, wParam, lParam );
if( m_pCbWndProc != NULL )
{
LRESULT lResult = 0L;
if( m_pCbWndProc(
lResult,
message,
wParam,
lParam,
*this,
m_pCbCookie
)
)
return lResult;
} // if( m_pCbWndProc != NULL )
if( !m_bCanceling )
{
if( CExtPopupMenuWnd::IsMenuTracking()
|| CExtControlBar::_DraggingGetBar() != NULL
)
{
m_bCanceling = true;
PostMessage( (WM_USER+0x666) );
}
}
if( message == (WM_USER+0x666) )
{
GetBarTextFieldButton()->OnInplaceControlSessionCancel();
return 0;
}
if( message == WM_NCCALCSIZE )
{
NCCALCSIZE_PARAMS * pNCCSP =
reinterpret_cast < NCCALCSIZE_PARAMS * > ( lParam );
ASSERT( pNCCSP != NULL );
CRect rcInBarWnd( pNCCSP->rgrc[0] );
rcInBarWnd.DeflateRect( 2, 2, 0, 2 );
::CopyRect( &(pNCCSP->rgrc[0]), rcInBarWnd );
return 0;
} // if( message == WM_NCCALCSIZE )
if( message == WM_NCPAINT )
{
CRect rcInBarWnd, rcInBarClient;
GetWindowRect( &rcInBarWnd );
GetClientRect( &rcInBarClient );
ClientToScreen( &rcInBarClient );
if( rcInBarWnd == rcInBarClient )
return 0;
CPoint ptDevOffset = -rcInBarWnd.TopLeft();
rcInBarWnd.OffsetRect( ptDevOffset );
rcInBarClient.OffsetRect( ptDevOffset );
CWindowDC dc( this );
ASSERT( dc.GetSafeHdc() != NULL );
dc.ExcludeClipRect( &rcInBarClient );
dc.FillSolidRect(
rcInBarWnd,
m_pBar->PmBridge_GetPM()->GetColor( COLOR_WINDOW, this )
);
return 0;
} // if( message == WM_NCPAINT )
if( message == WM_GETDLGCODE )
return DLGC_WANTALLKEYS|DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_HASSETSEL;
if( message == WM_RBUTTONDOWN
|| message == WM_RBUTTONUP
|| message == WM_RBUTTONDBLCLK
|| message == WM_CONTEXTMENU
)
return 0;
if( message == WM_KEYDOWN )
{
if( int(wParam) == VK_MENU
|| int(wParam) == VK_ESCAPE
)
{
GetBarTextFieldButton()->OnInplaceControlSessionCancel();
return 0;
}
if( int(wParam) == VK_DOWN
|| int(wParam) == VK_UP
|| int(wParam) == VK_F4
)
{
CExtBarTextFieldButton * pTextFieldTBB =
GetBarTextFieldButton();
if( pTextFieldTBB->IsComboTextField() )
{
pTextFieldTBB->OnInplaceControlSessionEnd();
pTextFieldTBB->OnTrackPopup( CPoint(0,0), true, false );
return 0;
}
}
if( int(wParam) == VK_RETURN )
{
ASSERT( m_pStr != NULL );
CExtSafeString sText;
int nTextLength = GetWindowTextLength();
if( nTextLength > 0 )
{
GetWindowText( sText.GetBuffer(nTextLength+2), nTextLength+1 );
sText.ReleaseBuffer();
}
if( m_pCbVerifyTextInput != NULL )
{
if( m_pCbVerifyTextInput(
*this,
m_pCbCookie,
sText.IsEmpty() ? _T("") : sText,
sText.IsEmpty() ? _T("") : sText
)
)
*m_pStr = sText;
} // if( m_pCbVerifyTextInput != NULL )
else
*m_pStr = sText;
GetBarTextFieldButton()->OnInplaceControlSessionEnd();
return 0;
}
bool bAlt =
( (::GetAsyncKeyState(VK_MENU)&0x8000) != 0 )
? true : false;
if( bAlt )
{
GetBarTextFieldButton()->OnInplaceControlSessionCancel();
return 0;
}
ASSERT( m_pStr != NULL );
CString sTextOld;
GetWindowText( sTextOld );
DWORD dwSelSaved = CEdit::GetSel();
CEdit::SetRedraw( FALSE );
LRESULT lResult = CEdit::WindowProc( message, wParam, lParam );
CString sTextNew;
GetWindowText( sTextNew );
if( m_pCbVerifyTextInput != NULL )
{
if( m_pCbVerifyTextInput(
*this,
m_pCbCookie,
sTextOld.IsEmpty() ? _T("") : (LPCTSTR)sTextOld,
sTextNew.IsEmpty() ? _T("") : (LPCTSTR)sTextNew
)
)
*m_pStr = sTextNew;
else
{
CEdit::SetSel( 0, -1 );
CEdit::ReplaceSel( sTextOld );
CEdit::SetSel( dwSelSaved );
}
} // if( m_pCbVerifyTextInput != NULL )
else
*m_pStr = sTextNew;
CEdit::SetRedraw( TRUE );
Invalidate();
UpdateWindow();
return lResult;
} // if( message == WM_KEYDOWN )
else if( message == WM_CHAR )
{
ASSERT( m_pStr != NULL );
CString sTextOld;
GetWindowText( sTextOld );
DWORD dwSelSaved = CEdit::GetSel();
CEdit::SetRedraw( FALSE );
LRESULT lResult = CEdit::WindowProc( message, wParam, lParam );
CString sTextNew;
GetWindowText( sTextNew );
if( m_pCbVerifyTextInput != NULL )
{
if( m_pCbVerifyTextInput(
*this,
m_pCbCookie,
sTextOld.IsEmpty() ? _T("") : (LPCTSTR)sTextOld,
sTextNew.IsEmpty() ? _T("") : (LPCTSTR)sTextNew
)
)
*m_pStr = sTextNew;
else
{
CEdit::SetSel( 0, -1 );
CEdit::ReplaceSel( sTextOld );
CEdit::SetSel( dwSelSaved );
}
} // if( m_pCbVerifyTextInput != NULL )
else
*m_pStr = sTextNew;
CEdit::SetRedraw( TRUE );
Invalidate();
UpdateWindow();
return lResult;
} // else if( message == WM_CHAR )
else if( message == WM_KILLFOCUS || message == WM_CANCELMODE )
{
GetBarTextFieldButton()->OnInplaceControlSessionCancel();
return 0;
} // else if( message == WM_KILLFOCUS || message == WM_CANCELMODE )
return CEdit::WindowProc( message, wParam, lParam );
}
|
|
Kevin McGarigal
|
Jan 26, 2006 - 7:59 PM
|
Hi,
I have a CExtPropertyGridCtrl that contains a number of CExtPropertyValue derived items. While Apply() does a great job at handling changes in the associated combo box of each item I also need to act when the selection changes between items to update other parts of the dialog box. I couldn’t find in the documentation a way to intercept the selection change notification (if it is sent to the parent dialog) or another method to hook into the change (callback, virtual function). Any suggestion on how this can be accomplished would be much appreciated,
Thank you
|
|
Technical Support
|
Jan 27, 2006 - 10:36 AM
|
The CExtPropertyGridCtrl window is designed to be a container for several child windows including CExtPropertyGridWnd -derived tree grid windows which are kind of our CExtGridWnd generic grid window. The CExtPropertyGridWnd class implements the CExtGridWnd::FocusSet() virtual method which sets the new focused item and synchronizes focused items in other tree grid windows in the property grid control. Finally, the CExtPropertyGridCtrl::RedrawFocusDepentChildren() virtual method is invoked to redraw any window inside the property grid control which depend on the focused item in the currently active tree grid window. The CExtPropertyGridCtrl::RedrawFocusDepentChildren() virtual method is also invoked when you change the active tree grid window by clicking toolbar buttons. We think you need to override the CExtPropertyGridCtrl::RedrawFocusDepentChildren() virtual method in your CExtPropertyGridCtrl -derived class. In this method, invoke the parent method and analyze the focus in the active tree grid window. Call the CExtPropertyGridCtrl::GetActiveGrid() method to get a pointer to the currently active CExtPropertyGridWnd tree grid window. Then you can get the focused item and corresponding property item which can be either CExtPropertyCategory or CExtPropertyValue item: CExtPropertyGridWnd * pTreeGridWnd =
pPropertyGridCtrl->GetActveGrid();
ASSERT_VALID( pTreeGridWnd );
LONG nFocusedRowIndex = pTreeGridWnd->FocusGet().y;
if( nFocusedRowIndex < 0 )
return . . .
HTREEITEM hTreeItem =
pTreeGridWnd->ItemGetByVisibleRowIndex( nFocusedRowIndex );
ASSERT( hTreeItem != NULL );
CExtPropertyItem * pPropertyItem =
pTreeGridWnd->PropertyItemFromTreeItem( hTreeItem );
ASSERT_VALID( pPropertyItem );
|
|
Michael Valentine
|
Jan 26, 2006 - 5:21 AM
|
1) The fixed version of the integration wizard now builds the main libraries ok, but fails on the profskin libraries. 2) I was having similiar problems to the previous poster with static linking, but adding the code to the rc2 file seems to work, however I now get hundreds of template warnings such as:
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxtempl.h(1534) : warning C4244: ’argument’ : conversion from ’SIZE_T’ to ’DWORD’, possible loss of data
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxtempl.h(1252) : while compiling class-template member function ’CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::CAssoc *CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::GetAssocAt(ARG_KEY,UINT &,UINT &) const’
Coming from:
c:\Program Files\FOSS Software Inc\Prof-UIS\Include\ExtGridWnd.h(1125) : see reference to class template instantiation ’CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>’ being compiled
3) You say that if you want to use resource-dependent features you must uncomment a line from Prof-UIS.h. However, this line is already uncommented in the released code. If you comment this line out then the code below does not compile:
ExtGridWnd.cpp:22252: should be: CColorDialog dlg( clrValueFinal, CC_FULLOPEN, & _tcsi.m_wndGrid );
and ExtGridWnd.cpp:22254: should be: return true;
Changing this code it then compiles and removes the template warnings mentioned above, however I then get a stream of assets and then a crash when I try to run the app.
|
|
Chris Jackson
|
Jan 27, 2006 - 7:19 AM
|
I’m getting these warnings too, so if they could be fixed that would be very useful. We don’t want to be building our projects with 64 bit portability warnings turned off. Ta
|
|
Technical Support
|
Jan 27, 2006 - 10:55 AM
|
We have compiled all the libraries and sample applications of Prof-UIS 2.52 in the following environments:
Visual C++ 6.0 without any SP Visual C++ 6.0 SP5 Visual C++ 6.0 SP6 Visual Studio .NET (7.0) Visual Studio .NET 2003 (7.1) Visual Studio 2005 (8.0) - both Win32 and x64 versions
We did not see any warnings anywhere. We would really appreciate if you help us reproduce these warnings. By the way, we guess these warnings depend on the Platform SDK installation. Please provide us with the details.
|
|
Michael Valentine
|
Jan 26, 2006 - 8:49 AM
|
Stream of asserts I mean :-)
|
|
Technical Support
|
Jan 26, 2006 - 12:45 PM
|
The ProfSkin compilation in the Integration Wizard is now in the beta stage. It will succeed if you build ZLib and LibPNG projects in Visual Studio manually and repeat with building ProfSkin with the Integration Wizard. We confirm that there is the bug with CColorDialog described in your message but we failed to reproduce the template compilation warnings in our sample applications.
|
|
Michael Valentine
|
Jan 27, 2006 - 2:53 AM
|
The template warnings originate from ExtGridWnd.h line 1123:
typedef CMap < __EXT_MFC_ULONG_SIZE_T, __EXT_MFC_ULONG_SIZE_T, _N_header_block_t *, _N_header_block_t * > HighLevelChunksMap_t__EXT_MFC_ULONG_SIZE_T is defined in ExtMfcDef.h as #define __EXT_MFC_ULONG_SIZE_T SIZE_T (using Visual Studio 7.1) If I change this to: #define __EXT_MFC_ULONG_SIZE_T ULONG (as it is defined for older Visual Studio versions) then the warnings disappear. Doing this presumably breaks the 64-bit compatibility though? Maybe you do not get this warning if you are using Visual Studio 8.0?
|
|
Michael Valentine
|
Jan 27, 2006 - 3:08 AM
|
Actually I have just discovered that turning off the project setting "Detect 64-bit Portability Issues" removes the warnings too, I shall just do this :)
|
|
Technical Support
|
Jan 27, 2006 - 10:54 AM
|
We have compiled all the libraries and sample applications of Prof-UIS 2.52 in the following environments:
Visual C++ 6.0 without any SP Visual C++ 6.0 SP5 Visual C++ 6.0 SP6 Visual Studio .NET (7.0) Visual Studio .NET 2003 (7.1) Visual Studio 2005 (8.0) - both Win32 and x64 versions
We did not see any warnings anywhere. We would really appreciate if you help us reproduce these warnings. By the way, we guess these warnings depend on the Platform SDK installation. Please provide us with the details.
|
|
Michael Valentine
|
Jan 30, 2006 - 3:23 AM
|
The libraries and sample applications do not generate the warnings. Maybe because they are not statically linked? Anyway I have sent you a test project that does generate the warnings...
|
|
Technical Support
|
Jan 30, 2006 - 5:40 AM
|
Your project has clarified the situation. It was not difficult to find out the source of the warnings and how to avoid them. Please find the following part of the ...../Prof-UIS/Include/ExtMfcDef.h file: #if (!defined __EXT_MFC_INT_PTR)
#if _MFC_VER < 0x700
#define __EXT_MFC_INT_PTR int
#define __EXT_MFC_UINT_PTR UINT
#define __EXT_MFC_ULONG_SIZE_T ULONG
#else
#define __EXT_MFC_INT_PTR INT_PTR
#define __EXT_MFC_UINT_PTR UINT_PTR
#define __EXT_MFC_ULONG_SIZE_T SIZE_T
#endif
#endif
#endif and replace it with #if (!defined __EXT_MFC_INT_PTR)
#if _MFC_VER < 0x700
#define __EXT_MFC_INT_PTR int
#define __EXT_MFC_UINT_PTR UINT
#define __EXT_MFC_ULONG_SIZE_T ULONG
#else
#define __EXT_MFC_INT_PTR INT_PTR
#define __EXT_MFC_UINT_PTR UINT_PTR
#if defined(_WIN64)
#define __EXT_MFC_ULONG_SIZE_T SIZE_T
#else
#define __EXT_MFC_ULONG_SIZE_T ULONG
#endif
#endif
#endif
|
|
Thomas Roeder
|
Jan 25, 2006 - 12:18 PM
|
Hi, I was trying what did you suggest in your FAQ(static library linking), but it’s not working for me. I’m constantly getting an assertion error when library’s source files try to load some library’s resouces. For example: m_hCursorResizingH = pApp->LoadCursor( MAKEINTRESOURCE( IDC_EXT_RESIZE_H1 ) ); ASSERT( m_hCursorResizingH != NULL ); I’m using VC++ 2003 .NET . With version 2.50 everything is working. Any suggestion?
|
|
Technical Support
|
Jan 25, 2006 - 12:53 PM
|
The only one thing that may cause errors while loading resources in your case is that the resources are not available. So we guess that you simply forgot to include Prof-UIS resources into your *.rc2 file: /////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif
/////////////////////////////////////////////////////////////////////////////
|
|
Thomas Roeder
|
Jan 25, 2006 - 2:25 PM
|
Sorry, But I did that. Everything is accordingly included in my *.rc2 file. And Prof-UIS resources was copied from ...MyProj\Prof-UIS\Include\Resources to ...MyProj\res\Resources But the program seems do not see the ...MyProj\res\Resources\resource.h , resource.rc and resources itself(...MyProj\res\Resources\res *.*). Should I add some settings in project properties? Could you send me some simple program with ProfUIS252ymd.lib which use some library’s resources(grid control, etc). Thanks.
|
|
Technical Support
|
Jan 26, 2006 - 11:46 AM
|
It seems you did not completely correctly follow that FAQ. You do not need to copy the Prof-UIS resources to the project res folder? As for the sample program, please take a look at any Prof-UIS sample which can be compiled statically. For instance, the SDI.rc2 file of the SDI sample application contains the following lines: #if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif Simply include the above lines into the .RC2 file of your project and specify the .../Prof-UIS/Include path in the Additional Folders paths of the Resource Compiler settings of your project.
|
|
Simon DESEE
|
Jan 25, 2006 - 6:24 AM
|
Hello, I’ve just download and install the new 2.52 version of the library. I run the integration wizard, and add Prof-UIS paths to Visual Studio environment variables... Now, all of my path are incorrect. Just the Prof-UIS paths exists... All other path (library, includes of VC++ or SDK) are deleted by the Prof-UIS wizard !!!!! Not thanks.
|
|
Technical Support
|
Jan 26, 2006 - 11:27 AM
|
This issue is known. This is reproduced in the way when you run the Prof-UIS 2.50 Integration Wizard without running Visual Studio 2005 at least once before. We even discussed this issue with a specialist from the Visual Studio 2005 development team. In fact, Visual Studio 2005 does not get completely installed until you run it at least once. The include folders list of the Visual Studio 2005 is stored in the VCComponents.dat file that is typically located in the following folder: C:\Documents and Settings\***WindowsUserName***\Local Settings\Application Data\Microsoft\VisualStudio\8.0\VCComponents.dat
The VCComponents.dat file is a UNICODE file which has the format of INI file. We can send you the initial version of this file.
We will fix this issue in the next major version.
You can download the following version of the VcComponents.dat file which is very close to the default version and place it into the specified above location.
|
|
Simon DESEE
|
Jan 27, 2006 - 6:14 AM
|
Thanks for your reply, but I’ve used Visual Studio 2005 a lot of times before installing your package. Simon
|
|
Technical Support
|
Jan 27, 2006 - 11:00 AM
|
We do not face this bug if Visual Studio 2005 has been started at least once. Replacement of the VcComponents.dat file should restore the Visual Studio 2005 settings. Please repeat the Integration Wizard actions and let us know whether the bug persists.
|
|
Sergio Buonanno
|
Jan 24, 2006 - 3:38 PM
|
I cannot find a way to acess and navigate through TABs. I have some dialogs inserted in some tabs of a CExtTabWnd derived class. I can change TAB only by using the mouse I don’t know how to implement the same behavior by keyboard. Is there anything I forgot or that class just doesn’t support keyboard input to switch to another tab ? The standard MFC CTabCtrl control I used before does it.
|
|
Technical Support
|
Jan 25, 2006 - 9:12 AM
|
The CExtTabPageContainerWnd class supports Ctrl+PageUp and Ctrl+PageDown key combinations for navigation through tab pages.
|
|
Sergio Buonanno
|
Jan 25, 2006 - 9:50 AM
|
I’m sorry. It doesn’t work. I have a TAB inside a Dialog box that in his turn it is child of an MDI Child Window. In this case the CTabCtrl works fine, CExtTabWnd derived classes don’t. Ctrl+PageUp and Ctrl+PageDown do not work at all in the latter case. By pressing the keyboard Tab key I can set the input focus on the TAB control (instance of a CTabCtrl class) and then move from a page to the next one (or previous one) by using the arrow keys. If I replace the TAB control with a CExtTabWnd object I cannot set the input focus on the TAB by keyboard anymore.
|
|
Technical Support
|
Jan 27, 2006 - 10:46 AM
|
We cannot confirm that the Ctrl+PageUp and Ctrl+PageDown do not work inside CExtTabPageContainerWnd . As for the TAB problem, you need to apply the WS_EX_CONTROLPARENT style (see the figure below) to allow the user to navigate through the child windows of the window by using the TAB key. We enclosed a small project to demonstrate the CExtTabPageContainerWnd in action. 
|
|
Andrew Harding
|
Jan 24, 2006 - 10:06 AM
|
I’m trying to create a tabbed control where each tab of the control would be a docking site for multiple windows. I am able to create the tabbed control by using CExtControlBar::DockControlBarInnerOuter and CExtControlBar::DockControlBarIntoTabbedContainer. The problem I have is that I want to restrict the CExtControlBars within each tab so that they can only dock within the current tab. I don’t want the user to be able to dock the CExtControlBars outside of the tab, although it is ok for them to float the windows, I’ll just hide/reshow the floated windows as they switch tabs. Do you know if / how I can restrict the docking as described above?
|
|
Technical Support
|
Jan 26, 2006 - 11:12 AM
|
Your UI design looks like as folows:
1) MDI application with the MDI tab control and without any bars: no toolbars, no status bar, and no any other bars.
2) The child frames are always maximized only.
3) Each child frame has its own bars and, of course, bars of one frame cannot be docked into another one.
Is that is what you are going to code?
|
|
Andrew Harding
|
Jan 26, 2006 - 11:42 AM
|
That is an accurate assessment of my program. Since I last posted I have made a little more progress however, I decided to create a CFrameWnd and attach a CExtTabPageContainer to it. I then create a number of additional CFrameWnds and insert one to each tab page. Each CFrameWnd that is inserted into the tab page is a docking site for the CExtControlBars that they contain. This seems to work except that when I resize the main window the tab pages don’t seem to resize even though I resize the tab control to fill the parent window space on resize. The windows used to resize appropriately before they were inserted into the tab control.
|
|
Technical Support
|
Jan 26, 2006 - 12:47 PM
|
We are sure that the windows correctly inserted into the tab page container will be resized and your design is really possible to implement. We guess the problem may deal with some type or something similar. Would you can send us your project so we can find out what’s wrong?
|
|
Andrew Harding
|
Jan 26, 2006 - 3:28 PM
|
I fixed the problem. I just needed to override the OnSize event for the frame containing the tab control and call RecalcLayout in that function.
|
|
Technical Support
|
Jan 27, 2006 - 10:17 AM
|
That is interesting, but CFrameWnd::OnSize() invokes the RecalcLayout() virtual method if the nType parameter is not equal to SIZE_MINIMIZED . We may guess you have defined the BEGIN_MESSAGE_MAP macro in the class map incorrectly. Please check whether the second parameter of this macro is the frame window type: BEGIN_MESSAGE_MAP( CYourChildFrameAsTabPageClass, CFrameWnd )
|
|
Suhai Gyorgy
|
Jan 24, 2006 - 6:41 AM
|
Dear Support,
CExtPopupMenuWnd::g_bMenuShowCoolTips = true; and CExtControlBar::g_bUseAdvancedToolTips = true; doesn’t seem to take effect, even in projects built with the integrated Prof-UIS Appwizard. Is this a known issue? How could I resolve it? I’m using v.2.52.
Thank you: Chris.
|
|
Technical Support
|
Jan 25, 2006 - 4:33 AM
|
The CExtPopupMenuWnd::g_bMenuShowCoolTips property will be removed in one of the next releases. The balloon tip is implemented in the CExtPopupMenuTipWnd class. This class now allows you to show tips of several shape types. The CExtPopupMenuTipWnd::e_tip_style_t enumeration describes the currently supported tooltip types: enum e_tip_style_t
{
__ETS_NONE = 0,
__ETS_BALLOON = 1,
__ETS_BALLOON_NO_ICON = 2,
__ETS_RECTANGLE = 3,
__ETS_RECTANGLE_NO_ICON = 4,
__ETS_INV_RECTANGLE = 5,
__ETS_INV_RECTANGLE_NO_ICON = 6,
}; The __ETS_NONE value stands for no tooltip at all and should be used in the following global constants: CExtPopupMenuWnd::g_eTtsClassicMenu // for popup menu
CExtPopupMenuWnd::g_eTtsPaletteMenu // for palette popup menu
CExtPopupMenuWnd::g_eTtsColorMenu // for color menu
CExtPopupMenuWnd::g_eTtsTearOffCaption // for tear-off caption in any menu The CExtPopupMenuWnd::g_eTtsClassicMenu variable describes the type of tooltip in a popup menu. It is set to CExtPopupMenuTipWnd::__ETS_NONE by default. You can set it to CExtPopupMenuTipWnd::__ETS_BALLOON to see tips displayed by default over menu items in older Prof-UIS versions.
|
|
Suhai Gyorgy
|
Jan 25, 2006 - 6:17 AM
|
Thank you for your reply!
This made the balloon-style tooltip to work in my popup menus, but I also couldn’t turn CExtToolControlBar’s tooltips into balloon styled ones. How could I make those work the same way?
Best regards: Chris
|
|
Technical Support
|
Jan 26, 2006 - 11:56 AM
|
Here is the source code for the CExtControlBar::OnAdvancedPopupMenuTipWndDisplay() method which is responsible for displaying tooltips in both toolbar’s buttons and resizable bar’s caption buttons: void CExtControlBar::OnAdvancedPopupMenuTipWndDisplay(
CExtPopupMenuTipWnd & _ATTW,
const RECT & rcExcludeArea,
__EXT_MFC_SAFE_LPCTSTR strTipText
) const
{
ASSERT_VALID( this );
ASSERT( strTipText != NULL && _tcslen( strTipText ) > 0 );
_ATTW.SetTipStyle( CExtPopupMenuTipWnd::__ETS_RECTANGLE_NO_ICON );
_ATTW.SetText( strTipText );
_ATTW.Show( (CWnd*)this, rcExcludeArea );
} Please create and use your CExtToolControlBar -derived class which implements the OnAdvancedPopupMenuTipWndDisplay() virtual method with the same body but the __ETS_RECTANGLE_NO_ICON constant should be replaced with __ETS_BALLOON_NO_ICON .
|
|
Suhai Gyorgy
|
Jan 27, 2006 - 3:35 AM
|
Hi!
I’ll try that out, thank you! Are you planning on a global variable that would make this style changable? I mean you had CExtControlBar::g_bUseAdvancedToolTips earlier, but I guess now that setting doesn’t change anything, even though my CExtToolControlBar is in the CExtCTA template. Something like CExtControlBar::g_eTtsToolBar variable would be great, having the same type as that of CExtPopupMenuWnd::g_eTtsClassicMenu (CExtPopupMenuTipWnd::e_tip_style_t type)
Thank you again: Chris.
|
|
Technical Support
|
Jan 27, 2006 - 11:02 AM
|
The CExtCTA template class now should not be used with the Prof-UIS control bars because the CExtControlBar supports extended tooltips. We could add the global or local member to the CExtControlBar class but we think it is a bit funny to see balloons over toolbar buttons.
|
|
YS Jang
|
Jan 24, 2006 - 1:06 AM
|
Hi! My project have three tabPageContainers.. and each tabpagecontainer have two tab-pages. ok.. I always want to see first tab page when chage the each tabpagecontainer. But, currently , In Your library, when i change the each tabpagecontainer, tabpagecontainer is seen recently tab page.. what can i do?
|
|
Technical Support
|
Jan 25, 2006 - 4:35 AM
|
There is not enough information in your message about the UI design of your application. We guess you need to track the focus change event globally and, if it switches from one tab page container to another, then the first page should be selected automatically in the last one. Please provide us with more details about application: what is the main window and where exactly the tab page containers are located in it?
|
|