Subject |
Author |
Date |
|
Norm Jones
|
Sep 11, 2006 - 1:05 PM
|
I have included the Prof-UIS.h in my precompiled header. I get a bunch of warnings about macro redifinitions (like... afxctl.h(219) : warning C4005: ’LEFT_BUTTON’ : macro redefinition). I am not sure that these really matter. However, I also get errors that IDC_STATIC is not defined- ExtTabWnd.h(601) : error C2065: ’IDC_STATIC’ : undeclared identifier. Any help with what I am doing wrong will be greatly appreciated.
|
|
Technical Support
|
Sep 12, 2006 - 8:54 AM
|
We can guess that some newer SDK and/or DDK is installed on your computer. Please check the Include folders list in the Visual Studio settings and ensure the SDK folders are located at the bottom of this folders list and default Visual C++ folders are above them.
|
|
Anthony Spring
|
Sep 11, 2006 - 12:56 PM
|
Hello,
I am just curious if it is possible to have two grid cells in one column. Right now I am just manipulating the text to show two different entries but it would look much better if it was possible to have the grid cell split right down the middle and then I could style each cell differently.
Thanks
|
|
Technical Support
|
Sep 12, 2006 - 9:08 AM
|
Joining and splitting cells is currently not supported in Prof-UIS grid windows. The split and join features are very similar to each other and allow you to implement the same split row/column layouts. We do not plan to implement the split cell, but the grid windows already have everything needed for emulating this feature. If you have a grid with 10 rows and 2 columns, then you can join cells in each 9 rows and left two cells in the rest row. The resulted layout looks like the last cell is split. This can be achieved by overriding some grid’s virtual methods that allows you to adjust the cell size. This technique is used for implementing rows for property categories in the property grid control and in group rows of the report grid control. Please download the following ZIP file with two simple projects demonstrating how to emulate this in the plain tree grid window.
|
|
Anthony Spring
|
Sep 13, 2006 - 8:09 AM
|
One thing I have noticed with this implementation is that when scrolling horizontally, after passing the split cell the header cell disappears.
Is there a way to fix this or is it possible to scroll horizontally by two items instead of just one?
Thanks
|
|
Technical Support
|
Sep 16, 2006 - 10:53 AM
|
We are releasing the next major release which is v.2.60 now (you can download the updated help from the download page right away). What do you think if we will add this feature in the next minor release 2.61 (in a two week time)?
|
|
Anthony Spring
|
Sep 18, 2006 - 8:14 AM
|
|
|
Christophe Guibert
|
Sep 10, 2006 - 12:10 PM
|
Hello,
As you created a CExtDateTimeWnd and CExtDurationWnd, only the CExtGridDataTime class implementation exists (profUIS 2.54).
Did you already implement the CExtGridCellDuration ? I would be interested by this code.
Thanks in advance,
Christophe Guibert
|
|
Technical Support
|
Sep 11, 2006 - 7:00 AM
|
We plan to implement this feature in one of the next releases.
|
|
Christophe Guibert
|
Sep 12, 2006 - 3:58 PM
|
Do you know when it is available ? Best Regards, Christophe Guibert
|
|
Technical Support
|
Sep 13, 2006 - 11:30 AM
|
We plan to make this feature available approximately in one month.
|
|
Christophe Guibert
|
Sep 10, 2006 - 10:25 AM
|
Hello,
Considering the piece of code below, we obtain incorrect display of numbers ending by one or more zeroes in the GridControl CExtGridCellNumber * pCellNumber1 = STATIC_DOWNCAST( CExtGridCellNumber, m_wndGrid.GridCellGet( nColNo, 1L ) ); pCellNumber1->_VariantAssign( 123000 );
Instead of displaying 123000, the CExtGridCellNumber displays 123.
This can easily be reproduced in the ProfUIS_Controls sample in the CPageGrid::_InitColumnNumber() method.
Best Regards,
Christophe Guibert
|
|
Suhai Gyorgy
|
Sep 10, 2006 - 3:20 PM
|
Check the post "About CExtGridCellNumber" in General Forum. First post at Aug 24, 2006 - 11:22 AM, last post at Aug 28, 2006 - 12:38 PM. 4th post in that thread has the bug fix you need.
|
|
Christophe Guibert
|
Sep 12, 2006 - 3:57 PM
|
Thank you, the fix worked for me. Best Regards, Christophe Guibert
|
|
Christophe Guibert
|
Sep 10, 2006 - 7:47 AM
|
Hello,
I’m sure this is an easy question for you : what’s the best method to be notified of mouse clicks in CExtReportGridWnd derived controls, AND know the corresponding row and column in the grid ?
Using OnGbwAnalyzeCellMouseClickEvent() virtual method gives a CPoint information : how can we deduce the corresponding row and column in the grid ?
Another idea : the ReportItemFocusGet() gives the CExtReportGridItem where the click was done. Is there and equivalent to retrieve the CExtReportGridColumn ?
Thanks in advance,
Christophe Guibert
|
|
Technical Support
|
Sep 11, 2006 - 6:51 AM
|
The OnGbwAnalyzeCellMouseClickEvent() virtual method receives the CPoint point parameter which is the mouse click location in grid’s client coordinates. So, first of all we should convert it into zero based row/column numbers inside the grid window using hit-testing: CExtReportGridWnd * pReportGridWnd = . . .
CExtGridHitTestInfo htInfo( point );
pReportGridWnd->HitTest( htInfo, false, true );
if( htInfo.IsHoverEmpty()
|| ( ! htInfo.IsValidRect() )
)
return . . .;
INT nColType = htInfo.GetInnerOuterTypeOfColumn();
INT nRowType = htInfo.GetInnerOuterTypeOfRow();
if( nColType != 0 || nRowType != 0 || htInfo.m_nColNo < 0 || htInfo.m_nRowNo < 0 )
return . . .; Now the htInfo.m_nColNo and htInfo.m_nRowNo values specify valid row/column numbers in terms of CExtGridWnd class. We should convert them into the CExtReportGridColumn * and CExtReportGridItem * pointers which are used by the CExtReportGridWnd class: CExtReportGridColumn * pRGC =
STATIC_DOWNCAST(
CExtReportGridColumn,
pReportGridWnd->GridCellGetOuterAtTop( htInfo.m_nColNo, 0L )
);
HTREEITEM hTreeItem = pReportGridWnd->ItemGetByVisibleRowIndex( htInfo.m_nRowNo );
CExtReportGridItem * pRGI = pReportGridWnd->ReportItemFromTreeItem( hTreeItem );
ASSERT_VALID( pRGI );
bool bReportItemIsGroupRow = ( pReportGridWnd->ItemGetChildCount( hTreeItem ) > 0 ) ? true : false;
if( bReportItemIsGroupRow )
return . . .; // WE THINK THIS IS NOT INTERESTING CASE
CExtGridCell * pCell = pReportGridWnd->ReportItemGetCell( pRGC, pRGI );
|
|
Christophe Guibert
|
Sep 12, 2006 - 3:49 PM
|
Thank you very much : this was exactly what I was looking for. Best Regards, C. Guibert
|
|
Sachin Gupta
|
Sep 8, 2006 - 11:32 PM
|
Hi,
In our application we use the ON_UPDATE_COMMAND_UI message and in its handler we change the text of menu based on certain conditions. The exisiting code is -
void CSaIsApp::OnUpdateAppAbout(CCmdUI* pCmdUI) { if (pCmdUI->m_pMenu) { if(some_condition) { CString strMenuText = LoadString( SA_SUBSYSTEM_BRAND); pCmdUI->SetText( (LPCTSTR) strMenuText ); } } }
In the above method pCmdUI->m_pMenu is NULL and hence we cannot use it.
Please suggest an alternative for this.
Thanks, Sachin
|
|
Sachin Gupta
|
Sep 14, 2006 - 11:17 AM
|
Thanks, but I have another problem.
We have exisiting code for removing menus from menubar in the ON_UPDATE_COMMAND_UI handler. The code we have is -
if (_some_ _condition_) { CMenu * pMenu = pCmdUI->m_pMenu;
UINT nStateAbove = pMenu->GetMenuState(pCmdUI->m_nIndex-1, MF_BYPOSITION); UINT nStateBelow = pMenu->GetMenuState(pCmdUI->m_nIndex+1, MF_BYPOSITION); pMenu->RemoveMenu(pCmdUI->m_nIndex, MF_BYPOSITION);
if (nStateAbove & nStateBelow & MF_SEPARATOR) { // Separator(s) must be removed since the menu choice was removed. if (nStateAbove != (UINT)-1) pMenu->RemoveMenu(pCmdUI->m_nIndex-1, MF_BYPOSITION); else if (nStateBelow != (UINT)-1) pMenu->RemoveMenu(pCmdUI->m_nIndex, MF_BYPOSITION); } }
How do I handle this in menubars derived from CExtMenuControlBar?
|
|
Technical Support
|
Sep 14, 2006 - 12:17 PM
|
|
|
Technical Support
|
Sep 9, 2006 - 6:51 AM
|
The pCmdUI->m_pMenu property is NULL because Prof-UIS menus are not based on Windows menus. You can change text without analyzing this property.
|
|
Sachin Gupta
|
Sep 7, 2006 - 9:10 PM
|
I am moving this thread from Elegant Grid Support Forum to this forum.
The below suggestion did not work for us. Even after sending the Idle message, the toolbar doesnt paint itself again. We also tried sending a OnSize, OnPaint, MoveWindow message, but none of them worked.
The only things that works is minimizing and the maximizing the whole Internet Explorer window.
If required we can also do a WebEx to expedite this case.
Please help.
Thanks, Sachin
--------------------------------------------------------------------------------
Dear Sachin Gupta,
You received a reply to your message in the forum ’Elegant Grid Support Forum’ and we are happy to notify you as you requested.
Elegant Grid Support Forum Subject: Re:Painting issue when using toolbar in an ActiveX control Author: Technical Support E-mail: support@prof-uis.com Please try the following:
1) Initialize some timer when the controlaĖā¢s window is created: SetTimer( 345, 100, NULL ); 2) Handle this timer: CWinThread * pWinThread = ::AfxGetThread(); ASSERT_VALID( pWinThread ); pWinThread->OnIdle( 0 ); This code will emulate the standard MFC idle time processing and all the windows should become updated correctly. --------------------------------------------------------------------------------
Author: Sachin Gupta Subject: Painting issue when using toolbar in an ActiveX control Sep 6, 2006 - 11:03 AM We use ProfUIS toolbars in our ActiveX control. The ActiveX control is used within Internet Explorer.
The toolbar has a "Print" button. On click of this "Print" button, we show a "Confirm Print Dialog" to the user. Sometimes, this "Confirm Print Dialog" overlaps the toolbar. When the user dismisses the "Confirm Print Dialog" the toolbar doesnaĖā¢t get repainted again and parts of the toolbar remain in white color.
By moving the mouse over the toolbar the toolbar repaints again. Also if the user minimizes and maximizes the Internet Explorer window again the toolbar repaints.
Please suggest us a way to repaint the toolbar when another window overlaps its.
Thanks,
|
|
Technical Support
|
Sep 8, 2006 - 11:54 AM
|
|
|
Offer Har
|
Sep 7, 2006 - 2:48 PM
|
Dear support,
I would like to catch the event when the tab is changed, and if some condition do not meet, to cancel the tab switching. How do i implement this task?
Regards,
Offer
|
|
Technical Support
|
Sep 8, 2006 - 11:56 AM
|
|
|
Massimo Germi
|
Sep 6, 2006 - 9:11 AM
|
I have to implement a custom control based on CExtTreeGridWnd. Child items need to be a "virtual item" that not inherit column formatting and can display other controls derived from CWnd.
Like this:
ROOT ITEM | |---ITEM01 | |---___________________________________________________________ | | | | | custom child item that display another control derived from CWnd | | | | | |___________________________________________________________| | ---ITEM02 | ---ITEM03 | ---ITEM04
Do you have some suggestions to fo this with your library?
Thanks for any help?
|
|
Massimo Germi
|
Sep 6, 2006 - 9:14 AM
|
The samples is not formatted correctly; try again
ROOT ITEM | |---ITEM01 | |---___________________________________________________________________ | | | | | custom child item that display another control derived from CWnd | | | | | |__________________________________________________________________| | ---ITEM02 | ---ITEM03 | ---ITEM04
|
|
Technical Support
|
Sep 6, 2006 - 12:52 PM
|
Any grid that comes with Prof-UIS is not designed so to support CWnd controls in its cells except for temporarily in-place activated windows. One of the reasons is performance issues. For example, if a column looks as though it contains combo boxes in fact only when the end user uses it, the associated HWND in-place editor is created on the fly. Besides if you had a grid with 100-200 window handles, what it would be like? Please let us know more about why this requirement is so important for you.
|
|
Massimo Germi
|
Sep 6, 2006 - 1:20 PM
|
First of all tanks for fast answer.
Usually I use listCtrl for display data from a database, I wish to use TreeGridCtrl custom control in the following method: - First level of items are the result of a query from a DB and rapresent summary data; - Second level of items are relative to parent item and can display detail of this. In this case the second level is a new TreeGridCtrl that can be created only when the user expand the node.
ex: The first level has 2 column, Client Name and total $ per month. The secon level has 4 column, Date, Spare part Name, N° of Items, Cost. ______________________________________________________ |- Client 01 | 2,000.00$ | |- 2006/01/05 |Part 01 | 45 | 502.00$ | |- 2006/02/06 |Part 10 | 10 | 98.00$ | |-Client 02 | 500.00$ | |- 2006/01/10 | Part 515 | 1250 | 12,550.00$ |
This is only a simple examples. Thanks o lot
|
|
Technical Support
|
Sep 7, 2006 - 11:49 AM
|
We can offer you at least two options. You could use the auto-preview area of the report grid for displaying the content of child rows. Each row in the report grid has an associated cell which occupies the whole row and is located under the row. This is the preview area (you can see this in the ReportGrid sample). If per-row detailed information is large, you could use the simple plain grid and create a property grid control for displaying the content of child rows for the focused row in the main grid.
|
|
Massimo Germi
|
Sep 7, 2006 - 1:19 PM
|
Tx again, I will try to use auto-preview area.
|
|
Phil Davis
|
Sep 5, 2006 - 4:16 PM
|
in your Funny Toolbars example, you have some very nice 44 x 40 images for the buttons. Could you please give me the link where you got/purchased these? Thanks.
|
|
Technical Support
|
Sep 6, 2006 - 12:38 PM
|
These images are used in the FunnyBars sample only for demonstrating the technique of displaying large images in toolbar buttons. Of course, some other images could have been used in place. If you need a set of images of a big size for your real application, it seems you need to find an artist who can create them for you or do them yourself.
|
|
Phil Davis
|
Sep 5, 2006 - 4:14 PM
|
in a tree grid, is it possible to automatically have the color of the text change in a CellString when the cell is selected. For example, when the cell is selected, the color of the selection indicator is dark blue and the underlying text is black, making the contrast very poor. Can the color be changed to say white automatically, or do I have to do this manually?
Thanks for all help.
|
|
Phil Davis
|
Sep 6, 2006 - 4:02 PM
|
Hi,
thank you for your prompt response.
I am using CExtTreeGridWnd and most of my cells are CellString.
If I do the following, similar to what you suggest:
//pCell->TextColorSet( CExtGridCell::__ECS_ALL, txtColor ); pCell->TextColorSet( CExtGridCell::__ECS_NORMAL, txtColor ); pCell->TextColorSet( CExtGridCell::__ECS_SELECTED, RGB(255,255,255) ); pCell->TextColorSet( CExtGridCell::__ECS_HOVERED, RGB(255,255,255) );
The program crashes.
If I change the program to:
pCell->TextColorSet( CExtGridCell::__ECS_ALL, txtColor ); //pCell->TextColorSet( CExtGridCell::__ECS_NORMAL, txtColor ); pCell->TextColorSet( CExtGridCell::__ECS_SELECTED, RGB(255,255,255) ); pCell->TextColorSet( CExtGridCell::__ECS_HOVERED, RGB(255,255,255) );
It does not crash, however, hover does not appear to work and I am not sure if select works.
If I single click on a cell the text remains txtcolor. If I double click on a cell the text remains txtcolor.
If I single click so the cell is selected, wait a couple of seconds then click again, the cell goes into edit mode and changes to white.
|
|
Technical Support
|
Sep 7, 2006 - 12:58 PM
|
If you want to set the hover text color, please enable notifications about mouse hover events: HoverEventsSet( true, false );
HoverHighlightSet( true, false, false, false, true, true );
|
|
Technical Support
|
Sep 6, 2006 - 12:25 PM
|
You can use the CExtGridCell::TextColorSet() method for this: virtual COLORREF TextColorSet(
CExtGridCell::e_cell_state_t eCellState,
COLORREF clr = COLORREF( -1L )
); This method sets the text color of the cell for the state specified by eCellState. The eCellState can be one of the following values: __ECS_ALL - Associated color used for all cell states. __ECS_NORMAL - Normal (unselected) state __ECS_SELECTED - Selected state __ECS_HOVERED - Hovered state In your case, you can use __ECS_SELECTED : pCell->TextColorSet( CExtGridCell::__ECS_SELECTED, RGB(255,255,255));
|
|
Kit Kwan
|
Sep 5, 2006 - 10:48 AM
|
Hi, I’m able to create and load the tool bar just fine. After I click a button in the toolbar, I want it to remain in ’pressed’ state, so that I know it has been activated. I looked at the sample apps like BitmapEditor and DRAWCLI, but I don’t notice any setting, but their toolbar buttons can do that. I pretty much copied the sample code. What am I missing? Thanks!
|
|
Technical Support
|
Sep 7, 2006 - 7:37 AM
|
Please add the ON_UPDATE_COMMAND_UI handler for the command:
afx_msg void OnUpdateYourCommand(CCmdUI* pCmdUI);
...
ON_UPDATE_COMMAND_UI(ID_YOUR_COMMAND, OnUpdateYourCommand)
...
void CMainFrame::OnUpdateYourCommand( CCmdUI * pCmdUI )
{
pCmdUI->SetCheck( m_bChecked ? 1 : 0 );
}
|
|
Wilhelm Falkner
|
Sep 5, 2006 - 1:51 AM
|
Is it possible, to insert a complet dialog into a toolbar? I tried InsertSpecButton, but without success. The dialog should have an ownerdraw button (picture, changing during prog execution), static texts (has to be painted in different colors, according state of prog) and some static texts. These dialogs has to be created during runtime, that means, the number is not fixed. TIA Willi
|
|
Technical Support
|
Sep 5, 2006 - 11:12 AM
|
You can use the CExtPanelControlBar class which is similar to MFC’s CDialogBar . The CExtPanelControlBar class implements a toolbar-like window, which owns only one child window and whose size that is determined by the size of this child window. In most cases the panel control bar is used as a container for a dialog.
In the FixedSizePanels sample application you can find that the m_wndPanelDialog property of CMainFrame, which is created in CMainFrame::OnCreate() , is an instance of the CExtPanelControlBar class. The m_dlgForPanelDialog property of the main frame is a child dialog whose parent window is m_wndPanelDialog .
|
|
Suhai Gyorgy
|
Sep 5, 2006 - 3:09 AM
|
Try checking CExtToolControlBar::SetButtonCtrl() method. Second parameter is a CWnd *, so I’d guess it can take CDialog as well. And also in this subject it’s good to read FAQ How to insert controls into the toolbar?
|
|
Massimo Germi
|
Sep 4, 2006 - 5:12 AM
|
Hi, how can I set font bold style for some items in a CExtTreeGridWnd derived control?
tx a lot
|
|
Technical Support
|
Sep 4, 2006 - 11:51 AM
|
Alternatively, starting from version 2.53, you can use the CExtGCF template with which you set a custom font for any grid cell by specifying the following font parameters: Height, Width, Weight, Italic, Underline, StrikeOut, Quality, and FaceName. For example, to make the cell’s text bold, just invoke the following line: pCell->FontWeightSet( FW_BOLD );
|
|
Suhai Gyorgy
|
Sep 4, 2006 - 6:13 AM
|
In ReportGrid Sample you can find something like this:
"SomeClass".h int m_nBoldFontIndex;
"SomeClass".cpp, around initialization: m_nBoldFontIndex = GridFontInsert( g_PaintManager->m_FontBold, -1, true );
Usage: CExtGridCell *pCell = GridCellGet(...); pCell->FontIndexSet( m_nBoldFontIndex );
|
|
Mark Walsen
|
Sep 1, 2006 - 10:37 AM
|
I’m using BITMAP resources, CExtBitmap::LoadBMP_Resource, and CExtCmdManager::CmdSetIcon to load bitmap buttons that have transparency. Because bitmaps don’t have degrees of transparency, it is impossible to design a button image that has edges which blend well through the transparency to the background. You end up with jaggies if you don’t anti-alias the edges. Or, if you do anti-alias the edges, the edge pixels are frozen in color shades that might not match the background color of the button. The button’s background color, showing through the transparency, varies according to the Prof-UIS color scheme chosen by the end-user.
I’m wondering if the CExtBitmap::AlphaBlend member function would help me solve this problem. I don’t have any experience with alpha channels, but I’m hoping that I can use a second bitmap that defines the degrees of transparencies, 0 to 255, for the three R, G, and B of RGBs in the first bitmap. Is that what AlphaBlend is about? If so, could you demonstrate how to use it?
Cheers -- Mark Walsen
|
|
Technical Support
|
Sep 3, 2006 - 12:58 PM
|
The CExtBitmap class supports 32-bit BMP files with alpha channel and the CExtBitmap::AlphaBlend() method paints any such a bitmap on any Windows OS. Although it completely meets your requirements, there are two problems with 32-bit high quality bitmap images: 1) You should spend some time for painting these images or have them created for you. 2) Many applications destroy and/or corrupt (or simply ignore) alpha channel in BMP files. For instance, the Adobe Photoshop does not save alpha channel into exported BMP files.You have to save your image as PNG and then convert it to BMP using some other tool like Axialis Icon Workshop. Alternatively, you can load PNG images using the CExtSkinBitmap class provided with the ProfSkin library. The later comes with Prof-UIS. The ..\Prof-UIS\Samples\FunnyBars\Res.IDR_TOOLBAR_VISTA_ICONS.bmp file is a 32-bit BMP file with alpha channel. It is not displayed correctly by the Windows shell viewer nor by the MSPaint bitmap editor nor by built in bitmap editor of any Visual Studio. This bitmap is used in the CMainFrame::m_wndToolBarVista toolbar window of the FunnyBars sample and there are no some special steps that create the toolbar there. This toolbar is initialized by using the ordinary Create() and LoadToolBar() methods. You can initialize any CExtCmdIcon object with 32-bit bitmap with alpha channel. Simply load this bitmap into the CExtCmdIcon::m_bmpNormal property. The initialized icon object can be assigned to the command description in the command manager and you will see it both in toolbars and menus.
|
|
Mark Walsen
|
Sep 4, 2006 - 2:08 PM
|
Thanks for the above help! I’d like to follow your suggestion to use CExtSkinBitmap::LoadPNG_Resource. I successfully experimented with this by using Axialis Icon Workshop to save your ..\Prof-UIS\Samples\FunnyBars\Res.IDR_TOOLBAR_VISTA_ICONS.bmp as a .PNG file, which I then included as the resource called by LoadPNG_Resource.
However, I cannot determine how to save a PNG file in Photoshop that reserves the alpha channel. In Photoshop I use Image / Mode = RGB with 8-Bit Channel. The Photoshop source file includes an Alpha 1 channel for the semi-transparency. Yet, when I save this image as a PNG, the alpha channel is discarded. If I open this PNG file in Axialis Icon Workshop, it is reported as a 24 BPP (bits per pixel) rather than a 32 BPP (with Alpha Channel).
Can you offer me a tip on how to correctly save the PNG file in Photoshop so that the Alpha Channel isn’t lost?
Cheers -- Mark
|
|
Mark Walsen
|
Sep 4, 2006 - 10:26 PM
|
|
|
Mark Walsen
|
Sep 4, 2006 - 2:15 PM
|
P.S. Do you know of any icon/button artists who would be interested in redoing the 20 toolbar buttons as PNGs with alpha channel in my soon-to-be-released Notation Composer 2.0?
A screen shot of the current buttons can be seen at http://notation.com/WhatsNew.htm.
Cheers -- Mark
|
|
Technical Support
|
Sep 5, 2006 - 11:56 AM
|
Actually we would help you with this if we could but we cannot. There should be somebody who is a good artist and has some expertise in creating icons.
|
|
Wilhelm Falkner
|
Sep 1, 2006 - 3:46 AM
|
I have a Framewindow, with a lot of CExtControlBar with CExtResizableDialog inside. In the ..::OnCreate I create all these bars and dialogs, use SetInitDesiredSizeVertical, SetInitDesiredSizeHorizontal, EnableDocking, DockControlBar and DockControlBarIntoTabbedContainer. It is very hard to find right values and positions. So my plan: Use any default values, start the programm, position all bars, set size. Stop the programm. Now extracting from your registry settings, how to set all values right. Maybe a little tool prog can help creating the C++ code. For sure, this help prog. do not know the names of my variables, but how about use enumerated? Do you think, this would be possible? TIA Willi
|
|
Technical Support
|
Sep 3, 2006 - 11:33 AM
|
We would offer you the following solution. You cannot skip the step of specifying the initial control bar’s layout programmatically because otherwise you would have had an invalid layout and unusable control bars. But you can dock them roughly and then make necessary fine adjustments by running the application and saving the final settings to the registry. Here are the steps to follow:
1) Dock control bars programmatically in some preliminary way: if( ! CExtControlBar::ProfileBarStateLoad(
this,
pApp->m_pszRegistryKey,
pApp->m_pszProfileName,
pApp->m_pszProfileName,
&m_dataFrameWP
)
)
{
DockControlBar( &m_wndMenuBar );
DockControlBar( &m_wndToolBar1 );
DockControlBar( &m_wndToolBar2 );
. . .
DockControlBar( &m_wndToolBarN );
m_wndResizableBar0.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 1, this, false );
m_wndResizableBar1.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 1, this, false );
. . .
m_wndResizableBarN.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 1, this, false );
RecalcLayout();
} This code means that if the application’s GUI state cannot be read from the registry, the layout of control bars is set programmatically. 2) Run the application and make the desired initial layout by putting each control bar in the desired adjusted position. Close the application. The adjusted settings are now in the registry under the HKEY_CURRENT_USER\Software\Foss\MDI\ProfUIS254\Profiles\MDI\ControlBar (For illustration purposes, we will use Foss as the company name and MDI as the application name here). 3) Run the RegEdit tool from the command line, invoke the context menu for the HKEY_CURRENT_USER\Software\Foss\MDI\ProfUIS254\Profiles\MDI\ControlBar tree item and export the settings under this key by clicking the Export menu item. For example, save the settings into the C:\MyBarState.Reg file. This file now contains the UI state for the MDI sample. 4) If you run the following command on another clean computer RegEdit MyBarState.Reg and run your application after that, you will see that you have the very same, desired layout. You can configure your installer in a way so it modifies the registry to apply the settings stored in the MyBarState.Reg file. You cannot skip step 1 because otherwise you would not have been able to rearrange control bars in the desired way. The word Foss in the registry key path is the value taken from ::AfxGetApp()->m_pszRegistryKey and it is typically the company’s name. The word MDI in the registry key path is the value taken from ::AfxGetApp()->m_pszProfileName and it is typically the software product’s name.
|
|
Wilhelm Falkner
|
Sep 4, 2006 - 1:33 AM
|
Thanks, this can be a possible way. The remaining problem is, that a lot of our customer are normal useres, that mean, they are not allowed to run RegEdit and RegEdit is protected in a way, that they can’t start it. Any other hint? TIA Willi
|
|
Suhai Gyorgy
|
Sep 4, 2006 - 2:04 AM
|
You misunderstood Support. Their approach is: you, as program designer, save the controlbar settings from YOUR computer’s registry into a file called MyBarState.reg. And when you make installation package for your application, you configure the installer to use that MyBarState.reg file and save its content to the registry of the computer where the installation takes place. So customers won’t have to run RegEdit, installer will modify registry.
But you, as the program designer, can test to see if controlbar state saved in MyBarState.reg works as desired: for testing porpuses you call RegEdit MyBarState.reg command on a clean computer and after that run program to see what state was saved to the registry.
|
|
Wilhelm Falkner
|
Sep 4, 2006 - 4:42 AM
|
Sorry, but you do not understand the problem: Customers without rights are not allowed to use RegEdit to INCLUDE MyBarState.reg into the registry. Installer and programm are allowed to write to HKEY_CURRENT_USER, but RegEdit to include same *.reg files is disabled. Our customers are in an very sensitiv area, so their accounts are terrible restricted: No write to any windows folders, even we are not allowed to use deinstall programms
|
|
Technical Support
|
Sep 4, 2006 - 11:45 AM
|
You can use a file on a disk instead of the registry. The StateInFile sample demonstrates how to do this.
|
|
Wilhelm Falkner
|
Sep 4, 2006 - 12:54 PM
|
|
|
Suhai Gyorgy
|
Sep 4, 2006 - 6:14 AM
|
|
|
Wilhelm Falkner
|
Sep 2, 2006 - 5:25 AM
|
I would need this feature, because it seems to be impossible, that the install-prog at customer side create all your registry values, so usefull defaults has to be inside code
|
|
Offer Har
|
Aug 31, 2006 - 8:23 AM
|
Dear Support,
Is there a method to limit the range of values in the cell? If not, or in addition, is there a way to prevent negative values from being inserted?
Regards, Offer
|
|
Technical Support
|
Aug 31, 2006 - 8:50 AM
|
|
|
Eric Houvenaghel
|
Aug 30, 2006 - 3:05 PM
|
Hello,
I have a CExtTabPageContainerWnd in a dialog. There are too many tabs to fit in this dialog. One solution is to use a side arrow to navigate through to tabs that go behond the dialog. However, is there a way to make the tabs "wrap"? Basically, can you have multi rows of tabs?
|
|
Technical Support
|
Aug 31, 2006 - 8:48 AM
|
Unfortunately this feature is currently under development. So you can only use the arrow buttons (Home, Previous, Next, and End) and Tab List popup menu to walk through the pages.
|
|
Eric Houvenaghel
|
Aug 31, 2006 - 10:20 AM
|
Do you have an idea when?
|
|
Chris Thomas
|
Aug 30, 2006 - 2:48 PM
|
Without Prof-UIS, in a regular windows app, I can make a groupbox with a checkbox label by deriving from CButton, put a CButton m_check member variable, and in the derived class
class CGroupCheckBox : public CButton .. ...
|
|
Chris Thomas
|
Sep 1, 2006 - 8:38 AM
|
|
|
Chris Thomas
|
Aug 30, 2006 - 2:57 PM
|
oh and thanks for any advice.
|
|
Chris Thomas
|
Aug 30, 2006 - 2:55 PM
|
sorry I accidentially hit the Enter key...
class CGroupCheckBox : public CButton ... CButton m_check; ... };
and in CGroupCheckBox::PreSubclassWindow() create the m_check as a child of "this", and clear out the groupbox’s label.
And then I can implement CGroupCheckBox::OnCtlColor() and set m_check’s text color.
This all works great, until I tried to use CGroupCheckBox in a prof-uis app (on a prof-uis derived dialog). The OnCtlColor is being called but the color never takes effect. The goal is to make the text the same as the other prof-uis groupbox text color.
So then I redefined m_check to be CExtButton (keeping CGroupCheckBox as CButton derived). The checkbox is now a button, behaving like the BS_PUSHLIKE style is set. But I used Spy and the checkbox has the exact same style as other checkboxes on the same dialog. In addition, if I changed CGroupCheckBox to be CExtButton-derived, it too acts like a giant button.
How can I acheive my goal of having a checkbox for a groupbox label and 1) have the text color match the other prof-uis groupboxes (a light blue), and 2) have m_check’s WM_COMMANDs continue to be caught by it’s parent CGroupCheckBox (this is desirable because the handler automatically enables/disables all the controls contained within the groupbox, saving me work.
I could write a simple test program for you, but I figured this was pretty easy to whip up from scratch.
|
|
Technical Support
|
Aug 31, 2006 - 8:34 AM
|
|
|
Lynn Reid
|
Aug 29, 2006 - 10:27 PM
|
Hello:
I’m rather new to Prof-UIs and I’m none too experienced at figuring out how to search the support forums. Is there a better way than using Google’s advanced search features and restricting the site to www.prof-uise.com? Anyway, on to the real question...
I’ve created an MDI application that uses CExtTabMdiWnd to display several documents at a time. The tabs are working fine. I like the little pulldown menu at the right side of the tabs that lists the currently open windows; it looks like a line atop a downward pointing triangle. I have a separate frame window located within an CExtControlBar which has a different view of the "topmost" MDI window.
Within the frame, I’d like a right-mouse-button popup menu that looks like: My Command 1 My Command 2 Open Windows -> MDIWindow1 ......................... MDIWindow2 ......................... etc.
where the submenu to "Open Windows" is automatically updated. It would be really nifty if I could have the right arrow in the Openw Windows menu item be a rotated version of your tab implementation. I’ve already got the "My Command #" menu entries in place using CExtPopupMenuWnd (and some trial and error).
I imagine there’s a simple way to do this using your CExtTabMdiWnd, rather than loading up the menu programmatically each time. Could you please give me a detailed example of how to generate the popup submenu of MDI windows and how to track which one MDI document the user selects?
Many thanks Lynn
|
|
Technical Support
|
Aug 30, 2006 - 11:47 AM
|
You can find information about how to construct menu items at run time in the article: Constructing Menus Dynamically at Run Time. You can find how to enumerate MDI windows in the CExtPopupMenuWnd::UpdateMdiWindowsMenu method. This method constructs the list of MDI windows that you can see in all Prof-UIS MDI samples. The CExtMdiWindowsListDlg::_FillMDIWindowList method may also be helpful. You can use the WM_MDIGETACTIVE message to determine which mdi window is active. The application sends this message to the MDI client window to retrieve a handle to the active MDI child window.
As for searching forums, this feature is supported albeit it is limited. If you switch to the Tree view by clicking the Tree View link on the Forum1.aspx?CID=40 page, you will see a Type keywords to search: edit at the bottom. You can search for words or exact phrases. In the latter case, use double quotes. Google search (e.g., "control bars" forum site:prof-uis.com) may also be useful but not all forum pages are yet indexed.
|