Subject |
Author |
Date |
|
howard liu
|
Oct 14, 2008 - 6:42 AM
|
Hi, I have applied Prof-UI over many of the UI in my application. When i have the UI open and click on the title bar to see the control menu items (like , Restore, Move, size, minimize, maximize,close) and try to use the ’Size’ menu item and then try to resize the interface either through the cursor or through the key i see some irregularity in the x axis (length) and y axis (height) of user interface. The user interface is not regular Thanks, Howard
|
|
Technical Support
|
Oct 14, 2008 - 11:56 AM
|
Resizing can be slow if the resized window contains a complicated layout of child windows similar to what you see in the ProfUIS_Controls sample. If you have some heavy timer based code which also re-paints the window, you should handle the WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE messages in order to determine when your window is resized. At this moment, just pause your timer-based operations.
|
|
Christan HIRIGOYEN
|
Oct 14, 2008 - 3:16 AM
|
when I have in the previewArea of CExtReportGrid long long text, the text wrap to new lines in print preview. How to make the previewArea size over all columns? and how to see on printer the same thing I have in my grid? Thanks,
|
|
Technical Support
|
Oct 15, 2008 - 11:46 AM
|
You can use multi-line text grid cells to see multi line output in the print preview window and on printed documents. But we agree with you, we should add an optional text wrapping feature for printout measurement and generation into all the text based grid cells.
Could you tell us what you mean by : How to make the previewArea size over all columns?. The printing/previewing output is generated differently than the image of the grid window surface. Of course, each grid cell paints itself using the same methods in both cases. But loops which enumerate and draw grid cells when painting grid window and printing are different because these tasks are different. For instance, the printing task requires splitting data into pages. The grid window painting task uses different background painting for header cells using currently installed paint manager, grid line painting, empty area lines painting, hover/pressed effect painting and other.
|
|
Christan HIRIGOYEN
|
Oct 14, 2008 - 3:10 AM
|
Is it possible to allow edition in place in the cell of the PreviewArea in a CExtReportGrid ? thanks
|
|
Technical Support
|
Oct 14, 2008 - 12:01 PM
|
The grid cells are objects with different data (not only text data), different in-place activated controls and even control-like emulations painted on cell surface. We can make first cell in each report group painting and editing itself in pace of group row and synchronize other cells in the report group from it. But this will work only for text-based grid cells. Besides, editing big count of cells may bring performance problems.
|
|
Offer Har
|
Oct 13, 2008 - 7:40 PM
|
|
|
howard liu
|
Oct 13, 2008 - 7:44 AM
|
Hi, After applying Prof-UI over the property pages, I do not see the contents of page. To see the contents of that page I need to click on the tab header. In other words, I need to click on the tab header to see the contents of that page. Without clicking the tab header the page looks empty. I would want to see a page with all the contents (other controls) as I open it, ie. even without clicking the tab header Thanks, Howard
|
|
Technical Support
|
Oct 17, 2008 - 1:22 PM
|
What the library version you are using? We cannot reproduce the problem with the latest one.
|
|
howard liu
|
Oct 13, 2008 - 7:39 AM
|
Hi, I am using prof ui over the user interfaces. In this there are requirements for loading .avi (audio vedio) icons over a button is it possible Thanks, Howard
|
|
Technical Support
|
Oct 17, 2008 - 1:21 PM
|
There is no support for avi icons in the buttons. But we believe it’s not difficult to implement this yourself. Just use timers and the avi processing code that can be found in the AviFrames sample where you can see how to read and display the avi files.
|
|
Offer Har
|
Oct 13, 2008 - 7:30 AM
|
Hi, I think there is a design problem with this class. If I have a CView derived class that implement OnPrepareDC, I cannot use this template because it is defined as follows:
template < class _BC >
class CExtPPVW
: public _BC
, public CExtPPVW_Printable So, both CExtPPVW_Printable and my CView derived class (_BC) implement the same virtual function... What way do you suggest to bypass this problem? Thanks, Ron.
|
|
Technical Support
|
Oct 14, 2008 - 4:07 AM
|
The CDrawView class in the DRAWCLI sample demonstrates how to resolve this problem. If you have two and more parent classes in some of your class and these classes have the same virtual method, then this method should be overridden in your class.
|
|
Offer Har
|
Oct 13, 2008 - 7:12 AM
|
Hi. I have a CView derived class that uses a bitmap to blt the view for flicker free operation. When I use the default Print-Preview, all is well. When I use your Print-Preview, the new menu you add is under the bitmap of my view, so it is not displayed, unelss I hover over a button, and then it is displayed and flickers until I leave the area... How does your CExtPPVW support such design, and if not, please solve this problem. Thanks, Ron.
|
|
Technical Support
|
Oct 14, 2008 - 4:08 AM
|
The CDrawView class in the DRAWCLI sample demonstrates how to use the CExtPPVW template class with MFC’s document/view architecture. Please also ensure you applied WS_CLIPCHILDREN|WS_CLIPSIBLINGS to your view window.
|
|
Offer Har
|
Oct 10, 2008 - 9:38 AM
|
Hi, I need to make a control bar that is a child of a CView derived class, can this be done? how? Thanks, Ron.
|
|
Technical Support
|
Oct 11, 2008 - 10:36 AM
|
First of all, re-dockable control bars can be created inside a frame window only. Non-redockable control bars which are statically placed near a border of their parent window can be created inside any window type. For instance, you can see toolbars created inside the main dialog of ProfUIS_Controls sample application. You can create them exactly in the same way inside your view window. You should only invoke the CWnd::RepositionBars( 0, 0xFFFF, 0 ); code both after creation of all the bars and in the WM_SIZE message handler. This code is needed to place all the bars near the borders of your view window. You will also probably need to know the rectangular area in the center of your view window which is free of any bars. This area will be used in your view’s painting code. Here is how to compute it: CWnd * pYourViewWindow = . . .
CRect rectFreeOfBarsAtCenter;
pYourViewWindow->GetClientRect( &rectFreeOfBarsAtCenter );
pYourViewWindow->RepositionBars( 0, 0xFFFF, 0, CWnd::reposQuery, &rectFreeOfBarsAtCenter, &rectFreeOfBarsAtCenter );
The CExtMenuControlBar , CExtToolControlBar , CExtStatusControlBar , CExtTabbedToolControlBar , CExtRibbonPage and CExtRibbonBar control bars can be created inside any window. The CExtControlBar , CExtDynamicControlBar and CExtPanelControlBar control bars are designed as re-dockable and you should not create them as static control bars because they even unable to occupy the entire available width in horizontal direction nor the entire available height in vertical direction. If you need re-dockable control bars inside your view window, then you should create a CFrameWnd window with WS_CHILD style inside your view, create all the required control bars inside this frame window and implement a new view window for this frame to occupy its center area. This design is not often used, but we helped our customers to implement it several times. For instance, tehre was a customer project (an ActiveX control) for running inside Internet Explorer’s HTML pages and the entire area of this ActiveX control is covered by the CFrameWnd window created with WS_CHILD style. This frame contained redockable control bars: menu bar, toolbars, resizable control bars and status bar.
|
|
Offer Har
|
Oct 13, 2008 - 9:24 AM
|
The control bar I have is a CExtControlBar , as it is a dialog embedded in a control bar. My scenario is that I have some specific views that I don’t want the control bar to get out of, as they are not relevant outside these views. How do you suggest I should implement this kind of architecture? This is a very storg requirement I have, because if these control bars will start ’travel’ between views or to the main frame ther UI will be un-maintainable.
|
|
Technical Support
|
Oct 14, 2008 - 4:45 AM
|
If you need several windows inside one view and these windows do not need to be hidden/show nor re-arranged relatively to each other, you should use a splitter window (the CSplitterWnd class in MFC, the CExtSplitterWnd class in Prof-UIS). If you need the same but, one or more of the following is also required:
1) Some windows inside your view window should be optionally hidden/shown. 2) The user should be able to drag-n-drop windows to change their mutual position or their position should be changed programmatically. 3) The layout of windows inside your view window should be persistent. It should be saved/restored.
Then you should use child frame window inside your view window. It’s not difficult nor complicated as it sounds. Just create a CFrameWnd window using CWnd::Create() method and use your view window as the parent window. Then create inner content of this frame window like it’s small SDI frame based application without MFC’s document/view architecture applied. Of course, your view window should resize its child frame window when view becomes resized.
Please also note, the resizable control bars without caption work and look like panes inside MFC splitter window but you are able to show hide them programmatically and their parent frame window is able to save/restore layout of bars.
|
|
Offer Har
|
Oct 15, 2008 - 6:47 AM
|
I’m implemented the child fraem as you suggested, but there are a couple of problems.: 1) When I drag the control-bar (move it around) I see the guide 4 handles, and the guide locations, but for some reason they leave some space on each size of the view as you can see in the screenshot below. 2) When I dock the control-bar, it acts like it is docking, but the control bar just disappear - is there any more initialization I need to perform? 3) The most problematic of all - I can still take the control-bar outside the view - my major requirement is that the control-bar will not leave the view, as the data in it is relevat only to that spefici view. This what I did in OnInitialUpdate of my view: CRect rc;
GetClientRect(rc);
m_pChildFrm = new CFrameWnd;
m_pChildFrm->Create(NULL, "RON", WS_CHILD, rc, this);
This is the spacing problem:
Thanks, Ron.
|
|
Technical Support
|
Oct 16, 2008 - 12:37 PM
|
1) Please check the styles with which your child frame window is created and all its chain of parent windows. We guess one or more windows have un-needed borders provided by WS_EX_CLIENTEDGE , WS_EX_STATICEDGE and/or WS_EX_DLGMODALFRAME extended window styles.
2) Please make sure that the child frame window and all its parent chain of windows have WS_CLIPSIBLINGS|WS_CLIPCHILDREN window styles. We suspect the control bar is simply over-painted by some window(s).
3) There are two types of control-bar drag-n-dropping algorithms: Visual Studio .NET like and Visual Studio 2005/2008 like. In the first case the target dropping areas are shown using prediction frames and the drag-n-dropped control bar does not become floating until you drop it. In the second case the docking markers (also known as guide diamonds) are used and drag-n-dropped control bar really becomes floating during drag-n-dropping. You can override the CExtControlBar::FloatControlBar() virtual method and do not invoke the parent class method in it. Such resizable control bars will not become floating. But this approach is not very friendly to the Visual Studio 2005/2008 like drag-n-dropping algorithm based on docking markers. So, probably you will need to turn on the Visual Studio .NET like drag-n-dropping algorithm for your bars.
|
|
Offer Har
|
Oct 24, 2008 - 7:07 AM
|
About 2 - This does not work... I tried adding WS_CLIPSIBLINGS|WS_CLIPCHILDREN everywhere I could and it did nothing. I have a feeling that something conceptual is not working there. Did you check that this is even possible? This is the code to create the child view in my view’s OnInitialUpdate function: void CMyView::OnInitialUpdate()
{
CBaseView::OnInitialUpdate();
CRect rc;
GetClientRect(rc);
m_pChildFrm = new CFrameWnd;
m_pChildFrm->Create(NULL, "RON", WS_CHILD|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, rc, this);
m_pChildFrm->EnableDocking(CBRS_ALIGN_ANY);
ModifyStyle(0, WS_CLIPSIBLINGS|WS_CLIPCHILDREN);
// Enable control bars in the frame window to be re-dockable
if(!CExtControlBar::FrameEnableDocking(m_pChildFrm))
{
TRACE0("CExtControlBar::FrameEnableDocking Failed\n");
ASSERT( FALSE );
}
// Enable auto-hide feature for re sizable control bars
if(!CExtControlBar::FrameInjectAutoHideAreas(m_pChildFrm))
{
TRACE0("CExtControlBar::FrameInjectAutoHideAreas Failed\n");
ASSERT( FALSE );
} ...
Please let me know what is missing, or if possible send me a sample application demontsting this feature. Thanks, Ron.
|
|
Technical Support
|
Oct 27, 2008 - 2:23 PM
|
The MDI child frame windows are also kind of child frame windows. They are the same type of windows like we advised you to create. You can see both resizable control bars and toolbars inside child frames in the MDI_InnerOuterBars sample application and there are no un-needed borders there. Is there any reason why you are creating control bars outside your child frame class? We recommend you to code it as small SDI frame based project: create control bars in its OnCreate() handler method.
|
|
Offer Har
|
Oct 27, 2008 - 2:47 PM
|
What do you mean by "creating control bars outside your child frame class"? The motivation for all this task is to bave a control bar that is inside a view, cannot leave it and dock inside it. I have an MDI application, and I have control-bars that must not leave the view. Did I miss anything?
|
|
Offer Har
|
Oct 24, 2008 - 6:57 AM
|
About 1- I have added
cs.dwExStyle &= ~(WS_EX_CLIENTEDGE|WS_EX_STATICEDGE|WS_EX_DLGMODALFRAME); In PreCreateWindow of my child frame, and the same problem still happens. Please check what can cause all these problems.
|
|
Offer Har
|
Oct 24, 2008 - 5:37 AM
|
About 2- what do you mean? I create the view and child frame ’by the book’... what do I need to change there?
|
|
Offer Har
|
Oct 24, 2008 - 5:36 AM
|
About 3 - You did not answer to my point - I want the bar to by a child of the view / child frame, hence, will be be able to be dragged out of the view at all.
|
|
Offer Har
|
Oct 14, 2008 - 1:51 PM
|
Thanks for the detailed explanation - I do need the more complex scenario, so I will try that out. One thing that is not clear to me - currently my view draws stuff into the view using OnDraw - in this architecure change will this have any effect on the drawing? Thanks, Ron.
|
|
Technical Support
|
Oct 16, 2008 - 12:33 PM
|
The OnDraw() method always knows whether it’s invoked for painting or for printing due to the CDC::IsPrinting() method. But in the real world, applications can use exactly the same code for painting and printing only in the case of some simple graphic documents.
|
|
Eric Houvenaghel
|
Oct 7, 2008 - 1:54 PM
|
I’m using the CExtGridWnd in virtual mode. How do you enable column movement? I’d like to be able to drag and drop columns like you can do in CExtReportGirdWnd. I’m sure there’s a posting about it somewhere but I can’t find it.
|
|
Technical Support
|
Oct 9, 2008 - 6:47 AM
|
You should apply relevant __EGBS_BSE_EX_DRAG_*** styles using the grid’s BseModifyStyleEx() method. The __EGBS_BSE_EX_DRAG_START_COLUMNS | __EGBS_BSE_EX_DRAG_SWAP_COLUMNS style combination is most often used. The __EGBS_BSE_EX_HIGHLIGHT_PRESSING_COLUMNS_INNER , __EGBS_BSE_EX_HIGHLIGHT_PRESSING_COLUMNS_OUTER and __EGBS_BSE_EX_HIGHLIGHT_PRESSING_STAY_COLUMNS styles are also often used for highlighting drag-n-dropped columns.
|
|
howard liu
|
Oct 7, 2008 - 10:44 AM
|
Hi, I have implemented Porf-UI over many of the user interfaces in my application. These User Interfaces have resizable grippers at the right down corner. I would like to set a desired limit to minimize the user interface, i.e I do not want the user to minimize the user interface fully.Is it possible Thanks, Howard
|
|
Technical Support
|
Oct 9, 2008 - 6:44 AM
|
The CExtResizableDialog class is based on the CExtWA template. You should use the CExtWA::SetMinTrackSize() and CExtWA::SetMaxTrackSize() methods to limit resizing of your dialogs. These methods also affect the size of a maximized dialog window.
|
|
Offer Har
|
Oct 7, 2008 - 8:56 AM
|
|
|
Offer Har
|
Oct 8, 2008 - 2:41 PM
|
|
|
Technical Support
|
Oct 8, 2008 - 2:28 PM
|
We are sorry but the URL you provided is broken.
|
|
tera tera
|
Oct 6, 2008 - 1:34 AM
|
Hello. There is not a sample program with CExtEditWithBehavior.
I want a sample program.
|
|
Technical Support
|
Oct 6, 2008 - 1:03 PM
|
We are integrating new controls into Prof-UIS right now. This edit control will have its own demonstration dialog page inside the ProfUIS_Controls sample application.
|
|
tera tera
|
Oct 6, 2008 - 1:19 AM
|
Hello. The following errors come.
The usage of the wide character fixed number is not right.
|
|
Technical Support
|
Oct 6, 2008 - 1:03 PM
|
We believe the error will not appear if you compile the same projects on Windows OS which has English locale as default. This is well known issue of C++ compilers in all the Visual Studio versions from Visual C++ 6.0 and up to Visual Studio 2008. Of course, parsing and compilation of strings like L"\x54\x68\x61\x69" should not depend on the current locale of your Windows, but it is.
|
|
tera tera
|
Oct 6, 2008 - 6:01 PM
|
Hello. When I build from this time, I decide to change local information. Thanks,
|
|
Chun Pong Lau
|
Oct 4, 2008 - 11:49 AM
|
Dear support team, How to know when the caption bar of a control bar is clicked by mouse? Regards, Chun
|
|
Technical Support
|
Oct 6, 2008 - 1:11 PM
|
You should use your own CExtControlBar -derived class and handle the WM_LBUTTONDOWN standard message in it. This handler method will be invoked for control bar’s caption click event because the caption area has the HTCLIENT hit-test code. You should use the CExtControlBar::_RectGripGet() method to get caption rectangle.
You can use an alternative way of caption click handling: you should override the CExtControlBar::_DraggingStart() virtual method which is invoked to start drag-n-dropping algorithm when user clicks bar caption.
|
|
Ulrich Heinicke
|
Oct 3, 2008 - 1:19 PM
|
Hi, i write a folder select dialog using the class CExtShellTreeCtrl from the beta Shellcontrol for 08/28. My question is how to retrieve the fullpath of the selected folder. Do you have a new version of the ShellControls ? Thanks Ulrich
|
|
Technical Support
|
Oct 4, 2008 - 1:07 PM
|
The following code retrieves the path from a tree item: CExtShellTreeCtrl * pShellTreeCtrl = . . .
HTREEITEM hti = . . .
CExtTreeCtrl::TREEITEMINFO_t & _TII = pShellTreeCtrl->TreeItemInfoGet( hti );
CExtShellItemData * pShellItemData = (CExtShellItemData*)_TII.m_lParam;
ASSERT( pShellItemData != NULL );
CString str = pShellItemData->m_pidlAbsolute.GetPath(); But the path may be an empty string for tree items which do not represent file system locations. All the tree items have a display name. You may need to show the display name of a shell item instead of the full path: if( strPath.IsEmpty() )
str = pShellItemData->m_pidlAbsolute.GetDisplayNameOf(); Additionally, we have finished working on shell related part of Prof-UIS, including file and browse for folder dialogs: http://www.prof-uis.com/download/forums/NewControls10.zipIf the code above fails to compile with your version of Prof-UIS, please drop us an e-mail to the support mail box so we will provide you with the update.
|
|
tera tera
|
Oct 2, 2008 - 11:38 PM
|
Hello. Even if, during the input of the cell, KillFocus occurs
When contents of the input are not right, I want to control a cell
---> Because I am troubled, please teach it.
|
|
Technical Support
|
Oct 6, 2008 - 1:06 PM
|
There are several ways to code a grid cell that validates the number input and displays a popup tip window. It’s possible to create a grid cell class which does this work. It’s possible to create plain grid, tree grid, report grid and property grid classes which validate the input of numbers and display tips. Besides it’s possible to display a popup tip window constantly while entered data is not valid and hide it only when entered data becomes valid. Alternatively, it’s possible to display a popup tip window only when the user presses the Return key and data is not valid. In the latter case it’s possible to prevent the editor from destroying itself and let the user continue editing or press Escape to cancel editing. Which case is preferable for you?
|
|
tera tera
|
Oct 7, 2008 - 3:11 AM
|
Hello. I ask for a sample with a case of the former.
Give my best regards
|
|
tera tera
|
Oct 8, 2008 - 7:19 PM
|
Hello. Can you offer a sample program to me?
|
|
Technical Support
|
Oct 9, 2008 - 9:19 AM
|
We are sorry for the delay with this reply. We coded the following simplest possible test project for you:
http://www.prof-uis.com/download/forums/TestGridCellValidation.zip
It displays a balloon tip near an in-pace activated grid cell editor with all the information about the edited text including its valid state. You can modify our source code for display your text inside the tip window and perform your data input validation.
|
|
tera tera
|
Oct 22, 2008 - 1:58 AM
|
Hello. There was malfunction.
I ask for an answer. Thanks,
|
|
Technical Support
|
Oct 23, 2008 - 2:10 PM
|
It looks like you are using screen coordinates somewhere where client coordinates should be used instead.
|
|
tera tera
|
Oct 9, 2008 - 7:10 PM
|
Hello. Thank you very much.
|
|
Technical Support
|
Oct 3, 2008 - 2:04 PM
|
Displaying a modal dialog from in-pace activated controls in toolbars, menus, grids is not correct. Please use a CExtPopupMenuTipWnd window instead. This advanced tooltip control can be used for displaying balloon like tooltips which Windows uses in the logon screen near user name and password editors when CAPS LOCK mode is on. You even don’t need to keep your own instance of the CExtPopupMenuTipWnd window. The CExtPopupMenuSite::g_DefPopupMenuSite.GetTip() code returns reference to the CExtPopupMenuTipWnd window which is used by most of Prof-UIS controls. You can simply show/hide this tip window in balloon or rectangular mode near the in-place activated editor depending on whether the currently entered data is valid. The CExtPopupMenuTipWnd::SetIcon() , CExtPopupMenuTipWnd::SetText() and CExtPopupMenuTipWnd::SetTipStyle() methods allow you to configure look of the advanced tip window. The CExtPopupMenuTipWnd::Show() and CExtPopupMenuTipWnd::Hide() methods allow you to show and hide a tip window when needed.
|
|
tera tera
|
Oct 6, 2008 - 3:19 AM
|
Hello. (1)When I input it with Return key and was settled.
When input value is not right, I do not want to run Edit-DestroyWindow. Please teach the description of the program.
(2) In addition, please teach general how to use CExtPopupMenuTipWnd.
Thanks,
|
|
Offer Har
|
Oct 2, 2008 - 5:52 PM
|
|
|
Technical Support
|
Oct 6, 2008 - 1:01 PM
|
We used the same test project:
http://www.prof-uis.com/download/forums/TestTreeGridInFloatingBar2.zip
You can fing the following line of code in the CMainFrame::OnCommandReopen() method: m_wndResizableBar.SetInitDesirdSizeFloating(CSize(200, 300)); The following line of code is also present in the CMainFrame::OnCreate() method: m_wndResizableBar.SetInitDesiredSizeFloating( CSize( 400, 300 ) ); So, the initial floating window’s width is 400 and the re-open width is 200 . We tried to change the initial width to larger values ( 1000 ) and the tree grid control was still OK. The columns are resized proportionally.
|
|
Offer Har
|
Oct 6, 2008 - 1:03 PM
|
Where you able to reproduce the bug? It is very clean and no extra coding is required. I do not understand you answer, please explain - did you fix the bug? did you find a way to bypass the bug?
|
|
Technical Support
|
Oct 8, 2008 - 2:29 PM
|
We didn’t fix it because we failed to reproduce it. Could you send a compiled release version of this test project to us?
|
|
Offer Har
|
Oct 8, 2008 - 2:34 PM
|
All you have to do is to repeat the steps I explain in the original post on your original demo application you sent me - it is that simple...
|
|
Peter Meier
|
Oct 2, 2008 - 1:57 PM
|
Hi Could you please specify the estimated release date for 2.84, so that we can plan? Also, a list of new features would be very useful. Thank you - Peter
|
|
Robert Webb
|
Oct 2, 2008 - 4:18 AM
|
Hi, This is urgent (conference next week). What is the right way, if there is one, to show/hide ribbon tabs on the fly? I tried using this:
child->ModifyFlags(0, __ECTN_TBB_HIDDEN);
Which then needs these:
CExtRibbonNode *root = m_pRibbonNode;
SetButtons(NULL);
SetButtons(root);
Ribbon_UpdateLayout();
Invalidate(NULL);
UpdateWindow(); But when calling Ribbon_PageSelectionSet(), either directly or indirectly when the user clicks on a tab, it causes an assertion and can then crash. Here’s where it stops:
bool CExtRibbonBar::Ribbon_PageSelectionSet(
INT nNewSelIdx,
bool bEnableAnimation // = true
)
{
ASSERT_VALID( this );
CExtRibbonNodeTabPageCollection * pColNode = Ribbon_GetTabPageRootNode();
if( pColNode == NULL )
return false;
INT nPageIndex, nPageCount = pColNode->GetNodeCount();
ASSERT( nPageCount == RibbonTabPageButton_GetCount() ); // <---- This fails It seems that nPageCount is the total number of tabs including hidden ones, and RibbonTabPageButton_GetCount() doesn’t include the hidden ones. Is it not possible to hide tabs on the fly? Thanks, Rob.
|
|
Technical Support
|
Oct 7, 2008 - 4:53 AM
|
The [_][o][x] buttons in the command tree are represented by one CExtRibbonNodeMdiRightButtons node. This node is placed in the group of buttons on the right side of the tab item like buttons. So, the problem with disappeared [_][o][x] buttons is outside your code which manages the collection of tab nodes. We suspect you may have forgotten to invoke ribbon bar’s UpdateMenuBar() method after changing its structure of buttons.
|
|
Robert Webb
|
Oct 16, 2008 - 1:27 AM
|
Ah, thanks! Yes, UpdateMenuBar() is what I needed. It’s not that I forgot to call it. Rather I didn’t know it existed. Rob.
|
|
Technical Support
|
Oct 3, 2008 - 9:15 AM
|
We fixed this issue. Now the ribbon bar supports hidden tab pages. Please drop us an e-mail to support@prof-uis.com so we will provide you with the source code update download.
|
|
Robert Webb
|
Oct 2, 2008 - 7:30 PM
|
One alternative for me would be to keep a list of all the page nodes, and refill the page collection as required. That is, rather than hiding pages, I would remove them altogether. However, I can’t see how to remove a page from the page collection without actually deleting the node. Functions like RemoveAllNodes() actually delete the nodes. Can nodes be removed as children without being deleted? Thanks,
Rob.
|
|
Technical Support
|
Oct 3, 2008 - 1:47 PM
|
No. The CExtCustomizeCmdTreeNode::RemoveNodes() method removes nodes and deletes them. The CExtCustomizeCmdTreeNode class does not support detaching of children nodes. We didn’t add this feature because nodes are small C++ objects in memory and we supposed nobody would try to save tree leaves for some optimization.
|
|
Robert Webb
|
Oct 5, 2008 - 11:51 PM
|
I managed to write my own code to remove pages from a ribbon bar without deleting it. I derived a new class from CExtRibbonNodeTabPageCollection and gave it this member function:
// Remove all child nodes without deleting them.
void CMyPageCollection::DetachChildren()
{
CExtCustomizeCmdTreeNode *child;
int i, num = m_arrChilds.GetSize();
for (i = 0; i < num; i++)
{
child = DYNAMIC_DOWNCAST(CExtCustomizeCmdTreeNode, m_arrChilds.ElementAt(i));
if (child != NULL)
child->SetParentNode(NULL);
}
m_arrChilds.RemoveAt(0, num);
}
Calling this function will detach all the children without deleting them. I then keep a list of the tabs required in a couple of different modes and re-insert them as required when changing modes. Currently I do it like this:
CMyPageCollection *tabs = DYNAMIC_DOWNCAST(CMyPageCollection, Ribbon_GetTabPageRootNode());
CExtRibbonNode *root = Ribbon_GetRootNode();
tabs->DetachChildren();
<for each tab in this mode>
{
SafeInsert(tabs, tab);
}
SetButtons(NULL);
SetButtons(root);
Ribbon_UpdateLayout();
Invalidate(NULL);
UpdateWindow();
However, one problem now arises, which is that the MDI buttons to the right of the tabs become hidden. When changing modes (which executes the above code) they appear for a moment and then disappear again. I tried removing the __ECTN_TBB_HIDDEN flag from Ribbon_GetRightRootNode() and its children, but it didn’t help.
Any idea what’s going on here?
Thanks for the fix for hiding tabs. I’ve emailed support and will check that
out too.
Rob.
|