|
Subject |
Author |
Date |
|
|
Takis Takoglou
|
Apr 9, 2009 - 2:40 AM
|
Good day and thanx for the many helpful replies. My problem today is that i have a CExtGridCellPicture in my CExtPropertyGrid and i have loaded a .bmp file via CExtBitmap * bmp= new CExtBitmap;
bmp->LoadBMP_File (L"c:/a.bmp"); Then i load the bitmap with : pValue->BitmapSet(bmp); //pValue is pointer to CExtGridCellPicture Now the problem is that i want the cell to be stretched so that it contains the whole bitmap.
I have already made the bitmap to be in stretch mode using ImageModeSet() and i just want to change the dimensions of the container-cell. Firstly i would like the Height of the cell to be changed to that of the bitmap. So there are two things i must know:How to change the height of the CExtGridCellPicture and how to change the width of a CExtGridCellPicture
without changing the width of the whole PropertyGrid. Thanx in advance Stakon.
|
|
|
Technical Support
|
Apr 13, 2009 - 1:24 PM
|
The 2.85 is to be released very soon. We still keep it under heavy testing. If you have a valid 2.84 license, then you can always request us for the latest Prof-UIS source code which is constantly updated at least weekly.
|
|
|
Technical Support
|
Apr 9, 2009 - 12:59 PM
|
The property grid control in Prof-UIS 2.85 automatically increases height of picture cells because of improved CExtPropertyItem::OnGridRowInitialized() virtual method:
void CExtPropertyItem::OnGridRowInitialized(
CExtPropertyGridWnd & wndPG,
HTREEITEM hTreeItem,
CExtGridCell * pCellCaption,
CExtGridCell * pCellValue
)
{
ASSERT_VALID( this );
ASSERT_VALID( (&wndPG) );
ASSERT( hTreeItem != NULL );
ASSERT_VALID( pCellCaption );
#ifdef _DEBUG
if( pCellValue != NULL )
{
ASSERT_VALID( pCellValue );
}
#endif // _DEBUG
pCellCaption;
pCellValue;
if( wndPG.ItemIsExpanded( hTreeItem ) )
{
if( ! ExpandedGet() )
wndPG.ItemExpand( hTreeItem, TVE_COLLAPSE );
} // if( wndPG.ItemIsExpanded( hTreeItem ) )
else
{
if( ExpandedGet() )
{
wndPG.ItemFocusLock( true );
wndPG.ItemExpand( hTreeItem, TVE_EXPAND );
wndPG.ItemFocusLock( false );
}
} // else from if( wndPG.ItemIsExpanded( hTreeItem ) )
if( pCellValue != NULL )
{
pCellValue->ModifyStyle( 0, __EGCS_PRESSED );
pCellValue->ModifyStyleEx( 0, __EGCS_EX_UNDEFINED_ROLE );
CSize sizePropCell = pCellValue->MeasureCell( &wndPG );
INT nExt = 0;
((CExtGridCell*)hTreeItem)->ExtentGet( nExt );
if( nExt < sizePropCell.cy )
((CExtGridCell*)hTreeItem)->ExtentSet( sizePropCell.cy );
}
wndPG._OnSynchronizeInputEnabledCheckMark( this, false );
}
But if you need to change widths of the property grid control, then you need to walk through all the grid cells in the property values and measure them manually, measure value captions and compute total widths of the property grid window.
|
|
|
Takis Takoglou
|
Apr 10, 2009 - 12:58 AM
|
I would like to renew my license to your newest version Prof-UIS 2.85 so that the problem is fixed, but unfortunately the current version in your purchase page is 2.84.
When will 2.85 be ready for purchase? Thanx in advance, Stakon.
|
|
|
Takis Takoglou
|
Apr 8, 2009 - 5:20 AM
|
Good Day, while using your property grid :
1)I create a property grid
2)I add several properties in it
3)In the apply method of a cell I want to perform the following: To empty the property grid completely,as if it were a new one, so that it can be used later for new properties/values. I would also like to delete permanently all the items from it if possible. Thanx in advance Stakon.
|
|
|
Technical Support
|
Apr 14, 2009 - 11:39 AM
|
You can handle modification of any property value in your CExtPropertyGridCtrl-derived class which implements two virtual methods: CExtPropertyGridCtrl::OnPgcInputComplete() and CExtPropertyGridCtrl::OnPgcResetValue(). These two virtual methods represent two possible ways of changing any property value: editing a grid cell and invoking the Reset command from the context menu displayed over the property value.
|
|
|
Technical Support
|
Apr 8, 2009 - 6:50 AM
|
The CExtPropertyItem::Apply() virtual method is not a good place for changing the selected property store in the property grid control. There are two virtual methods in the CExtPropertyGridCtrl class which allow you to handle all the possible changing events of any property values: CExtPropertyGridCtrl::OnPgcInputComplete() and CExtPropertyGridCtrl::OnPgcResetValue(). You should implement these virtual methods. Your methods should invoke the parent class methods first and then analyze the changed grid cell value of the property value object and perform property store assignment. You can either assign the new property store with the CExtPropertyGridCtrl::PropertyStoreSet() method or change the structure of the currently selected property store and then invoke the CExtPropertyGridCtrl::PropertyStoreSynchronize() method. Please note, any CExtPropertyItem can be hidden in the property grid control if its CExtPropertyItem::CanBeInsertedIntoPropertyGrid() virtual method returns false.
|
|
|
Takis Takoglou
|
Apr 10, 2009 - 8:10 AM
|
Thank you very much! Another minor problem has arised:
Icannot change the text color of my PropertyGrid Cell which contains the Property Category i.e. the first column cell I tried to do the following:
CExtGridCell * pCellValue = GridControl.GetActiveGrid()->GridCellGet(i,j,0,0);
pCellValue->TextColorSet (CExtGridCell::__ECS_NORMAL,RGB(255,0,0)); but nothing happened... anty ideas?
Thanx in advance, Stakon.
|
|
|
Technical Support
|
Apr 13, 2009 - 1:23 PM
|
Each CExtPropertyValue object contains two CExtGridCell objects representing the active and default values. The CExtPropertyGridCtrl control contains two tree grids (sorted and categorized) displaying property values and the grid cells each of these tree grids are the cloned copies of the active grid cell inside the CExtPropertyValue object. When the user finishes editing some grid cell in the active tree grid window, then the property grid control automatically synchronizes grid cell of the same property value in the inactive tree grid windows and inside the CExtPropertyValue object.
We recommend you to change the active grid cell of the CExtPropertyValue property value and then invoke the CExtPropertyGridCtrl::PropertyStoreSynchronize() method or the CExtPropertyGridCtrl::PropertyValueSynchronizeSimple() method the true flag in the bUpdateActiveTreeGridWindow parameter.
|
|
|
Takis Takoglou
|
Apr 14, 2009 - 2:03 AM
|
Unfortunately you didn’t understand my question, (or didn’t i understand the answer?:s ) Anyway to make things clearer, I have a Property Value represented in 2 Cells.
The first cell is that which holds my Property Value name e.g. "Color"
The second cell is of CExtGridCellComboBox Type and contains several values, What i want to change is the color,font,weight etc of the first cell.
For example when someone makes a change in the value, i want the "Color" caption to become red or something. Thanx in advance, Stakon.
|
|
|
Takis Takoglou
|
Apr 8, 2009 - 4:12 AM
|
Good day I am trying to find a way to avoid memory leaks when using your propertygrid. My code regarding the problem is: 1)IF I DO THE FOLLOWING THE PROGRAM SHOWS THE PROPERTIES THE FIRST TIME BUT WHEN IT IS CALLED AGAIN TH PROGRAM CRASHES. IF I REMOVE THE LINE "this->MyPropStore->ItemRemove(0, -1);" THE PROGRAM WORKS BUT AS YOU CAN GUESS THE SAME CATEGORY "Dimensions" SHOWS MANY TIMES SO I SUSPECT IT’S SOMETHING WITH THE PROPERTY STORE...".MyPropStore" IS THIS THE PROBLEM? PERHAPS I SHOULD SET THE PROPERTY STORE TO NULL? THEN AGAIN SOME MEMORY ISSUES ARISE... void MyDialog::LoadPropertyGrid() { if (MyPropStore) this->MyPropStore->ItemRemove(0, -1); // Remove the previous items in the property store Property *prop = &this->Prop; //bind the properties CExtPropertyCategory *Dimensions = new CExtPropertyCategory(); //Create a category LayerProp *Layer = new LayerProp(prop); //create a value
Dimensions->ItemInsert (Layer); //insert it in the category this->MyPropStore.ItemInsert(Dimensions, -1) //Store the category in the dialog variable MyPropStore GridControl.PropertyStoreSet(&this->MyPropStore); //Insert the dialog variable property store in the grid control } 2)IF I DO THE FOLLOWING THE PROGRAM WORKS FINE, BUT HAS TONS OF MEMORY LEAKS I HAVE TRIED TO REDUCE THEM, BUT I AM UNABLE TO FIND A NICE WAY TO DELETE THE LOCALY-CREATED POINTERS void MyDialog::LoadPropertyGrid() { if (MyPropStore) this->MyPropStore->ItemRemove(0, -1); // Remove the previous items in the property store Property *prop = &this->Prop; //bind the properties CExtPropertyStore *PropStore = new CExtPropertyStore; CExtPropertyCategory *Dimensions = new CExtPropertyCategory(); //Create a category LayerProp *Layer = new LayerProp(prop); //create a value
Dimensions->ItemInsert (Layer); //insert it in the category PropStore.ItemInsert(Dimensions, -1) //Store the category in the local variable PropStore GridControl.PropertyStoreSet(PropStore); //Insert the localy created property store in the grid control } Thanx in advance for any help you can provide Stakon.
|
|
|
Takis Takoglou
|
Apr 9, 2009 - 4:30 AM
|
Thanx for the advice! I have encountered yet another problem:
I am using SelectionProperties.ItemInsert() // SelectionProperties is a CExtPropertyStore variable
to put in the grid several values and categories.
// I insert values into Categories
Category1->ItemInsert (value5);
Category1->ItemInsert (value6);
Category2->ItemInsert (value7); // I insert values and categories in the propertystore
SelectionProperties.ItemInsert(value1)
SelectionProperties.ItemInsert(value2)
SelectionProperties.ItemInsert(category1) //A category containing 2 values
SelectionProperties.ItemInsert(value3)
SelectionProperties.ItemInsert(category2 //A category containing 1 value
SelectionProperties.ItemInsert(value4)
// Insert PropertyStore in the Property Grid
GridControl.PropertyStoreSet(&SelectionProperties); When the program runs one would expect to see in the propertgrid the following: value1
value2
+Category1
--value5
--value6
value3
+Category2
--value7
value4 But what i get is:
value1
+Category2
--value7
+Category1
--value5
--value6
value2
value3
value4
I made some further tests and this is the same when i use ItemInsert(valuex, some_value) and the results are the same.
In particular it seems like the Category2 "refuses" to get under value 3 ?
Plz let me know i f i am doing something wrong when using the PropertyStore
Thanx in advance
Stakon.
|
|
|
Technical Support
|
Apr 9, 2009 - 12:29 PM
|
Please use the CExtPropertyItem::ExpandedSet() method for changing expanded states of property categories and compound property values.
|
|
|
Takis Takoglou
|
Apr 10, 2009 - 5:03 AM
|
No that was not the issue, but fortunately i discovered that the problem was fixed with the GridControl.GetActiveGrid()->m_bSortedCategories = false;
GridControl.GetActiveGrid()->m_bSortedValues = false; Apparently the properties were sorted by default and that caused the funny placement...
|
|
|
Technical Support
|
Apr 8, 2009 - 6:45 AM
|
The CExtPropertyGridCtrl property grid control displays the properties defined in a CExtPropertyStore property store tree. But the property grid uses the property store as externally managed data. The property grid never deletes the property store and its items. Please ensure the property store tree is destroyed after the property grid control. The property grid control should never use the property store which is already deleted. So, if you are changing the property store on the fly and deleting the old property store, then you should assign the NULL property store first (CExtPropertyGridCtrl::PropertyStoreSet()).
|
|
|
Markus Eßmayr
|
Apr 8, 2009 - 12:58 AM
|
Hello, my Windows system normally runs in a 16 bits per pixel graphics mode, because some of our customers also use this mode.
And we have to verify, that our applications look fine on our customer’s PC’s too. But certain themes of Prof-UIS (2.83) don’t look well on the 16bpp mode.
Especially labels, radio buttons and check boxes, that should display a text with a transparent background, paint visible boxes instead.
You can verify this if you run one of the Prof-UIS samples (I tried with FunnyBars, and opened the About dialog), choosing one of the themes below and switch the operating systems color mode between 16 and 32 bits per pixel. Themes that don’t look fine:
- Office 2007 (Release 2) Silver
- Visual Studio 2008
- Visual Studio 2005
- Office 2003 (without Windows XP theme colors)
- Office 2003
Themes that do look fine:
- Office 2007 (Release 2) Obsidian
- Office 2007 (Release 2) Luna-Blue
- Office 2007 (Release 1)
- Native Windows XP
- Office XP / Visual Studio .NET
- Office 2000 Is there a way to fix this without modifying Prof-UIS (too much)?
Are you going to change the behaviour in any future version of Prof-UIS? Thanks very much! Max
|
|
|
Technical Support
|
Apr 8, 2009 - 1:25 PM
|
We checked this issue in Prof-UIS 2.84 both on XP and Vista .Everything is very similar in both 32 and 16 bit per pixel modes. Could you send us a screen shot demonstrating the problem?
|
|
|
Johannes Schwenk
|
Apr 7, 2009 - 1:25 PM
|
Hallo, i have a Problem with a CExtDateTimeWnd Derived Class. I Initialise the Control with a COleDateTime Pointer: this->m_dtDate = *pdti;
UpdateDurationWnd(); pdti is COleDateTime*. But the Control in My Display show the following: 
but when I Click On the Dropdown Button of the Control, it changes to: 
which is the Date from pdti. What am I do wrong? (When I initialise the Date with this->SetDate() it’s the same). Thanks for your help
|
|
|
Johannes Schwenk
|
Apr 9, 2009 - 4:19 AM
|
*pdti: m_dt: 38184.610196759262 m_status: valid But as I said: The problem is not fixed by Setting the Date with this->SetDate()
|
|
|
Technical Support
|
Apr 13, 2009 - 1:24 PM
|
You should use the SetDateTime() method instead of the SetDate() method. We modified the CPageDateTimeDuration::OnCmdMsg() method in the ProfUIS_Controls sample application for testing the date value you provided us with:
case IDC_ADJUST_SIZE_DATETIME:
{
DATE _a_date = 38184.610196759262;
m_wndDateTime.SetDateTime( _a_date, true, true );
}
//m_wndDateTime.AdjustSize();
//m_wndBoxDateTime.Invalidate();
break;
With this modification we run the ProfUIS_Controls sample application and clicked the Adjust Size push button under the CExtDateTimeWnd control on the Date & Time dialog page and the specified date/time value was displayed in the CExtDateTimeWnd control.
|
|
|
Technical Support
|
Apr 8, 2009 - 6:50 AM
|
Could you set a break point at the this->m_dtDate = *pdti; line of code and take a look at the *pdti object properties in debug mode (Shift+F9)? The COleDateTime class has the following properties:
DATE m_dt;
DateTimeStatus m_status;
We need to know values of these properties. This can help us reproduce and debug this issue.
|
|
|
Johannes Schwenk
|
Apr 9, 2009 - 4:20 AM
|
*pdti: m_dt: 38184.610196759262 m_status: valid But as I said: The problem is not fixed by Setting the Date with this->SetDate()
|
|
|
David Tardio
|
Apr 7, 2009 - 10:10 AM
|
Hello
I have an MDI application with a toolbar of type CExtToolControlBar. The thing is that I want to hide some of its buttons at runtime, but everytime I call GetButtonCtrl(int nIndex) on my CExtToolControlBar attribute in my CMainFrame object I always get NULL in return no matter which index I use. I use the ’CommandToIndex( UINT uCmd)’ method for getting the indexes. The indexes seem to be OK, but I always get NULL as a result of calling GetButtonCtrl. I’ve tried it even on the OnCreate method on CMainFrame with identical result.
I’m desperated. Could you help me please?
Thanks in advance
|
|
|
David Tardio
|
Apr 8, 2009 - 7:29 PM
|
First of all, thanks a lot for your quick reply. Yes, I tried to step into the CExtToolControlBar::GetButtonCtrl() method, but as you said in your reply, I shouldn’t have used that method for getting a pointer to the button handler (CExtBarButton*). I tried to hide my buttons in my toolbar that way because I show that code elsewhere, maybe in www.codeproject.com. Fortunately, the CExtToolControlBar::GetButton() method has worked perfectly! Thanks a lot again!
|
|
|
Technical Support
|
Apr 7, 2009 - 1:01 PM
|
The CExtToolControlBar::GetButtonCtrl() method just invokes the CExtBarButton::CtrlGet() method. Both methods are widely used inside Prof-UIS. Did you triy to step into these methods while debugging?
If you are using customizable toolbars and menus, then you should not use these methods. The customizable toolbars and menus are using built-in text fields and combo box fields which are not based on the HWND window handles.
In any case you don’t need to know window handles. To hide toolbar button you should invoke the following code:
CExtBarButton * pTBB = . . .
pTBB->SetStyle( pTBB->GetStyle() | TBBS_HIDDEN );
|
|
|
haijun zhao
|
Apr 6, 2009 - 8:22 PM
|
After I installed the 2.84 Trial, then open the Solution for Visual Studio 8.0 (2005) with Service Pack 1 - Win32 platform workspace, then builded any sample, the VS 2005 will Crash, why?
|
|
|
Technical Support
|
Apr 8, 2009 - 3:43 AM
|
|
|
|
|
Johannes Schwenk
|
Apr 6, 2009 - 8:23 AM
|
Hi, I try to use a CExtDateTimeWnd derived Class, but When I overide the CExtDateTimeWnd::OnValueChanged() function, it is not called. My Code: class AFX_EXT_CLASS CPUISDateTimeWithReturnVal : public CExtDateTimeWnd
{
DECLARE_DYNAMIC(CPUISDateTimeWithReturnVal) (...) virtual bool OnValueChanged(const COleDateTime & dtDateTimeOld, const COleDateTime & dtDateTimeNew); (...) } bool CPUISDateTimeWithReturnVal::OnValueChanged(const COleDateTime & dtDateTimeOld, const COleDateTime & dtDateTimeNew)
{
AfxMessageBox("TEST");
} When I change the Control Date in my Dialog, the OnValueChanged function is not called. But I can call other Functions of the Control. Can you help me? Thank you, Johannes
|
|
|
Technical Support
|
Apr 6, 2009 - 10:13 AM
|
We are sorry for this typo in the method declarations inside Prof-UIS help file. The correct signatures are:
virtual bool OnValueChanging(
const COleDateTime & dtDateTimeOld,
const COleDateTime & dtDateTimeNew
) const;
virtual bool OnValueChanged(
const COleDateTime & dtDateTimeOld,
const COleDateTime & dtDateTimeNew
) const;
The const modifier was lost in the help files.
|
|
|
Anay Kulkarni
|
Apr 6, 2009 - 4:54 AM
|
Hello to all, In my project I have created a modeless dialog box and it is inherited from "CExtResizableDialog" class. When I change color theme of my application (means LunaBlue or Obsedian or Silver etc.) background color of that modeless dialog box also changes as per color theme. But I want to give my own colors to the background of a modeless dialog box regardless of color theme selected. Means I will select any color theme but background color of a modeless dialog box will not change, it will remain same (what I have given it). Can anyone tell me how to do it? Because right now I tried to change color in "OnPaint()" of modeless dialog box class but it is not taking the given color, it is only taking color as per ProfUI color theme. So please can any one help me out? Thanks and Regards, Anay
|
|
|
Technical Support
|
Apr 6, 2009 - 9:03 AM
|
It’s possible to handle a WM_PAINT message in the dialog’s WindowProc() virtual method to change the dialog background only. This will not affect the background of dialog controls. So, the right solution is to use the Prof-UIS inherited background painting feature. It’s demonstrated in the TabbedBars sample application where the dialog pages in the One Note tab page container have colored background consistent with tab item color and it’s possible to turn on the hurricane like background for entire main frame window. This feature is turned off by default. To turn it on you should invoked the g_PaintManager->m_bCustomBackgroundInheritanceEnabled = true; code and handle the CChildView::OnMsgPaintInheritedBackground registered message like demonstrated in the CExtPaintManager::g_nMsgPaintInheritedBackground and CMainFrame::OnMsgPaintInheritedBackground handler methods in the TabbedBars sample application. The inherited background painting feature is present in all the Prof-UIS versions.
|
|
|
Seung Cheol Lee
|
Apr 5, 2009 - 9:24 PM
|
I found the short key error in menu. The short key is Alt + Key. I made the test menu below. ========================== &Test &1.Test ----> Alt + 1 &2.Test -----> Alt + 2 &3.Test -----> Alt + 3 &0.Test -----> Alt + 0 ========================== &1.Test, &2.Test and &3.Test operated well. But &0.Test didn’t opeate. It was impossible to use Alt+0 in menu. Could you check the error. Prof-UIS Ver. : 2.84 OS : Windows Vista Lanuage : Korean IDE : VS2005
|
|
|
Technical Support
|
Apr 6, 2009 - 10:11 AM
|
Thank you for reporting this issue. Here is how the beginning of the CExtPopupMenuWnd::ItemFindByAccessChar() method looks like.
INT CExtPopupMenuWnd::ItemFindByAccessChar(
__EXT_MFC_SAFE_TCHAR chrAccess,
INT nStartIdx, // = -1
BOOL bRestartAt0, // = TRUE
BOOL bSearchDisplayedOnly // = TRUE
) const
{
ASSERT_VALID( this );
if( chrAccess == _T(’0’) )
return -1;
. . .
There is a typo in the if( chrAccess == _T(’0’) ) line of code. It really should be if( chrAccess == _T(’\0’) ): INT CExtPopupMenuWnd::ItemFindByAccessChar(
__EXT_MFC_SAFE_TCHAR chrAccess,
INT nStartIdx, // = -1
BOOL bRestartAt0, // = TRUE
BOOL bSearchDisplayedOnly // = TRUE
) const
{
ASSERT_VALID( this );
if( chrAccess == _T(’\0’) )
return -1;
. . .
|
|
|
Takis Takoglou
|
Apr 3, 2009 - 5:56 AM
|
Good day, I would like to know if it is possible to hide/unhide an item within a property grid. I know i could remove the item and store its parent/location and then recreate it when desired but isn’t optimal. Thanx in advance, Stakon.
|
|
|
Takis Takoglou
|
Apr 8, 2009 - 7:38 AM
|
Good Day I have done as you said but probably I am doing something wrong. In a CExtPropertyValue derived class which creates a combo-box in the constructor, i have added th following line in the declaration (.h file):
virtual bool CanBeInsertedIntoPropertyGrid(); and then i define it as (in the .cpp file) bool Color::CanBeInsertedIntoPropertyGrid()
{
bool a = CExtPropertyItem::CanBeInsertedIntoPropertyGrid(); //even without this line it doesn’t seem to work
return false ;
} i call this function in the apply of that value, but nothing happens? CanBeInsertedIntoPropertyGrid (); // I call it here
CMainFrame *mainfrm = (CMainFrame *)AfxGetMainWnd();
mainfrm->m_wndInBarDlg.GridControl.PropertyStoreSynchronize () // I synchronize the propgrid
What am i doing wrong? Thanx in advance Stakon.
|
|
|
Technical Support
|
Apr 8, 2009 - 1:23 PM
|
Here is the correct method signature:
virtual bool CanBeInsertedIntoPropertyGrid() const;
You forgot the const modifier.
|
|
|
Technical Support
|
Apr 3, 2009 - 11:01 AM
|
You should use your CExtPropertyValue-derived class (and/or CExtPropertyCategory-derived) which implements the CExtPropertyItem::CanBeInsertedIntoPropertyGrid() virtual method. Your method should simply return a false flag if the property item should be hidden in the property grid control. You should invoke the CExtPropertyGridCtrl::PropertyStoreSynchronize() method if you want the property grid control to reload the property store tree after changing particular property items.
|
|
|
L Freddi
|
Apr 2, 2009 - 5:54 AM
|
Hi, I have dialog inside CExtcontrolbar window. I’m success to hide/show controlbar using showcontrolbar() function. But, when the dialog show up again, the dialog’s size was changed. I want to show dialog’s initial size. Do you have solution? please help me.
|
|
|
Technical Support
|
Apr 2, 2009 - 2:19 PM
|
Yes, you should invoke control bar’s CExtControlBar::OnRepositionSingleChild() method.
|
|
|
L Freddi
|
Apr 1, 2009 - 8:48 PM
|
Dear Support, You misunderstand my question. I have each dialog inside each one control bar. "A" dialog inside "Awnd"control bar window. "B dialog inside "Bwnd"control bar window. "A" ,"B",..dialog inherited CExtResizableDialog class "Awnd", "Bwnd",.. control bar inherited CExtControlBar class I don’t want to use tabcontainer. I have serveral dialog in main page. When I change the other page, "A","B",.. and "Awnd", "Bwnd", .. on main page were hided using ShowWindow(HIDE) function. But I return main page, "A","B",.. and "Awnd", "Bwnd", .. were still hided inspite using ShowWindow(SHOW). Do you know the solution that "A","B",.. and "Awnd", "Bwnd", .. show up again? Do you have another function except for ShowWindow()? Any help is greatly appreciated. freddi
|
|
|
Technical Support
|
Apr 2, 2009 - 5:18 AM
|
It’s not correct to show/hide a windows created as a child of the CExtControlBar window. Your dialogs should always be visible. You should show/hide the CExtControlBar windows using the CFrameWnd::ShowControlBar() method instead.
|
|
|
Jeremy Ruth
|
Apr 1, 2009 - 6:27 PM
|
I am ASSERTing at the following spot in extgridwnd.cpp: m_hCursorResizingH =
pApp->LoadCursor( MAKEINTRESOURCE( IDC_EXT_RESIZE_H1 ) );
ASSERT( m_hCursorResizingH != NULL );
This occurred when I changed my project to link statically and have followed all the directions in doing so: - I added the following code to my .rc2 file: #if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif
- I added the ..\prof-UIS\Include folder to the Additional Include Directories option of the resources project properties - I added __STATPROFUIS_WITH_DLLMFC__ to both the C/C++ preprocessor definitions and the resource preprocessor definitions. I have just done this same process to another project that also uses a gridwnd and it works fine. So the question is: what other things can cause this assertion? I don’t know if this matters, but the project that works fine is an SDI app while the project with the issues is an MDI app.
|
|
|
Technical Support
|
Apr 2, 2009 - 5:19 AM
|
Everything you are doing is correct. Could you send us a test project demonstrating this issue?
|
|
|
Jeremy Ruth
|
Apr 7, 2009 - 8:35 PM
|
Unfortunately, the project that I am having trouble with is too dependent on other projects and code that I can’t send. The folder structure is such that it does not make for very good portability. Is there any other thing that may cause this assertion?
|
|
|
Technical Support
|
Apr 8, 2009 - 6:42 AM
|
We had the same customer report related to Prof-UIS 2.84 and this issue had gone when he switched to the current 2.85 pre-release version. We reorganized the resource identifiers in 2.85 and the problem has gone. Please request the latest source code via email.
|
|
|
Oliver Rau
|
Mar 30, 2009 - 10:08 AM
|
Dear ProfUIS-Team, in our RibbonBar (v.2.82) there is no specific "Application Button" category for commands that are available under the application button. These can only be found under the "All Commands" category. Would it be possible to integrate such a category for application options? Or is there any hidden flag to enable such behaviour? Martin
|
|
|
Technical Support
|
Mar 31, 2009 - 12:21 PM
|
We implemented an additional category for the Application Button / Ribbon File Menu in Prof-UIS 2.85 that will be released soon. We didn’t add it before because the ribbon file menu is often not present in the ribbon bar. Here is the ZIP file with two sample applications compiled with Prof-UIS 2.85:
http://www.prof-uis.com/download/forums/tmp/RibbonSamples285.zip
The RibbonBar sample has an additional category for the ribbon file button. The FormulaGrid sample application uses a ribbon bar without the file button.
|
|
|
Oliver Rau
|
Mar 30, 2009 - 9:55 AM
|
Dear ProfUIS-Team, is it possible to use umlauts in ribbonbar mnemonics - e.g. the "Open File"-Button (OF) should be localized as "Datei öffnen" (DÖ) for German. Best regards, Martin P.S.: We’re still using ProfUIS 2.82
|
|
|
Technical Support
|
Mar 31, 2009 - 10:38 AM
|
Thank you for the interesting question. Here is how to do this: 1) Please insert the following class into your project:
class CMyKeyTip : public CExtCustomizeCmdKeyTip
{
public:
DECLARE_SERIAL( CMyKeyTip );
CMyKeyTip() { }
CMyKeyTip( const CMyKeyTip & other ) : CExtCustomizeCmdKeyTip( other ) { }
CMyKeyTip( __EXT_MFC_SAFE_LPCTSTR str ) : CExtCustomizeCmdKeyTip( str ) { }
CMyKeyTip( __EXT_MFC_SAFE_TCHAR _tchr ) : CExtCustomizeCmdKeyTip( _tchr ) { }
virtual ~CMyKeyTip() { }
virtual CExtSafeString GetTipText( INT nIndent ) const
{
ASSERT_VALID( this );
HKL hKeyboardLayout = ::GetKeyboardLayout( ( ::AfxGetThread() ) -> m_nThreadID );
CExtSafeString strTipText( _T("") );
INT nIndex, nCount = KeyCodeGetCount();
for( nIndex = nIndent; nIndex < nCount; nIndex ++ )
{
DWORD dwKeyCode = KeyCodeGetAt( nIndex );
TCHAR vkTCHAR = (TCHAR)dwKeyCode;
BYTE lpKeyState[256];
::GetKeyboardState( lpKeyState );
UINT wScanCode = ::MapVirtualKey( vkTCHAR, 0 );
#if (defined _UNICODE)
TCHAR szChar[2] = { _T(’\0’), _T(’\0’) };
::ToUnicodeEx( vkTCHAR, wScanCode, lpKeyState, szChar, 1, 1, hKeyboardLayout );
#else
WORD nMapped = 0;
::ToAsciiEx( vkTCHAR, wScanCode, lpKeyState, &nMapped, 1, hKeyboardLayout );
TCHAR szChar[2] = { (TCHAR)nMapped, _T(’\0’) };
#endif
::CharUpper( szChar );
strTipText += szChar;
}
return strTipText;
}
};
IMPLEMENT_SERIAL( CMyKeyTip, CExtCustomizeCmdKeyTip, VERSIONABLE_SCHEMA|1 );
2) Please use the CMyKeyTip class instead of the CExtCustomizeCmdKeyTip class in the initialization code for all the ribbon nodes. You should specify English letters while initializing key tip texts. 3) Remove the application state from the system registry. Now the ribbon bar will display key tips using currently selected keyboard input language. Is that what you need?
|
|
|
Douglas Hoppes
|
Mar 30, 2009 - 9:27 AM
|
Hi,
Hopefully, this is a pretty simple question. Using the CextGridWnd, how can I tell if the row is visible. For example, I have 20 rows in my data set, but am currently showing the first five rows. I would like to, programmatically, tell if row 10 is visible. In this situation, it would return a false. However, the user could have used the scrollbar to scroll to row 10. So, then, the value would be true.
Doug
|
|
|
Technical Support
|
Mar 30, 2009 - 12:29 PM
|
The CExtScrollItemWnd::OnSiwGetVisibleRange() method returns a CRect object containing the row and column indices of the visible rows and columns. This method works independently of the selected scrolling strategies.
|
|
|
Bob Schwammerl
|
Mar 30, 2009 - 5:15 AM
|
Hello, I was looking for a class with fixed size that only contains a dialog child window just like CExtPanelControlBar. Unfortunately this class cannot be docked to resizable windows like CExtControlBar, because it acts like a toolbar. So I wrote a class deriving from CExtControlBar with CBRS_GRIPPER disabled ( to deactivate the window caption/frame ) which overwrites the _CalcDesiredMinHW() and _CalcDesiredMinVH() functions. But somehow, the min. dimensions were always square, so I traced the computation back to CExtControlBar::_CalcDesiredLayout() where I found this:
if( m_sizeDockedH.cy < _CalcDesiredMinHW() )
m_sizeDockedH.cy = _CalcDesiredMinHW();
and similiar code blocks for vertical/floating docking. Assuming that W stands for width, at least the terminology sounds odd ( comparing y to width ). So I changed it to
if( m_sizeDockedH.cx < _CalcDesiredMinHW() )
m_sizeDockedH.cx = _CalcDesiredMinHW(); and the window was as I expected it to be. My sample project was the SDI-sample with a modified dialog child window. Best regards
|
|
|
Technical Support
|
Mar 30, 2009 - 12:28 PM
|
Thank you for reporting this issue. Here is the fix: CSize CExtControlBar::_CalcDesiredLayout(
BOOL bHorz,
BOOL bForceFullRow // = FALSE
)
{
ASSERT_VALID( this );
if( IsFloating() )
return m_sizeFloated;
if( bHorz )
{
if( bForceFullRow )
return CSize( MAXSHORT, m_sizeDockedH.cy );
CSize sizeMin( _CalcDesiredMinHW(), _CalcDesiredMinVH() );
if( m_sizeDockedH.cx < sizeMin.cx )
m_sizeDockedH.cx = sizeMin.cx;
if( m_sizeDockedH.cy < sizeMin.cy )
m_sizeDockedH.cy = sizeMin.cy;
return m_sizeDockedH;
} // if( bHorz )
else
{
if( bForceFullRow )
return CSize( m_sizeDockedH.cx, MAXSHORT );
CSize sizeMin( _CalcDesiredMinHW(), _CalcDesiredMinVH() );
if( m_sizeDockedV.cx < sizeMin.cx )
m_sizeDockedV.cx = sizeMin.cx;
if( m_sizeDockedV.cy < sizeMin.cy )
m_sizeDockedV.cy = sizeMin.cy;
return m_sizeDockedV;
} // else from if( bHorz )
}
|
|
|
L Freddi
|
Mar 29, 2009 - 8:09 PM
|
Hi, suppoters. I have a simple question about showing & hiding dialog. I have a dialog "A" that is CExtResizableDialog on CExtControlBar window "A_wnd" docked. m_clsPlaybackWnd.ShowWindow(bShow);
m_clsPlaybackDlg.ShowWindow(bShow); When the user change page, A and Awnd were hided using ShowWindow(HIDE) function. But the user return origin page, A and Awnd were still hided spite using ShowWindow(SHOW). I want to When the user return page, A and Awnd come up. Do you have another function except for ShowWindow() and any soloutions? Any help is greatly appreciated. freddi
|
|
|
L Freddi
|
Apr 1, 2009 - 5:35 AM
|
Dear Support, You misunderstand my question. I have each dialog inside each one control bar. "A" dialog inside "Awnd"control bar window. "B dialog inside "Bwnd"control bar window. "A" ,"B",..dialog inherited CExtResizableDialog class "Awnd", "Bwnd",.. control bar inherited CExtControlBar class I don’t want to use tabcontainer. I have serveral dialog in main page. When I change the other page, "A","B",.. and "Awnd", "Bwnd", .. on main page were hided using ShowWindow(HIDE) function. But I return main page, "A","B",.. and "Awnd", "Bwnd", .. were still hided inspite using ShowWindow(SHOW). Do you know the solution that "A","B",.. and "Awnd", "Bwnd", .. show up again? Do you have another function except for ShowWindow()? Any help is greatly appreciated. freddi
|
|
|
Technical Support
|
Apr 2, 2009 - 5:16 AM
|
It’s not correct to show/hide a window created as a child of the CExtControlBar window. Your dialogs should always be visible. You should show/hide the CExtControlBar windows using the CFrameWnd::ShowControlBar() method instead.
|
|
|
Technical Support
|
Mar 30, 2009 - 4:06 AM
|
First of all, the CExtControlBar window requires only one window to be created inside it. If you need two or more windows inside one control bar, you should create one container window as a child of the control bar and then create other windows, including your dialog, as children of this container window.
You can use one of our tab page container classes for this purpose. But you will need to hide tab control inside the tab page container. So, you should use the following class:
class CYourContainer : public CExtTabPageContainerWnd
{
public:
CYourContainer() { ShowTabStrip( false ); }
};
The CYourContainer class is a tab page container window which has persistently hidden tab control inside it. You should create the CYourContainer window as a child of the CExtControlBar window. Then you should create visible page windows, including your dialog, as children of the CYourContainer window and register them as pages using the CExtTabPageContainerWnd::PageInsert() method. To activate particular page window you should invoke the CExtTabPageContainerWnd::PageSelectionSet() method. Please do not forget to select required page initially.
|
|
|
L Freddi
|
Apr 1, 2009 - 5:36 AM
|
Dear Support, You misunderstand my question. I have each dialog inside each one control bar. "A" dialog inside "Awnd"control bar window. "B dialog inside "Bwnd"control bar window. "A" ,"B",..dialog inherited CExtResizableDialog class "Awnd", "Bwnd",.. control bar inherited CExtControlBar class I don’t want to use tabcontainer. I have serveral dialog in main page. When I change the other page, "A","B",.. and "Awnd", "Bwnd", .. on main page were hided using ShowWindow(HIDE) function. But I return main page, "A","B",.. and "Awnd", "Bwnd", .. were still hided inspite using ShowWindow(SHOW). Do you know the solution that "A","B",.. and "Awnd", "Bwnd", .. show up again? Do you have another function except for ShowWindow()? Any help is greatly appreciated. freddi
|
|
|
jess lim
|
Mar 24, 2009 - 2:54 AM
|
I am trying to create a MDI tabs application using the Prof-UIS AppWizard. According to the help file, i just have to declare " CExtTabMdiWnd m_wndMdiTabs" in the main frame window class and add the following code to the OnCreate() method:
if( !m_wndMdiTabs.Create(this) ) { TRACE0("Failed to create m_wndMdiTabs\n"); return -1; }
I have declared the m_wndMdiTabs in CMAinFrame and added the code in OnCreate() but it still shows the following errors:
1. syntax error : missing ’;’ before identifier ’m_wndMdiTabs’
2.’CExtTabMdiWnd’ : missing storage-class or type specifiers
3. ’m_wndMdiTabs’ : missing storage-class or type specifiers
4.’m_wndMdiTabs’ : undeclared identifier
5. left of ’.Create’ must have class/struct/union type
What should i do so that i can use the " CExtTabMdiWnd m_wndMdiTabs" to create tabs in the application?
|
|
|
Technical Support
|
Mar 25, 2009 - 11:08 AM
|
We are sorry but the MDI tabs classes are not present in the freeware version.
|
|
|
Technical Support
|
Mar 24, 2009 - 9:42 AM
|
MDI tabs classes present in Prof-UIS Trial and Commercial versions only. Could you tell us which version you are using?
|
|
|
jess lim
|
Mar 25, 2009 - 1:27 AM
|
I am using the Prof-UIS Freeware v.2.84
|