Subject |
Author |
Date |
|
tera t
|
Jul 28, 2008 - 12:19 AM
|
Hello Prof is incompatible with before 2.83.
I do not become PrintPreviw and am troubled. m_pGrid.SendMessage( WM_COMMAND , ID_FILE_PRINT_PREVIEW )
|
|
Technical Support
|
Jul 28, 2008 - 12:26 PM
|
We suspect that m_pGrid is of CExtPPVW < CExtGridWnd > type which has its own OnCmdMsg() virtual method. Please check that this virtual method invokes the CExtPPVW < CExtGridWnd > :: OnCmdMsg() parent class method rather than the CExtGridWnd::OnCmdMsg() method.
|
|
Chun Pong Lau
|
Jul 27, 2008 - 10:23 PM
|
Dear support team, How do I completely hide an control in status bar created by CExtStatusControlBar::SetPaneControl(...) in running time (i.e. after initialization)? Thanks, Chun Pong
|
|
Technical Support
|
Jul 30, 2008 - 4:23 AM
|
It seems you just forgot to invoke the CExtStatusControlBar::RepositionControls() method.
|
|
Technical Support
|
Jul 28, 2008 - 12:19 PM
|
You can remove a status pane by using the CExtStatusControlBar::RemovePane() method. Then you can insert a status pane again using CExtStatusControlBar::AddPane() . By using the CExtStatusControlBar::SetPaneControl() method, you can attach any window created inside the status bar to a status pane. If the bAutoDestroy parameter of the CExtStatusControlBar::SetPaneControl() method is true , the CExtStatusControlBar::RemovePane() method destroys the window attached to the status pane. If it’s false , the attached window will simply be hidden.
|
|
Chun Pong Lau
|
Jul 28, 2008 - 4:26 PM
|
No. the ways you suggested is NOT working. I SetPaneControl() with bAutoDestroy = false then RemovePane() then AddPane() again. It shows up again but there are space left in the old position of the control bar in the status bar.
|
|
Chun Pong Lau
|
Jul 27, 2008 - 10:22 PM
|
Dear support team, After initialization, when I use CExtStatusControlBar::SetPaneWidth(...) , how do I refresh it dynamically? Thanks, Chun Pong
|
|
Technical Support
|
Jul 28, 2008 - 12:30 PM
|
You should use the CExtStatusControlBar::RepositionControls() method.
|
|
Offer Har
|
Jul 27, 2008 - 7:33 AM
|
|
|
Technical Support
|
Jul 28, 2008 - 12:23 PM
|
|
|
Offer Har
|
Aug 3, 2008 - 4:20 PM
|
|
|
Technical Support
|
Aug 5, 2008 - 12:49 PM
|
Dear Ron,
We cannot reproduce the problem with item hiding and removing. Wherever we call the following code in the method of the CExtTreeGridWnd -derived class it does not crash:
HTREEITEM htiTop1 = ItemInsert( NULL, ULONG(-1L), 1L, false ); ItemExpand( htiTop1, TVE_EXPAND, false );
HTREEITEM htiChild1ofTop1 = ItemInsert( htiTop1, ULONG(-1L), 1L, false );
HTREEITEM htiChild2ofTop1 = ItemInsert( htiTop1, ULONG(-1L), 1L, false );
HTREEITEM htiTop2 = ItemInsert( NULL, ULONG(-1L), 1L, false ); ItemExpand( htiTop2, TVE_EXPAND, false );
HTREEITEM htiChild1ofTop2 = ItemInsert( htiTop2, ULONG(-1L), 1L, false );
HTREEITEM htiChild2ofTop2 = ItemInsert( htiTop2, ULONG(-1L), 1L, false );
ItemHide( htiTop1, true, false );
ItemRemove(htiChild1ofTop1, false, false);
ItemRemove(htiChild2ofTop1, false, false);
OnSwUpdateScrollBars();
|
|
Offer Har
|
Aug 5, 2008 - 12:54 PM
|
Sent - please let me know you got it or not...
|
|
Technical Support
|
Aug 5, 2008 - 2:21 PM
|
Dear Ron,
Your test project really helped us to find and fix the bug with removing tree rows at the bottom of some hidden tree rows. Thank you. Please update the source code for the following method:
ULONG CExtTreeGridDataProvider::_Tree_NodeRemove(
CExtTreeGridCellNode * pNode,
bool bChildrenOnly // = false
) // returns count of removed items
{
ASSERT_VALID( this );
ASSERT_VALID( pNode );
ASSERT_VALID( m_pCellRoot );
CExtGridDataProvider & _DP = _Tree_GetCacheDP();
ULONG nReservedRowCount = 0;
_DP.CacheReservedCountsGet( NULL, &nReservedRowCount );
ULONG nAdjustOffset = 1;
if( LPVOID(pNode) == LPVOID(m_pCellRoot) )
{
bChildrenOnly = true;
nAdjustOffset = 0;
}
bool bNodeIsHidden = pNode->TreeNodeHiddenGet();
if( bNodeIsHidden )
pNode->TreeNodeHiddenSet( *this, false );
ULONG nCountRemoved = 0,
nIdx,
nChildrenCount = pNode->TreeNodeGetChildCount();
for( nIdx = 0; nIdx < nChildrenCount; nIdx++ )
{
CExtTreeGridCellNode * pChildNode = pNode->TreeNodeGetChildAt( nIdx );
ASSERT_VALID( pChildNode );
ULONG nSubCountRemoved = _Tree_NodeRemove( pChildNode, true );
nCountRemoved += nSubCountRemoved;
}
ULONG nContentWeight = pNode->_ContentWeight_Get( false );
ULONG nOffset = pNode->TreeNodeCalcOffset( false );
bool bDisplayed = pNode->TreeNodeIsDisplayed();
bool bExpanded = pNode->TreeNodeIsExpanded();
ULONG nVisibleOffset = 0;
if( bDisplayed )
nVisibleOffset = pNode->TreeNodeCalcOffset( true, false );
if( nContentWeight > 0 )
{
m_arrGridRef.RemoveAt( nOffset + nAdjustOffset, nContentWeight );
if( bDisplayed && bExpanded )
{
#ifdef _DEBUG
if( LPVOID(pNode) != LPVOID(m_pCellRoot) )
{
CExtTreeGridCellNode * pDebugTestNode = m_arrGridVis.GetAt( nVisibleOffset );
ASSERT_VALID( pDebugTestNode );
ASSERT( LPCVOID(pDebugTestNode) == LPCVOID(pNode) );
}
#endif
ULONG nVisibleContentWeight = pNode->_ContentWeight_CalcVisible();
m_arrGridVis.RemoveAt( nVisibleOffset + nAdjustOffset, nVisibleContentWeight );
pNode->_ContentWeight_Decrement( nVisibleContentWeight, false );
pNode->m_arrChildren.RemoveAll();
}
else
{
pNode->m_arrChildren.RemoveAll();
pNode->_ContentWeight_DecrementNonExpanded( nContentWeight );
pNode->_ContentWeight_Adjust();
}
ASSERT( pNode->_ContentWeight_Get(true) == 0 );
ASSERT( pNode->_ContentWeight_Get(false) == 0 );
nCountRemoved += nContentWeight;
VERIFY( _DP.RowRemove( nOffset + nAdjustOffset + nReservedRowCount, nContentWeight ) );
}
if( ! bChildrenOnly )
{
CExtTreeGridCellNode * pNodeNext = pNode->m_pNodeNext;
CExtTreeGridCellNode * pNodePrev = pNode->m_pNodePrev;
CExtTreeGridCellNode * pNodeParent = pNode->m_pNodeParent;
ASSERT_VALID( pNodeParent );
ULONG nSiblingIdx = pNode->TreeNodeGetSiblingIndex();
if( pNodeNext != NULL )
{
ASSERT_VALID( pNodeNext );
ASSERT( LPCVOID(pNodeNext->m_pNodePrev) == LPCVOID(pNode) );
pNodeNext->m_pNodePrev = pNodePrev;
}
if( pNodePrev != NULL )
{
ASSERT_VALID( pNodePrev );
ASSERT( LPCVOID(pNodePrev->m_pNodeNext) == LPCVOID(pNode) );
pNodePrev->m_pNodeNext = pNodeNext;
}
pNodeParent->m_arrChildren.RemoveAt( nSiblingIdx );
ULONG nResetIdx = nSiblingIdx, nResetCnt = ULONG( pNodeParent->m_arrChildren.GetSize() );
for( ; nResetIdx < nResetCnt; nResetIdx++ )
{
CExtTreeGridCellNode * pNode = (CExtTreeGridCellNode *)
pNodeParent->m_arrChildren.GetAt( nResetIdx );
ASSERT_VALID( pNode );
ASSERT_KINDOF( CExtTreeGridCellNode, pNode );
pNode->m_nOptIndex = nResetIdx;
}
if( bDisplayed )
{
#ifdef _DEBUG
if( LPVOID(pNode) != LPVOID(m_pCellRoot) )
{
CExtTreeGridCellNode * pDebugTestNode = m_arrGridVis.GetAt( nVisibleOffset );
ASSERT_VALID( pDebugTestNode );
ASSERT( LPCVOID(pDebugTestNode) == LPCVOID(pNode) );
}
#endif
m_arrGridVis.RemoveAt( nVisibleOffset );
pNodeParent->_ContentWeight_Decrement( 1, false );
}
else
{
pNodeParent->_ContentWeight_DecrementNonExpanded( 1 );
pNodeParent->_ContentWeight_Adjust();
}
VERIFY( _DP.RowRemove( nOffset + nReservedRowCount ) );
}
return nCountRemoved;
}
|
|
Offer Har
|
Aug 5, 2008 - 12:52 PM
|
Dear Support, I am sending you now via mail an application that demonstrates the bug. Please let me know when you get it and that you were able to reproude the bug. Regards, Ron.
|
|
Offer Har
|
Jul 28, 2008 - 12:26 PM
|
I sent you an exact scenario when this bug happens.
|
|
Chun Pong Lau
|
Jul 26, 2008 - 6:15 AM
|
Dear support team,
At the top-rightmost corner of an application with ribbon bar, how can I remove the "close" button there?
_ (min) [ ] (max) [x] (close)
Regards, Chun Pong
|
|
Technical Support
|
Jul 28, 2008 - 12:31 PM
|
The standard buttons in the standard window caption are always 3 buttons or only one close button. We emulated this behavior in both menu bar and ribbon bar. We can consider your message as a feature request.
|
|
Chun Pong Lau
|
Jul 28, 2008 - 1:34 PM
|
Yes. We cannot do it in menubar as well. We would really appreciate your effort about this.
|
|
Chun Pong Lau
|
Jul 26, 2008 - 7:36 AM
|
Please not that we are not asking how to disable the close button by GetSystemMenu(). Our expected result should be: _(min) [ ] (max) the close button is simply removed with min & max button retained. How can I do this? Thank you very much.
|
|
tera t
|
Jul 26, 2008 - 3:03 AM
|
Hello. I want to install a closing button to a normal CExtTabPageContainerFlatWnd.
|
|
Technical Support
|
Jul 28, 2008 - 5:09 AM
|
The CExtTabPageContainerWnd::CloseOnTabsSet() method enables "X" buttons on each tab item. You should override the CExtTabPageContainerWnd::OnTabWndClickedItemCloseButton() virtual method so that you can handle "X" button clicks.
|
|
Chun Pong Lau
|
Jul 25, 2008 - 11:36 PM
|
How do I hide a CExtDynamicControlBar considering it may be under all cases including docked, floating, autohide? Thanks a lot.
|
|
Technical Support
|
Jul 28, 2008 - 12:32 PM
|
In the case of dynamic resizable control bars, you should use the <code>CExtDynamicControlBar::BarStateSet()<code>method for both changing bar states and showing/hiding bar in each state.
|
|
Krustys Donuts
|
Jul 25, 2008 - 6:51 PM
|
I am trying to put an HICON (converted from a CExtBitmap) on a CExtButton. The first two blocks of code show how I am converting two 24-bit bitmap resources into two HCON handles. This creation ocurrs in the constructor of a CExtResizableDialog derived class. The on button handler below shows how I am attempting to switch the button’s icon when the user presses the button. The problem is stated below: - Upon boot, the button shows the default icon fine. This icon is set in the OnInitDialog routine.
- The first press works fine. The icon is toggled as expected.
- The second press, the button shows no icon. Just blank.
- All subsequent presses show a blank icon.
It cannot figure out what is wrong. Gil //Load bitmap for maximize tab button and setup button. VERIFY(bmpTemp.LoadBMP_Resource( MAKEINTRESOURCE(IDB_bmpMaxTabSize), RT_BITMAP, GlobalInstance)); bmpTemp.Make32(); bmpTemp.AlphaColor( RGB(255,255,255), RGB(0,0,0), 0); m_hIconMaxTabSize = bmpTemp.CreateHICON(); //Load bitmap for minimize tab button. VERIFY(bmpTemp.LoadBMP_Resource( MAKEINTRESOURCE(IDB_bmpMinTabSize), RT_BITMAP, GlobalInstance)); bmpTemp.Make32(); bmpTemp.AlphaColor( RGB(255,255,255), RGB(0,0,0), 0); m_hIconMinTabSize = bmpTemp.CreateHICON(); void VRTabTeachpoints::OnBnClickedMaxScreen() { //!This call will toggle the full-screen mode state and adjust the tab size //!appropriately. That is, if the call toggles the state to full-screen, the //!tab size is increased. If the call toggles the state to normal-size, //!the tab size will be decreased. m_diagnostics.SetTabFullSizeFlg(!m_diagnostics.GetTabFullSizeFlg()); //Change the icon on the button. HICON hIcon = m_diagnostics.GetTabFullSizeFlg() ? m_hIconMinTabSize : m_hIconMaxTabSize; m_btnMaxScreen.SetIcon(hIcon); }
|
|
Technical Support
|
Jul 28, 2008 - 5:08 AM
|
If you are passing some HICON handle in CExtButton::SetIcon() , you should forget about this HICON handle. It becomes part of an internal image object inside the button control so the HICON handle does not exist after the CExtButton::SetIcon() method returns execution control.
We would like to ask you not to use HICON handles at all because only latest two Windows version (XP and Vista) support icons with alpha channel. Please use the m_btnMaxScreen.m_icon.m_bmpNormal property directly. This is an object of CExtBitmap type. You can assign it from other CExtBitmap objects.
|
|
tera t
|
Jul 24, 2008 - 7:53 PM
|
I ask for your advice.....
|
|
Technical Support
|
Jul 25, 2008 - 6:21 AM
|
We are sorry but you did not specify what your question is.
|
|
marc uchida
|
Jul 24, 2008 - 3:39 PM
|
I have a Vista Aero problem with ProfUIS containers. I am developing an app that has custom controls in a window that behaves just fine under XP and under Vista with non-Aero themes. When
Aero/DWM is on however, the dialog window becomes opaque in parts of the dialog (random spots, not the whole dialog) and the controls therein will often vanish whenever a RedrawWindow(&rect, NULL, RDW_INVALIDATE |RDW_ALLCHILDREN); is called. I have used SetWindowLong() and SetLayeredWindowAttributes() to turn off any transparency attributes or opacity (in case it was inheriting these from somewhere) to no effect. Invalidating the controls or the window programatically (for a repaint) does not have any effect, in fact it seems to be what
triggers the controls from being lost from sight. I’ve done every combination of UpdateWindow, Invalidate, RedrawWindow, etc. to no avail, in fact the more I call Invalidate the worse it gets sometimes. Resizing the window manually at runtime forces the whole shebang to be redrawn correctly however!
My hardware should not be the problem as it is fast (high Vista rating 5.9 for graphics Aero desktop performance). It feels like a timing problem, or an order of Paint problem. My problematic Dialog has a picture control in it. I set a tabbed container in the picture control. This tabbed container is a CExtTabPageContainerFlatWnd. The dialog is aCExtResizableDialog. It is within the CExtTabPageContainerFlatWnd container that I am having all my problems. I wasn’t sure where the problem might be rooted until I converted theCExtResizableDialog back to a plain CDialog. The result was that the opacity problem went away. My controls still vanish in the tabbed container though, when they are invalidated. Any ideas on what might be causing this grief? Or is there a way to deactivate DWM in a CExtResizableDialog only?? (not the whole desktop, which I already know how to do and it is not appropriate for a fix at this time).
thanks p.s. thought I should mention that, unfortunately, to complicate matters, my controls in the tabbed container are custom controls.
|
|
Technical Support
|
Jul 25, 2008 - 11:46 AM
|
Please send us some screen shots demonstrating the painting problem. Are you using any DWM functions during your dialog window initialization?
|
|
David Skok
|
Jul 24, 2008 - 1:33 PM
|
How can I tell if a control bar is visible or represented by a docked tab as opposed to closed and no visible tab shows for the control bar? What event can I use to know when this status changes? I need to know this because my app can display a diagnostic control bar using a secret hot key. The contents of this diagnostic control bar use a timer to request data over a wire. I do not want the contents to send out the requests if the control bar is not visible at all. It is ok to update if the control bar is docked and retracted though.
|
|
Technical Support
|
Jul 25, 2008 - 5:54 AM
|
You can handle the WM_WINDOWPOSCHANGED and WM_SHOWWINDOW messages in your CExtControlBar -derived class and check the control bar’s visibility using the CExtControlBar::IsVisible() method. If the control bar is not visible, it can be auto-hidden (CExtControlBar::AutoHideModeGet() ) and control bar’s child window can be displayed outside the control bar window when the user selects a tab item from the auto-hide area. If the control bar is visible and it is non-selected inside a tabbed bar group, its child window is not visible. So, it is easier to handle WM_PAINT and WM_TIMER messages in the control bar’s child window and do the following:
1) Your child window should know whether the timer based updating is on each moment.
2) If the WM_PAINT message is received, then the timer based updating should run.
2) If the WM_TIMER message is received, you should check whether the child window is visible using the IsWindowVisible() API. If the window is not visible, the timer should be stopped. If it’s visible, the data should be updated and window should be re-painted.
|
|
Chun Pong Lau
|
Jul 24, 2008 - 10:37 AM
|
Dear support team, Instead of StateLoad/StateSave the GUI state of all the dynamic control bars in the dynamic bar site. How can I save one GUI state of a dynamic control bar each time? It’s critical to our project development. Please help. Thank you very much. Regards, Chun Pong
|
|
Technical Support
|
Jul 25, 2008 - 5:49 AM
|
Location of any control bar always depends on location of other control bars. In most cases, docking a control bar into some location is the result of position calculations relative to already docked other bar. So, it’s not possible to save/load state of one bar only. Please provide us with more details about your task so we can try to find a solution.
|
|
Neville Franks
|
Jul 22, 2008 - 4:31 PM
|
Users that customize toolbars and commands using the Prof-UIS customization system loose all of their customizations when we put out a new release which includes new toolbar, menu or keyboard items. This makes for very unhappy customers. To get our new toolbar etc. items to appear we need to either "clean the registry state or use a new registry folder for the new version of UI." as per an e-mail from Sergiy Lavrynenko 13 Feb 2004, which is what we do. When our users have spent a lot of time customizing the UI and then loose all of their settings they are understandably very annoyed. Is there some way we can get new UI items to appear and keep all of the users customized settings?
|
|
Technical Support
|
Jul 23, 2008 - 11:52 AM
|
The easiest solution available right now is to create new toolbars in new application version as user-defined toolbars. It’s also possible to let your application determine which toolbar state version it will load, then create only toolbars present in old version, load their states and create new toolbars finally.
|
|
tera t
|
Jul 22, 2008 - 2:33 AM
|
Hello. I want to make the following menu non-indication.
Thanks,
|
|
tera t
|
Jul 22, 2008 - 2:33 AM
|
Hello. I want to make the following menu non-indication.
Thanks,
|
|
tera t
|
Jul 23, 2008 - 6:18 PM
|
Hello. >Do you want to remove this menu or just modify it? It wants not to be changed in MDI. Is it difficult?
|
|
Technical Support
|
Jul 25, 2008 - 5:31 AM
|
You should create and use a custom dynamic control bar class: // in .H file
class CYourDynamicControlBar : public CExtControlBar
{
public:
DECLARE_SERIAL( CYourDynamicControlBar );
virtual bool OnInitDbsMenu(
CExtPopupMenuWnd * pPopup,
HWND hWndTrack,
CObject * pHelperSrc,
LPARAM lParamHelper = 0
)
{
bool bRetVal = OnInitDbsMenu( pPopup, hWndTrack, pHelperSrc, lParamHelper );
INT nPosToRemove = pPopup->ItemFindPosForCmdID( ID_EXT_DYN_BAR_TABBED_DOCUMENT );
if( nPosToRemove >= 0 )
pPopup->ItemRemove( nPosToRemove );
nPosToRemove = pPopup->ItemFindPosForCmdID( ID_EXT_DYN_BAR_MDI_DOCUMENT );
if( nPosToRemove >= 0 )
pPopup->ItemRemove( nPosToRemove );
return bRetVal.
}
};
// in .CPP file
IMPLEMENT_SERIAL( CYourDynamicControlBar, CExtDynamicControlBar, VERSIONABLE_SCHEMA|1 ); You should also use RUNTIME_CLASS(CYourDynamicControlBar) in the pDesiredRTC parameter of the CExtDynamicBarSite::BarAlloc() method.
|
|
tera t
|
Jul 25, 2008 - 6:53 PM
|
|
|
Technical Support
|
Jul 23, 2008 - 10:56 AM
|
Do you want to remove this menu or just modify it?
|
|
Chun Pong Lau
|
Jul 21, 2008 - 11:49 PM
|
Dear support team, When I CExtDynamicBarSite::StateSave() of a layout with tabbed control bars and then CExtDynamicBarSite::StateLoad() will fail. When I do this after removing all tabs, it will be ok. Is it possible to save the states of the tabbed control bars as well? Thanks a lot. Regards, Chun Pong
|
|
Technical Support
|
Jul 23, 2008 - 11:48 AM
|
The state loading algorithm requires the exact match between state data and control bars created inside the main frame window. If you are using the same persistent number of bars, the state loading will be performed successfully. You may need to remove the state data from the registry manually during development process when the number of resizable bars changes or when dialog control identifiers of some bars change. If you need a dynamic number of resizable control bars at run-time, you should use dynamic resizable bars demonstrated in the SDI_DynamicBars and MDI_DynamicBars samples.
|
|
Ching Yuan Lee
|
Jul 21, 2008 - 8:45 PM
|
Hi, We have a MDI application with child frame that contains a splitter window that has 2 panes (pane A and B). If we wish to put tabbed views into pane B, how can we go about this? Thanks! Regards, Ching Yuan
|
|
Technical Support
|
Jul 23, 2008 - 11:33 AM
|
You should create a CExtTabPageContainerWnd window as a splitter’s pane. The parent of the CExtTabPageContainerWnd window should be the CExtSplitterWnd window (or CSplitterWnd ). You should use the CSplitterWnd::IdFromRowCol() method for computing the dialog control identifier of the CExtTabPageContainerWnd . You should also create several child windows of the CExtTabPageContainerWnd window and register them as tab pages using CExtTabPageContainerWnd::PageInsert() .
|
|
Chun Pong Lau
|
Jul 21, 2008 - 4:38 AM
|
Dear support team, I’ve found that after I perform DockControlBarInnerOuter() or DockControlBar() on a docked control bar multiple times,
the control bars will be resized. What can I do to prevent this? Should I reset or check the docking status first before any docking? But how do we check the docking status? like
AFX_IDW_DOCKBAR_LEFT, AFX_IDW_DOCKBAR_RIGHT, AFX_IDW_DOCKBAR_TOP, or AFX_IDW_DOCKBAR_BOTTOM and the nested relationship between all control bar made up by all docking functions, like DockControlBarInnerOuter(), DockControlBar(), DockControlBarIntoTabbedContainer() and DockControlBarLTRB()? Regards, Chun Pong
|
|
Technical Support
|
Jul 23, 2008 - 11:37 AM
|
Please note that the CExtControlBar::DockControlBar() method in Prof-UIS is used only for compatibility with very old Prof-UIS versions. You should use the CExtControlBar::DockControlBarInnerOuter() and CExtControlBar::DockControlBarLTRB() methods instead. The CExtControlBar::SetInitDesiredSizeHorizontal() and CExtControlBar::SetInitDesiredSizeVertical() methods can be used either during control bar initialization and later at run-time. These methods allow you to specify desired control bar sizes and then invoke the CFrameWnd::RecalcLayout() method for applying the changes. Each resizable control bar remembers it’s docked sizes. If some resizable bar has a 300 pixels width in its vertically docked location and you re-dock it into one 200-pixel width column with other bar(s), the desired width of the re-docked bar becomes 200 pixels. So, in most cases there is reason to limit the size of control bars.
|
|
Chun Pong Lau
|
Jul 20, 2008 - 1:24 PM
|
Dear support team, I know a resizable control bar can be sized initially or resize in floating mode. (i.e. by SetInitDesiredSizeFloating, SetInitDesiredSizeHorizontal, SetInitDesiredSizeVertical) But I don’t know how to resize it when it is docked. It is very important to my project development. Please help. Thanks a lot. Regards, Chun Pong
|
|
Chun Pong Lau
|
Jul 28, 2008 - 1:37 PM
|
Suppose there are only two resizable control bars. We can detect their common container by comparing locations with GetWindowRect(). How can we resize this container?
|
|
Technical Support
|
Jul 30, 2008 - 4:01 AM
|
We can code some algorithm which resizes the bar and recursively resize all its parent containers. But if we invoke this algorithm for several different bars, esizing of some next bar will typically downsize previously resized bars. Please assume resizable control bars as fully resizable by user windows. Such bars are typically configured by the user once when he/she starts using application and then they never become resized.
|
|
Technical Support
|
Jul 23, 2008 - 11:40 AM
|
Here is the sample that demonstrates how to manage floating control bars programmatically:
ChangeFloatingSize
You can use the same approach for docked control bars.
|
|
Chun Pong Lau
|
Jul 23, 2008 - 1:44 PM
|
I am sorry to tell you that the methods used in the project only works for the floating control but NOT for the docked controls. Please advice.
|
|
Technical Support
|
Jul 25, 2008 - 5:21 AM
|
Here is the updated version of this sample application. We added two methods, CChangeFloatingSizeView::OnButtonWidth() and CChangeFloatingSizeView::OnButtonHeight() , which are very similar to the CChangeFloatingSizeView::OnButtonFloat() method from the previous version of this sample application.
|
|
Chun Pong Lau
|
Jul 25, 2008 - 10:11 AM
|
What if we want to resize 2 control bars which are docked in the following way?
m_wndResizableBar.DockControlBarInnerOuter( AFX_IDW_DOCKBAR_LEFT, false );
m_wndResizableBar2.DockControlBarLTRB(60, &m_wndResizableBar, AFX_IDW_DOCKBAR_BOTTOM, true); It seems both the advised functions OnButtonWidth() & OnButtonHeight() are not working then.
|
|
Technical Support
|
Jul 26, 2008 - 10:46 AM
|
The two lines of code in your message dock two control bars into one row container bar. It’s possible to resize the entire container bar but not its parts because the size of its parts is managed by the container bar using proportional resizing algorithm. The same is true for tabbed bar containers.
|
|
Chun Pong Lau
|
Jul 26, 2008 - 11:50 AM
|
Please advise us how to resize the entire container bar. It would really help.
|
|
Technical Support
|
Jul 28, 2008 - 12:30 PM
|
It’s possible to get a pointer to the container bar and resize it, but the container bar can be placed inside other container bar and so on. For instance, one row of bars can be part of other column of bars and so on. As a result, there is not point even to try to resize control bars. The control bars are fully resizable by the user without any limits. But it’s not really possible to identify location of resizable bars and relative to its containers whcih makes programmatic control bar resizing unreasonable.
|
|
Chun Pong Lau
|
Jul 20, 2008 - 12:05 AM
|
Dear support team, When I right click the status bar of a PROF-UIS application, there is a context menu showing each control bar, when I click a control bar in this context menu, it will be shown again if it is hidden. The question is how to add/remove a control bar from this menu. Thanks a lot. Regards, Chun Pong
|
|
Technical Support
|
Jul 23, 2008 - 11:42 AM
|
If you need to hide some control bar from built-in Prof-UIS menus, you should set its CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false. You can also re-create or modify any built-in menus by handling the CExtControlBar::g_nMsgConstructPopupMenu registered message. As an example, you can use the ProfStudio, which replaces the most of built-in Prof-UIS menus with custom menus..
|
|
Chun Pong Lau
|
Jul 23, 2008 - 1:46 PM
|
I tired to set CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu to false in CMainFrame::OnCreate(), but somewhere in PROF-UIS library it set it to true again.
Where should I set it actually?
|
|
Technical Support
|
Jul 25, 2008 - 5:13 AM
|
The dynamic control bars represented by CExtDynControlBar can modify the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property when state is loaded at run-time. The simple control bars represented by CExtControlBar never change this property. So, if you are using simple control bars, you should set the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false anytime/anywhere after a CExtControlBar C++ object is instantiated. In the case of dynamic control bars, you should override the CExtControlBar::OnConstructDockSiteControlBarPopupMenu virtual method and simply return false from it. The latter method is also applicable to simple control bars.
|
|
Chun Pong Lau
|
Jul 26, 2008 - 11:51 AM
|
|