|
Subject |
Author |
Date |
|
|
John Fliczuk
|
Jun 12, 2009 - 11:14 PM
|
I have an existing MFC project which has some very old code in it. When I updated to visual studio 2008 I found some things didn’t work anymore. I need to upgrade becuase I want access to some of the stuff in the new MFC Library. I figure this would be a great time to replace some of the non-functioning code with Prof-UIS code as well. I don’t have a lot of C++ or MFC experience so this may be a problem. I do have a lot of programming experince so I’m not a complete newby. I wanted to replace a treelist with a tabedcombobox. To start I thought I would just try adding tabedpages. I’m finding this very difficult. The sample code is not well documented and I’m having trouble understanding the code and how I might integrate it into my app. I tried adding 2 files to my project. CExtTabPageContainerWnd.cpp / .h. I didn’t change any code and tried to compile. This is the error I got which I can’t even see how it relates to the code.
C:\Program Files\FOSS Software Inc\Prof-UIS\Include\ExtPopupMenuWnd.h(112) : error C2504: ’CEvent’ : base class undefined
That is just 1 of many error lines. As far as I know I have all my program/compile paths setup and I followed the install instructions for Prof-UIS. So I’m at a loss or just plain lost.
Any hep would help at this point. I think one of my biggest problems is lack of info and where to begin.
Thanks...
|
|
|
Mantra
|
Jun 16, 2009 - 3:17 AM
|
if you need a example how to deal with this
i have a Example which allows you to change it within minutes if you have -> Tab sheets are Dialogbased
-> All your calls inside the tabs are with a pointer.. let me know if you need id.. Cheers
|
|
|
John Fliczuk
|
Jun 13, 2009 - 4:15 PM
|
Hello, That helps a bit. i’m sure I have everything installed ok. The install took a couple of hours building libraries. I want to replace the Tabed Pages part of my code since it actually stopped working when I ported from VS2005 to VS2008. Do I need to create the MainFrame Window using the Prof-UIS libs or can I add in the Tabed Pages part to my existing code? I am using SDI. Also, is there any documentation that would better explain the Tabed Pages and how to implement it? Thanks for you help...
|
|
|
Technical Support
|
Jun 15, 2009 - 2:32 PM
|
You should create a CExtTabPageContanerWnd window (or any other derived from it) instead of the main SDI view window. The CExtTabPageContanerWnd window should be created using the AFX_IDW_PANE_FIRST standard MFC dialog control identifier. Then create your page windows as children of the CExtTabPageContanerWnd and register them as tab pages using the CExtTabPageContanerWnd::PageInsert() method. For instance, the TabbedBars application use the CExtTabPageContainerOneNoteWnd window as a child view window and creates 3 dialog pages inside it.
|
|
|
Technical Support
|
Jun 13, 2009 - 12:37 PM
|
The source code of Prof-UIS is located in the folders .../Prof-UIS/Include and .../Prof-UIS/Src. You should not try to include any .../Prof-UIS/Include/Ext*.h header and .../Prof-UIS/Src/Ext*.* files into your project because they too muchdepend on each other. As a result, you would have to insert all the Prof-UIS files into your project. So, just include .../Prof-UIS/Include/Prof-UIS.h into the StdAfx.h file in your project: #include <Prof-UIS.h>
This is the only thing you need to do to integrate Prof-UIS with the existing project. You don’t need to specify any Prof-UIS LIB files in your project settings because these files will be linked with your project automatically (Prof-UIS header files have appropriated #pragma directives for that). Of course, you should have Prof-UIS correctly installed, Visual Studio correctly configured and required Prof-UIS library configurations compiled. This is discussed here: http://www.prof-uis.com/prof-uis/tech-support/feature-articles/getting-started-with-prof-uis.aspxhttp://www.prof-uis.com/prof-uis/tech-support/feature-articles/prof-uis-build-configurations.aspx
|
|
|
Takis Takoglou
|
Jun 12, 2009 - 4:59 AM
|
Good Day, In my property grid, when using a CExtGridCellCheckBox or a CExtGridCellButton-derived object the following occurs.
If i select the property value name of the checkbox (or button) i.e. the cell that contains the value name, and then press a character in the keyboard the program crashes! How can i avoid that? PS. Other types of cells, including Bool,Num,Combobox. do not cause the program to crash.
Thanx in advance,
Stakon
|
|
|
Bart Kampers
|
Jul 20, 2009 - 8:28 AM
|
I implemented the code above. It seem exactly the sam as the original code in 2.85. My applications still crashes when I type any key and a checkbox cell is selected.
|
|
|
Technical Support
|
Jul 20, 2009 - 10:49 AM
|
Could request the source code update by email?
|
|
|
Technical Support
|
Jun 16, 2009 - 12:51 PM
|
We found the same issue related to the CExtGridCellCheckBox and CExtGridCellButton classes. Please drop us an e-mail to the support mail box at this web site so we will provide you with the source code update.
|
|
|
Technical Support
|
Jun 16, 2009 - 12:47 PM
|
Please find the CExtGridCellBool::OnParseText() method in the .../Prof-UIS/Src/ExtGridWnd.cpp file and update the source code for this method from our previous answer in this forum thread. This will fix the reported issue with the CExtGridCellBool class. We were unable to reproduce the same problem with the CExtGridCellCheckBox and CExtGridCellButton classes using the PropertyGrid sample. So, we need more details about the last two classes.
|
|
|
Technical Support
|
Jun 12, 2009 - 8:32 AM
|
Thank you for reporting this bug. Here is the fix: HRESULT CExtGridCellBool::OnParseText( __EXT_MFC_SAFE_LPCTSTR sText ) const
{
ASSERT_VALID( this );
ASSERT( sText != NULL );
if( sText == NULL )
return E_INVALIDARG;
if( m_sLabelTrue.CompareNoCase( sText ) == 0
|| m_sLabelFalse.CompareNoCase( sText ) == 0
)
return S_OK;
if( m_sLabelTrue.GetLength() > 0
&& m_sLabelFalse.GetLength() > 0
&& _tcslen( sText ) > 0
)
{
TCHAR chrTrue = (TCHAR)_totlower( m_sLabelTrue[ 0 ] );
TCHAR chrFalse = (TCHAR)_totlower( m_sLabelFalse[ 0 ] );
TCHAR chrCheck = (TCHAR)_totlower( sText[ 0 ] );
if( chrTrue != chrFalse )
{
if( chrCheck == chrTrue )
return S_OK;
if( chrCheck == chrFalse )
return S_OK;
if( chrTrue != _T(’0’)
&& chrFalse != _T(’0’)
&& chrTrue != _T(’1’)
&& chrFalse != _T(’1’)
&& ( chrCheck != _T(’0’) || chrCheck != _T(’1’) )
)
return S_OK;
}
}
return E_FAIL;
}
|
|
|
Takis Takoglou
|
Jun 16, 2009 - 5:14 AM
|
Good Day, thank you for the quick response. Could you please clarify in which file(s) i should replace/add the above code? Also, is the class CExtGridCellBool the one with the problem? Because in my program the crashes occured when using CExtGridCellCheckBox or CExtGridCellButton. Thanx in advance, Stakon
|
|
|
Takis Takoglou
|
Jun 12, 2009 - 2:30 AM
|
Good Day, I am using many CExtGridCellComboBox objects in my PropertyGrid.
I wanted to find a way to prevent the user to enter his own text when the "text part" of the combobox is selected.
By using the SetEnumMode() method i thought this was accomplished, but this is half the truth.
The user cannot enter a new string, but if he presses a key which is the first letter of a string in the combobox, then that string is selected and an Apply() is invoked . This behavior is unwanted.
To make things worse, in the above scenario if there are more than one strings starting with the pressed key then one of them is selected, probably not the one intended to be used. So what i am asking for is a way to prevent the user from using keys within the "text field" of the combobox. Thanx in advance,
Stakon.
|
|
|
Technical Support
|
Jun 12, 2009 - 6:00 AM
|
You apply use the __EGCS_READ_ONLY grid cell style using the CExtGridCell::ModifyStyle() method to make the in-place activated cell editor read only. The __EGCS_NO_INPLACE_CONTROL style disables in-place editor activation. The __EGCS_EX_NO_INPLACE_CONTROL_SELECTION extended grid cell style can be applied with the CExtGridCell::ModifyStyleEx() method for disabling the entire text selection in the in-place activated cell editor (editor appears over the cell, but text is not selected in it).
|
|
|
L Freddi
|
Jun 11, 2009 - 9:02 PM
|
HI, supporters I made a dialog inherited CExtResizableDialog. I initialize controls status.(enable/ diable) but when dialog are floating, setting control’s status are changed and mixed. To solve the problem, I initialize controls again in Onpaint() function. But not solved. Give a solution, please.
|
|
|
Technical Support
|
Jun 12, 2009 - 5:39 AM
|
We guess you created a child CExtResizableDialog dialog inside a CExtControlBar control bar and there are some controls based on MFC’s command updating mechanism created inside the child dialog. But this is only a guess. Please provide us with more details about your application or send a test project to us.
|
|
|
Johannes Schwenk
|
Jun 10, 2009 - 9:04 AM
|
Hallo, I`m trying to use the CExtGridWnd Class to show a Grid with 2 Columns, 1 Header- and 1 Datarow. So I put a Custom Control with the Grid Class Code On my Form. My Code: Header: CExtGridWnd m_puisgrid_couriers;
DataExchange:
void CSelectCourier::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_PUISGRID_COURIERS, m_puisgrid_couriers);
}
Initialisation:
void CSelectCourier::InitControls() {
//*** Steuerelemente initialisieren *** //* Courier Grid * //Grid
m_puisgrid_couriers.OuterRowCountTopSet( 1L, false ); //Data Provider
CExtGridDataProvider & m_puisgrid_data = m_puisgrid_couriers.OnGridQueryDataProvider(); m_puisgrid_data.RowInsert(0,2);
m_puisgrid_data.ColumnInsert(0,2);
CExtGridCellHeader* celltop1 = (CExtGridCellHeader*)m_puisgrid_data.CellGet(
0,
0,
RUNTIME_CLASS(CExtGridCellHeader)
); CExtGridCellHeader* celltop2 = (CExtGridCellHeader*)m_puisgrid_data.CellGet(
1,
0,
RUNTIME_CLASS(CExtGridCellHeader)
); CExtGridCellRadioButton* cell1 = (CExtGridCellRadioButton*)m_puisgrid_data.CellGet(
0,
1,
RUNTIME_CLASS(CExtGridCellRadioButton)
); CExtGridCellString* cell2 = (CExtGridCellString*)m_puisgrid_data.CellGet(
1,
1,
RUNTIME_CLASS(CExtGridCellString)
); celltop1->TextSet("Header1");
celltop2->TextSet("Header2");
cell1->SetCheck(1);
cell2->TextSet("12345"); }
But the result is:

What am I do wrong?
|
|
|
Technical Support
|
Jun 15, 2009 - 2:34 PM
|
Here is the modified version of your project:
http://www.prof-uis.com/download/forums/tmp/FIXED-ProfUisGridDemoProject.zip
Here is what we changed:
1) We recoded the CProfUisGridDemoProjectDlg::InitControls() method. The direct access to the data provider inside the grid window is needed only for tricky tasks. We used grid control’s methods only.
2) We the CExtNCW < CExtResizableDialog > the base class of the CProfUisGridDemoProjectDlg and CAboutDlg classes. This makes the dialogs themed by Prof-UIS. Then we added the SetAutoSubclassChildControls(); line of code into the CProfUisGridDemoProjectDlg::CProfUisGridDemoProjectDlg constructor. All the un-subclassed dialog controls are now automatically themed by Prof-UIS. That is why the OK and Cancel buttons become themed.
3) We changed the CExtGridWnd m_puisgrid; property of the CProfUisGridDemoProjectDlg class to CExtNSB < CExtGridWnd > m_puisgrid;. So, the grid is now using themed Prof-UIS scroll bars.
4) We added the following lines into the res/ProfUisGridDemoProject.rc2 file:
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif
This will make your project working OK if you choose to link with the static Prof-UIS library instead of DLL. 5) We added several test lines into the beginning of the application’s InitInstance() virtual method for testing what we did under different themes.
|
|
|
Johannes Schwenk
|
Jun 16, 2009 - 7:51 AM
|
Thank you! Works perfect...
|
|
|
Johannes Schwenk
|
Jun 15, 2009 - 7:59 AM
|
|
|
|
|
Technical Support
|
Jun 11, 2009 - 2:21 AM
|
Everything is OK. We assume the class name specified in the user control properties is ProfUIS-ScrollItemWindow. Please invoke the following lines of code finally at the end of grid initialization: m_puisgrid_couriers.OnSwUpdateScrollBars();
m_puisgrid_couriers.OnSwDoRedraw();
|
|
|
Johannes Schwenk
|
Jun 11, 2009 - 4:57 AM
|
I invoked the lines, but the result is the same. Maybe, the call of InitControls() is of interest:
BOOL CSelectCourier::OnInitDialog()
{
CDialog::OnInitDialog();
//Initialisierungen
InitControls();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}For your Information: I`m Using Visual Studio 2005 and Prof-Uis 2.83.
|
|
|
Technical Support
|
Jun 11, 2009 - 9:26 AM
|
We believe the problem has to do with something not yet discussed in this forum thread. Could you create a small test project reproducing the problem and send it to the support mail box at this web site?
|
|
|
Johannes Schwenk
|
Jun 15, 2009 - 8:00 AM
|
|
|
|
|
Michael chang
|
Jun 9, 2009 - 12:39 AM
|
Hello. i’m developing the application using the prof-uis version 2.82 I need to some works while calling the system command such as MAXIMIZE, MINIMIZE, CLOSE. So, How to get the system command event such as MAXIMIZE? thank you in advance.
|
|
|
Technical Support
|
Jun 9, 2009 - 12:30 PM
|
You should handle the WM_SYSCOMMAND message in the WindowProc() virtual method of your main frame or dialog window after invoking the parent class method. The WPARAM parameter of this message can be SC_MINIMIZE, SC_MAXIMIZE or SC_RESTORE if the message is sent on [_][O][X] buttons click or on the system menu commands.
|
|
|
Keith Degrace
|
Jun 5, 2009 - 12:48 PM
|
The following pseudo code inserts a custom control in a non customizable toolbar. Is it possible to accomplish the same thing with a customizable toolbar (i.e. using CExtCustomizeCmdTreeNode)? If so, can you please provide some details. CSomeCustomControl control; CExtBarButton button; button.CtrlSet(&control); CExtToolControlBar toolBar; toolBar.InsertSpecButton(button); The version of Prof-UIS 2.8.0 Thank you, Keith
|
|
|
Technical Support
|
Jun 6, 2009 - 1:51 PM
|
It’s possible to insert buttons with attached windows to the customizable toolbars, but these attached windows will not appear when the user drops such toolbar buttons onto a menu and the several instances of your custom controls attached to toolbar buttons will not be synchronized by Prof-UIS automatically. The customizable toolbars and menus are better without windows attached to toolbar buttons. So, it would be interesting to discuss details of your task.
The customize site creates the toolbar button objects in the CExtCustomizeSite::OnCreateToolbarButton() virtual method. You can override this method if you need to use your own CExtBarButton-class instances. Then the customize site inserts the toolbar buttons into the toolbar control using the CExtToolControlBar::InsertSpecButton() virtual method. You can override this virtual method, invoke parent class method, create your custom control inside toolbar and attach it into inserted toolbar button.
|
|
|
Keith Degrace
|
Jun 5, 2009 - 2:07 PM
|
These custom control buttons are very specific to the toolbar in question. It would be ideal if we could prevent these commands from even appearing in the Customize dialog. This would prevent the the user from being able to drop them into menus, or other toolbars. It would also be ideal if the toolbar in question would not be customizable by the user (i.e. not possible to drop buttons onto it). However, this is less of a problem. I was able to get something working with OnCreateToolbarButton() as you suggested, however there seems to be a small problem. The toolbar in question can have many different button configurations. Some configurations contain custom control buttons, while some do not. When chaging configuration, the toolbar is first clear. It seems that clearing the toolbar is not properly destroying the attached window. Here is a snipet of code that is used to clear the toolbar before repopulating it with another set of buttons: CExtCustomizeCmdTreeNode *activeNode = site.GetToolbarCmdNode(this, false);
if (activeNode != NULL)
activeNode ->RemoveAllNodes(); The net result is that all the buttons are removed from the toolbar, however the attached windows are still visible. Is this the proper way to clear a customizable toolbar?
|
|
|
Technical Support
|
Jun 6, 2009 - 1:48 PM
|
The custom controls can be attached to the toolbar buttons using the CExtToolControlBar::SetButtonCtrl() or CExtBarButton::CtrlSet() methods. Both methods have the bool bCtrlAutoDestroyed flag parameter which should be set to true if the attached control deletes itself in the overridden CWnd::PostNcDestroy() virtual method or class instance is not instantiated using the C++ new operator, and should be set to false otherwise. But there is one issue related to the un-destroyed windows and it should be fixed in the destructor of the CExtBarButton class:
CExtBarButton::~CExtBarButton()
{
CExtAnimationSite * pAcAS = AnimationClient_SiteGet();
if( pAcAS != NULL )
pAcAS->AnimationSite_ClientRemove( this );
_DestroyMenu();
m_arrChildren.RemoveAll();
#if (!defined __EXT_MFC_NO_CUSTOMIZE)
HDWP hPassiveModeDWP = NULL;
OnKeyTipTrackingQuery( false, NULL, hPassiveModeDWP );
#endif // from (!defined __EXT_MFC_NO_CUSTOMIZE)
CtrlSet( NULL ); // destroy attached window
}
If you are going to switch to the non-customizable toolbar, then you can hide any of your toolbars from the Prof-UIS customization subsystem ( CExtCustomizeSite), then you should set its CExtToolControlBar::m_bCustomizationAllowed property to false before initializing customization subsystem.
|
|
|
Technical Support
|
Jun 5, 2009 - 1:44 PM
|
It’s possible to insert the buttons with attached windows into customizable toolbars, but these attached windows will not appear when the user drop such toolbar buttons into menu and the several instances of your custom controls attached to toolbar buttons will not be synchronized by Prof-UIS automatically. The customizable toolbars and menus are better without windows attached to toolbar buttons. So, it would be interesting to discuss details of your task.
The customize site creates the toolbar button objects in the CExtCustomizeSite::OnCreateToolbarButton() virtual method. You can override this method if you need to use your own CExtBarButton-class instances. Then the customize site inserts the toolbar buttons into the toolbar control using the CExtToolControlBar::InsertSpecButton() virtual method. You can override this virtual method, invoke parent class method, create your custom control inside toolbar and attach it into inserted toolbar button.
|
|
|
Bart Kampers
|
Jun 5, 2009 - 2:28 AM
|
What is the purpose of TPMX_LEFTALIGN, TPMX_TOPALIGN etc. in CExtPopupMenuWnd::TrackPopupMenu. I cannot see any difference when using either of them? I want the right margin of the menu to be at the given y coordinate.
|
|
|
Technical Support
|
Jun 5, 2009 - 11:44 AM
|
If your code does not specify any TPMX_***ALIGN flags, the popup menu selects these flags automatically depending on free space on the screen relatively to the tracking point and exclude area rectangle. The TPMX_***ALIGN flags require non-empty exclude area. How to test this flags? The DRAWCLI sample application shows context menu in the selection mode over the graphic objects drawn on the view surface. This menu is displayed in the CDrawView::OnContextMenu() method:
VERIFY(
pPopup->TrackPopupMenu(
TPMX_OWNERDRAW_FIXED|TPMX_HIDE_KEYBOARD_ACCELERATORS,
point.x,
point.y
)
);
This code snippet should be modified if you want to see this menu right aligned: CRect rcExclude( point, point );
rcExclude.InflateRect( 3, 3 );
VERIFY(
pPopup->TrackPopupMenu(
TPMX_OWNERDRAW_FIXED|TPMX_HIDE_KEYBOARD_ACCELERATORS|TPMX_RIGHTALIGN,
point.x,
point.y,
&rcExclude
)
);
The TPMX_RIGHTALIGN makes menu right aligned, but it does not work without the rcExclude rectangle parameter specifying non-empty rectangle.
|
|
|
Sergey Serebryakov
|
Jun 3, 2009 - 10:58 PM
|
Hello,
How can I get or compute the minimal height of the CExtReportGridWnd derived control in order to display all its content without need to use the scrollbars. The use of RowCountGet() * DefaultRowHeightGet() does not work since rows have different height,
Thanks a lot.
|
|
|
Technical Support
|
Jun 4, 2009 - 4:45 AM
|
The following code snippet computes the height of a report grid window as the total height of header row(s) at top, data rows, horizontal scroll bar and report grid’s non-client area: CExtReportGridWnd & wndRG = . . .
LONG nIndex, nCount;
// header rows at top
LONG nTopHeight = 0;
nCount = wndRG.OuterRowCountTopGet();
for( nIndex = 0; nIndex < nCount; nIndex ++ )
{
INT nRowHeight = wndRG.OuterRowHeightGet( true, nIndex );
nTopHeight += nRowHeight;
}
// data rows (only expanded scrollable rows are computed)
LONG nDataHeight = 0;
nCount = wndRG.RowCountGet();
for( nIndex = 0; nIndex < nCount; nIndex ++ )
{
INT nExtraSpaceBefore = 0, nExtraSpaceAfter = 0;
INT nRowHeight = wndRG.OnSiwQueryItemExtentV( nIndex, &nExtraSpaceBefore, &nExtraSpaceAfter );
nTopHeight += nRowHeight + nExtraSpaceBefore + nExtraSpaceAfter;
}
// non-client area
CRect rcWnd, rcClient;
wndRG.GetWindowRect( &rcWnd );
wndRG.GetClientRect( &rcClient );
LONG nNonClientAreaHeight = rcWnd.Height() - rcClient.Height();
// horizontal scroll bar if present and if it’s window (not a non-client area part)
LONG nSbhHeight = 0;
if( wndRG.OnSwHasScrollBar( true ) )
{
CScrollBar * pSBH = wndRG.GetScrollBarCtrl( SB_HORZ );
if( pSBH->GetSafeHwnd() != NULL && ( pSBH->GetStyle() & WS_VISIBLE ) != 0 )
{
CRect rcSBH;
pSBH->GetWindowRect( &rcSBH );
nSbhHeight = rcSBH.Height();
}
}
// result
LONG nReportGridHeight = nTopHeight + nDataHeight + nNonClientAreaHeight + nSbhHeight;
The above code assumes the report grid’s layout has been updated after initialization. So, if you invoke it at startup immediately after report grid initialization, you should invoke the wndRG.OnSwRecalcLayout( true ); line of code before the code above to update report grid’s layout.
|
|
|
Anil Siddhpura
|
Jun 2, 2009 - 11:37 PM
|
I used CExtDynamicControlBar in dockable form. Its hiding automatically. Now I want to prevent resizing of this control bar. For that what I have to do ?
|
|
|
Technical Support
|
Jun 3, 2009 - 4:31 AM
|
You can prevent a resizable control bar to be resized in 100% of cases only if there is only one control bar in your application. Resizable control bars depend on each other. If one bar is resized, this typically affects the size or position of other bars. Please let us know more details about your task. Please also note, if your non-resizable bar is docked into the same tabbed container with other bars, there is a design conflict between your non-resizable bar and other resizable bars. The resizable bars are resizable by design and their resizing is typically should not be limited. There are two virtual methods in the CExtControlBar class which you can override in your CExtDynamicControlBar-derived class and do not invoke the parent class method for preventing bar resizing:
virtual void _RowResizingStart();
virtual void _RowRecalcingStart();
If your bar is docked somewhere at the left or at the right side of the main frame window, then the _RowResizingStart() virtual method is invoked for performing bar resizing in horizontal direction and the _RowRecalcingStart() virtual method is invoked for performing resizing in vertical direction. The same methods are invoked for bars docked at the top and bottom sides of the main frame window but the _RowResizingStart() virtual method is invoked for performing bar resizing in vertical direction and the _RowRecalcingStart() virtual method is invoked for performing resizing in horizontal direction.
|
|
|
Bart Kampers
|
May 27, 2009 - 8:41 AM
|
The CExtFormulaGridWnd has nice copy/paste features. Is it also possible to use these in the CExtGridWnd? Kind regards, Bart.
|
|
|
Technical Support
|
May 27, 2009 - 1:11 PM
|
There are two grid-related features demonstrated in the new FormulaGrid sample application:
- Formula calculations, watching and tracking. These features are related to the new CExtFormulaGridWnd class only.
- Everything else including clipboard and drag-and-drop. This is related to the improved version of the CExtGridWnd class and the new CExtGR2D class which describes abstract ranges of grid cells of any complexity.
The CExtGridWnd class automatically supports standard key combinations related to the clipboard actions. You should invoke the following code to enable the clipboard support: CExtGridWnd & wndGrid = . . .
wndGrid.m_dwSupportedAccelCommands |= __EGSA_COPY|__EGSA_CUT|__EGSA_PASTE;
The new clipboard support feature in the CExtGridWnd grid control works with both unique grid’s data format and plain ANSI/UNICODE text formats. So, you can copy/paste data between Prof-UIS grid and Windows NOTEPAD.EXE and other text editors. If the Prof-UIS specific clipboard data is available, the paste data is not only grid cell values, it’s the cell objects with unique type and behavior. If you need to enable dragging and/or dropping in the grid control, tyou should apply the new __EGWS_ADV_ENABLE_DATA_DND_DRAG and/or __EGWS_ADV_ENABLE_DATA_DND_DROP styles using the new CExtGridWnd::AdvModifyStyle() method. The new CExtGridWnd::OnGridQueryClipboardFormat() and CExtGridWnd::OnGridQueryClipboardFormatName() methods can be used for providing the grid control with unique clipboard format which is specific for your application.
|
|
|
Bart Kampers
|
May 27, 2009 - 8:36 AM
|
Can anyone provide an example for filling m_arrStaticStringValues in a CExtGridCellHeaderFilter. The documentations directs me to the FormulaGrid example but I cannot find the usage of this feature in the code. Neither can I find a filtering drop-down when I run the example.
|
|
|
Technical Support
|
May 27, 2009 - 1:11 PM
|
The FormulaGrid sample is new in Prof-UIS 2.85 and related to the new CExtFormulaGridWnd control which is incompatible with filtering features of the CExtGridWnd generic plain grid control. Please take a look at the FilteredGrids sample. It uses the CExtGridWnd::UpdateStaticFilterValueForOuterRow() method for filling the CExtGridCellHeaderFilter::m_arrStaticStringValues string array.
|
|
|
avirat jamdar
|
May 27, 2009 - 6:07 AM
|
Hello, I want to place an image on dialog as a backgroud, What is the way to do that?
|
|
|
Technical Support
|
May 28, 2009 - 11:48 AM
|
|
|
|
|
Bart Kampers
|
May 27, 2009 - 1:48 AM
|
Hello, I derived a window from CExtGridWnd and I want users to be able to either select a single cell or to select an entire row by clicking on the row header. So I thought I should modify the style like this:
SiwModifyStyle(
__ESIS_STH_ITEM | __ESIS_STV_ITEM | __EGBS_SFM_CELLS_H |
__EGBS_SF_SELECT_OUTER_ROWS | __EGBS_NO_HIDE_SELECTION |
__EGBS_GRIDLINES,
0,
false);
Strangely enough this alows to select multiple cells in a row but not selecting the entire row by clicking on the header. So I tried a lot of combinations with __EGBS_SFM_CELLS_H, __EGBS_SFB_FULL_ROWS and __EGBS_SFB_CELLS but none of them does the trick.
Could anyone help? Thanks.
|
|
|
Technical Support
|
May 27, 2009 - 12:48 PM
|
Please take a look at the Products tab page in the SimpleGrids sample. It contains the grid control with the selection behavior like you need. This grid is initialized in the CDemoGrid::_InitDemoTable_Products() method using similar styles. So, we think you should have some overridden virtual methods or some other types of grid styles which prevent the normal selection behavior in your grid control. Could you show us the entire grid’s source code?
|
|
|
Nicolas Pinaud
|
May 26, 2009 - 3:49 AM
|
Hi, First, sorry for my english but i’m french... I’m using Prof-UIS message boxes for the first time. For this, I put the IMPLEMENT_CWinAPP_DoMessageBox; line of code into declaration of the CWinApp-derived class. This will replace all the ::AfxMessageBox() message boxes with Prof-UIS message boxes. But all the text button are in english ("Yes" or "No") and not in french ("Oui" ou "Non"). Nevertheless, when i use Windows message boxes, the text button are in french. How can i change the language of Prof-UIS message boxes? Thank for your answers.
|
|
|
Markus Eßmayr
|
Jun 4, 2009 - 5:04 AM
|
I’d like to add, that the translation is also incomplete for German resources. ID_EXT_HEADER_FILTER_*
IDS_EXT_EMPTY_FOLDER_NAME_MSG_BOX_TEXT
IDS_EXT_OVERWRITE_THIS_FILE_MSG_BOX_TEXT
IDS_EX_MB_*
IDS_EXT_SHELL_LIST_VIEW_COLUMN_* Thanks for correcting this!
|
|
|
Technical Support
|
Jun 4, 2009 - 1:09 PM
|
We are working on this and the translated version will appear very soon. Thank you for your feedback.
|
|
|
Technical Support
|
May 26, 2009 - 1:55 PM
|
We are sorry for incomplete French translation. There are two French resource files in the ...\Prof-UIS\Include\Resources\ folder and you can update the translation manually. The Resource_fra.rc file contains the LANGUAGE LANG_FRENCH, SUBLANG_FRENCH translation of Prof-UIS resources. The Resource_frc.rc file contains the LANGUAGE LANG_FRENCH, SUBLANG_FRENCH_CANADIAN translation of Prof-UIS resources. You can open these files in any version of Visual Studio and translate the rest of string table resource which includes the message box related strings. Please note, you should save a copy of the ...\Prof-UIS\Include\Resources\resource.h file before translation and restore it after it. Of course, we will notify our translators but we are not sure these translations will be done quickly.
|
|
|
Nicolas Pinaud
|
May 27, 2009 - 2:50 AM
|
Thanks a lot for your help. I have translate the two .rc files, and it works fine. I’ll wait the next release now...  Maybe in few months Bye, and thanks again for your help
|
|
|
Andrej Kasa
|
May 25, 2009 - 12:06 PM
|
Hello, I just upgraded from ProfUIS 2.84 to 2.85. However, I realized that my app .exe has increased in size of more than 3 mb (old exe size was 6.3 Mb, now it is 9.6 mb) without any changes done in my own code - the actual profuis lib file sizes when comparing to 2.84 are almost the same. Can you please explan the reason for this? Since lib files in old and new are almost the same in size, why si there such a big increase in size if final exe? I know that you added a lot of new functionality, is it somehow possible for my exe to be around the size as in profuis 2.84? Or what approach do you recommend? thanks, krompo
|
|
|
Andrej Kasa
|
May 25, 2009 - 1:34 PM
|
the question 2 seems to be obvious, what I meant was if I can do all the exe size reducing parts in static versions as well or they are limited to only when I use profuis as a dll? or there is no difference, meaning what ever can be done in dll can be done as well when linking profuis statically? when I switch to full version, I definetely need the possibility for my exe file to be max. the size as when building from profuis freeware (if smaller even better) but my final exe size should not be higher in full version as it is now in the freeware, so that is my concern.
|
|
|
Technical Support
|
May 26, 2009 - 2:16 AM
|
If you are using Prof-UIS as a DLL, all the resources mentioned in our previous answer are kept as part of Prof-UIS DLL. So, all the resource size optimizations reduce the size of Prof-UIS DLL only.
If you are using Prof-UIS as a LIB, the Prof-UIS resources are inside the DLL or EXE module compiled by your project. They are included into the .rc2 file of your project. All the resource size optimizations in this case affect the size of your DLL or EXE compiled module.
Both freeware and full Prof-UIS versions have the same resources. The full version is more than two times rich with C++ components. So, the full version is larger than freeware. But, as we said, you can exclude everything unneeded and make the full Prof-UIS version is even smaller than freeware.
|
|
|
Technical Support
|
May 25, 2009 - 12:49 PM
|
First of all we have new .../Prof-UIS/Include/ExtFormulaGridWnd.h and .../Prof-UIS/Src/ExtFormulaGridWnd.cpp source files containing enough large portion of source code. Second, we have new resources for the new geographic controls in the .../Prof-UIS/Include/Resources/ResGeoControls/ folder. These resources are included in the .../Prof-UIS/Include/Resources/resource.rc file:
/////////////////////////////////////////////////////////////////////////////
// Resources for geo controls
#include "ResGeoControls\\ResGeoControls.rc"
If you don’t need geographic controls, then you can comment the lines of code above and your files compiled with Prof-UIS 2.85 will have much closer size to the same files compiled with Prof-UIS 2.84. You can make your application even much smaller if you exclude other un-needed resources from the .../Prof-UIS/Include/Resources/resource.rc file. Please also review the beginning of the .../Prof-UIS/Include/Prof-UIS.h file and uncomment lines like //#define __EXT_MFC_NO_FORMULA_GRID to remove source code of Prof-UIS components which are not used in your projects.
|
|
|
Andrej Kasa
|
May 25, 2009 - 1:04 PM
|
currently I am using the ProfUIS 2.85 freeware but in the near future I am going to purchase your full licence. I need to everything link statically (my app has MFC linked statically and I need statical linkage for ProfUIS as well, so that is my environment I need to follow). 1) does what you have just written apply to the freeware version as well? 2) if I buy the full version can I even more decrease the size of my final exe, maybe even less as in profuis 284? I mean are there any limits what can I comment out so that I get the smallest exe possible? ideal would be that only components I use will be put into my final exe, all other skiped out - is that possible? krompo
|
|
|
Technical Support
|
May 26, 2009 - 2:13 AM
|
Yes, everything we wrote can be applied to the freeware version too. But the freeware is a lean version of the full one. The world maps for geographic controls really add size to compiled projects. But this size is completely in the resource section and does not affect startup performance.
Yes, you can make the full version even less than freeware and less than previous Prof-UIS versions. You can decrease the size two times if you exclude the Office 2007 resources but this will make the Office 2007 themes unavailable.
|
|
|
Andrej Kasa
|
May 25, 2009 - 5:45 AM
|
Hello, I would like to know if you plan to support in the near future themed property sheets/pages in the default mode (without the "Back" and "Next" buttons). I know prfuis supports wizard style property sheets but I am still missing themed property sheets which are needed for configuration and similar stuff (several tab pages within one dialog like window - you know what I mean). Can I expect that you will support it? Because that is the only final part in my app that is not themed and that does not look good. thanks, krompo
|
|
|
Andrej Kasa
|
May 27, 2009 - 2:14 AM
|
Currently I have all my settings implemented in MFC using CPropertySheet/CPropertyPage classes. I am just looking for the easiest and fastest way how to convert it to ProfUIS so I get my existing property pages themed by profuis. Do you think what you have just suggested is the best approach for my case or should I follow a different path? thanks.
|
|
|
Technical Support
|
May 29, 2009 - 10:59 AM
|
|
|
|
|
Technical Support
|
May 26, 2009 - 2:00 PM
|
We have the CExtTabWnd class in Prof-UIS implementing a tab line control and a set themed versions tabs derived from it . These controls are not based on the CTabCtrl tab common control because our tabs have more extended features such as tab item grouping, animated scrolling and extended set of buttons. That is why we do not support the tabbed mode in the CExtResizablePropertySheet class yet, it’s based on the tab common control. It’s easier for us to recode the tabbed property sheets from scratch using Prof-UIS tab page containers with child dialogs than to skin the tab common control which works differently in different Windows versions. Please let know whether do you need any kind of tabbed property sheet replacement or whether you need the MFC CPropertySheet-derived component?
|
|
|
ProfUIS User
|
May 25, 2009 - 2:22 AM
|
Sir, I am using CExtTabWhidbeyWnd class for creating the tabs. Tab names with single character are not visible on tab. Could you please help me in thi? Thanks.
|
|
|
Technical Support
|
May 26, 2009 - 1:57 PM
|
Please open the string resource table of the ProfStudio sample in the Visual Studio resource editor and find the IDR_PROFSTUDIOTYPE string in it. This string contains the following text: \nProfStudio child window\nProfStudio child window
That is why the MDI child frame windows in the ProfStudio sample application are displaying the ProfStudio child window text in their captions and MDI tabs. Now you can change the IDR_PROFSTUDIOTYPE resource string to the following value and then run the ProfStudio sample application: \n1\n1
|
|
|
ProfUIS User
|
May 26, 2009 - 5:24 AM
|
We are currently using version 2.54. We have tried renaming IDR_PROFSTUDIOTYPE to single character string but it diddn’t work. Which version should we use in order to make single character string visible or is there any workaround? Thanks
|
|
|
Technical Support
|
May 25, 2009 - 11:31 AM
|
In the ProfStudio sample, Whidbey MDI tabs are used. We changed the IDR_PROFSTUDIOTYPE resource string in this sample application and made the MDI child frames displaying a very short single character title in the Whidbey style MDI tabs. We didn’t see any problems with short tab item text. We guess you are using some old Prof-UIS version or this issue may depend on other conditions not mentioned in your message: Windows OS version, desktop theme, default GUI font name.
|
|
|
avirat jamdar
|
May 23, 2009 - 1:47 AM
|
Hello !! I have taken Edit control from MFC and then conveted it in to CExtEdit. I want to change the font of it. Please reply..
|
|
|
Technical Support
|
May 23, 2009 - 11:44 AM
|
You can use CWnd::SetFont() for changing the font both for CEdit and CExtEdit.
|
|
|
Anil Siddhpura
|
May 22, 2009 - 6:01 AM
|
How can I add resizable bar in dialog based application ?
|
|
|
Technical Support
|
May 23, 2009 - 11:46 AM
|
You can create a resizable control bar inside a frame window only. So, you should create a CFrameWnd window as a child of your dialog. The frame window should be created using the CWnd::Create() method and WS_CHILD style. Then you should create and configure required control bars inside the child frame window. Please note, the CFrameWnd class invokes the delete this code in the CFrameWnd::PostNcDestroy() virtual method. This means you should override this method without invoking the parent class method or instantiate the CFrameWnd object dynamically.
|