Subject |
Author |
Date |
|
Francesco Toscano
|
Jun 25, 2007 - 7:38 AM
|
I found that it is possible to limit the text enterd in a cell using the function "CExtGridCell::setlimittext(...)". But is it possible to set this limitation to all the cell in column instead of call the function for each cell in a column?
Thnks, Francesco.
|
|
Technical Support
|
Jun 25, 2007 - 1:49 PM
|
You should limit text for each cell in a column. There is no other way.
|
|
Evgeny Mankov
|
Jun 25, 2007 - 5:34 AM
|
Hello,
In example of using CExtPropertyGrid "CompoundProperies", at first, you created CExtPropertyStore by the GetPropertyStore method. All properties of CCanvasObject was modified through the CExtPropertyGrid control. I need to modify internal properties of MyObject by few ways: 1) by the CExtPropertyGrid, 2) by the code in my program (it’s may be handling of some event).
For solving porblem #1, I implemented myself CExtPropertyValue clase on base CExtPropertyValue and overrided constructor and Apply methods as in SimpleProperties example. How to correctly solve the second problem? MyObject class has GetPropertyStore method, which return CExtPrpertyStore object. And now, If the internal properies of MyObjec was changed by the some event, I want to present new properies in CExtPropertyGrid.
How to do it?
Thank you.
|
|
Technical Support
|
Jun 25, 2007 - 1:53 PM
|
You can programmatically update your data objects, put the data into the active grid cells in the property value(s). This means the content of the property tree will correspond to the latest state of your object. But the tree grid controls inside the property grid control contain cloned copies of the active grid cells stored in each CExtPropertyValue object. So finally you should invoke the CExtPropertyGridCtrl::PropertyStoreSynchronize() method to update the content of the property grid.
|
|
Svetlozar Kostadinov
|
Jun 26, 2007 - 10:46 AM
|
And is there some way to optimize the speed of synchronization? Something like synchronization of only the property which is changed. Because if I have an object with 20 properties & compound properties and modify them in realtime, then the speed becomes a problem. I know in release builds the speed will get notable boost, but I’m not sure if it will be sufficient.
|
|
Technical Support
|
Jun 27, 2007 - 10:42 AM
|
It is possible to access to tree items of tree grid windows inside the property grid controls and modify them directly. The following code demonstrates how to do this:
CExtPropertyGridCtrl & _PGC = . . .
CExtPropertyValue * pModifiedPropertyValue = . . .
CExtGridCell * pModifiedCell = pPropertyValue->ValueActiveGet() ;
ASSERT_VALID( pModifiedCell );
CTypedPtrArray < CPtrArray, CExtPropertyGridWnd * > arrGrids;
_PGC.OnPgcQueryGrids( arrGrids );
INT nGridIdx = 0, nGridCount = INT( arrGrids.GetSize() );
for( ; nGridIdx < nGridCount; nGridIdx ++ )
{
CExtPropertyGridWnd * pGrid = arrGrids[ nGridIdx ];
ASSERT_VALID( pGrid );
HTREEITEM hTreeItem = pGrid->PropertyItemToTreeItem( pModifiedPropertyValue );
if( hTreeItem == NULL )
continue;
CExtGridCell * pGridCellToAssign = pGrid->ItemGetCell( hTreeItem, 1 );
if( pGridCellToAssign == NULL )
continue;
ASSERT_VALID( pGridCellToAssign );
pGridCellToAssign ->Assign( pModifiedCell );
if( (pGrid->GetStyle()&WS_VISIBLE) == 0 )
continue;
LONG nRowNo = pGrid->ItemGetVisibleIndexOf( hTreeItem );
if( nRowNo < 0 )
continue;
CRect rc;
if( pGrid->GridCellRectsGet( 1, nRowNo, 0, 0, NULL, &rc ) )
{
CRect rcClient;
pGrid->GetClientRect( &rcClient );
rc.left = rcClient.left;
rc.right = rcClient.right;
pGrid->InvalidateRect( &rc );
}
}
|
|
Offer Har
|
Jun 24, 2007 - 6:21 AM
|
Dear Support,
I see that the CExtPropertyGridCtrl have a 1 pixel wide frame around it. Is there a way to remove it?
Thanks, Ron.
|
|
Offer Har
|
Jun 25, 2007 - 6:18 AM
|
Thanks! As always, to the point and clear.
|
|
Technical Support
|
Jun 25, 2007 - 5:16 AM
|
The following template class removes the non-client border area from any window:
template < class _BC >
class CRemoveNcArea : public _BC
{
protected:
virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
if( message == WM_NCCALCSIZE
|| message == WM_NCPAINT
)
return 0L;
return _BC::WindowProc( message, wParam, lParam );
}
}; But the CExtPropertyGridCtrl control does not implement any non-client area based border. We guess you mean the border around the tree grid inside the property grid control. To remove this border you should use the property grid control which is implemented by the CPropertyGridCtrlForRon class declared below: template < class _BC >
class CRemoveNcAreaFromPropertyTreeGrid : public _BC
{
public:
CRemoveNcAreaFromPropertyTreeGrid (
CExtPropertyGridCtrl * pPropertyGridCtrl = NULL
)
: _BC( pPropertyGridCtrl )
{
}
protected:
virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
if( message == WM_NCCALCSIZE
|| message == WM_NCPAINT
)
return 0L;
return _BC::WindowProc( message, wParam, lParam );
}
};
class CPropertyGridCtrlForRon : public CExtPropertyGridCtrl
{
public:
virtual bool OnPgcCreateGrids();
};
bool CExtPropertyGridCtrl::OnPgcCreateGrids()
{
ASSERT_VALID( this );
try
{
CExtPropertyGridWndCategorized * pGridCategorized =
new CRemoveNcAreaFromPropertyTreeGrid < CExtPropertyGridWndCategorized > ( this );
pGridCategorized->m_bAutoDeleteWindow = true;
if( ! pGridCategorized->Create(
this,
__EXT_MFC_ID_PROPERTY_GRID_CATEGORIZED,
true
)
)
{
ASSERT( FALSE );
throw __EXT_MFC_ID_PROPERTY_GRID_CATEGORIZED;
}
CExtPropertyGridWndSorted * pGridSorted =
new CRemoveNcAreaFromPropertyTreeGrid < CExtPropertyGridWndSorted > ( this );
pGridSorted->m_bAutoDeleteWindow = true;
if( ! pGridSorted->Create(
this,
__EXT_MFC_ID_PROPERTY_GRID_SORTED
)
)
{
ASSERT( FALSE );
throw __EXT_MFC_ID_PROPERTY_GRID_SORTED;
}
}
catch( ... )
{
return false;
}
return true;
} This class implements the OnPgcCreateGrids() virtual method which is similar to the original one but uses the CRemoveNcAreaFromPropertyTreeGrid template class. The CRemoveNcAreaFromPropertyTreeGrid template class is similar to the CRemoveNcArea template class but it has a constructor that is needed for the CExtPropertyGridWndCategorized and CExtPropertyGridWndSorted classes.
|
|
Ian McIntosh
|
Jun 23, 2007 - 3:26 AM
|
Some of my users are experiencing problems where the ribbonbar is drawn incorrectly. It seems that large icons are drawn when there is only space for small icons. I cannot work out how to add a screenshot to this posting, so have e-mailed you with screenshots to support@prof-uis.com
|
|
Technical Support
|
Jun 25, 2007 - 5:14 AM
|
Thank you for reporting the problem. We received your email and will contact you back as soon as possible.
|
|
Chris Anderson
|
Jun 22, 2007 - 1:01 PM
|
I need to hide/remove the default file button that shows up when using the ribbon bar. At the same time I need to show the application icon in the upper left corner of the frame window. This isnt happening when I hide the CExtRibbonButtonFile object returned by Ribbon_FileButtonGet method. Is this a known issue? If not, how can I get the icon to show in the corner of the frame window.
|
|
Chris Anderson
|
Jun 26, 2007 - 10:34 AM
|
But I need the application icon that shows up in the left hand corner in the circular button and that goes when you remove the file button???
|
|
Technical Support
|
Jun 27, 2007 - 12:33 PM
|
So you do not need this round button in the top left corner and you want a round icon to be painted on the same place instead? Please confirm. Please note if you paint an icon instead of this button, that will violate Microsoft Specification for the Ribbon UI.
|
|
Technical Support
|
Jun 23, 2007 - 10:55 AM
|
If you don’t need the file button, you can simply not create it while initializing the ribbon tree.
|
|
Vrinda Savargaonkar
|
Jun 22, 2007 - 8:51 AM
|
Dear Sir,
In my ribbonbar mdi application I do not want the user to resize the window i.e. when user double click of left mouse button on caption Or any part of title bar then the window should not resize or change its position . I tried using this bool CExtNcFrameImpl::::NcFrameImpl_PostWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam ) { switch( message ) { case WM_NCLBUTTONDBLCLK: return ; break: } return false; }
but then title bar not painted according to theam.
Please specify some solution .
Thanks
|
|
Technical Support
|
Jun 22, 2007 - 11:17 AM
|
Please override NcFrameImpl_PreWindowProc() instead of NcFrameImpl_PostWindowProc() .
|
|
Hans Bergmeister
|
Jun 22, 2007 - 2:36 AM
|
Hello,
the following problem/bug can be reproduced with the MDI_DynamicBars sample:
- Build and start the sample. - Make one of the bars floating. - Activate another bar. - Now move the mouse cursor to the right or bottom border of the (now inactive) floating bar, until the cursor becomes a double headed horizontal or vertical cursor. - Now click the left mouse button without moving the mouse cursor.
Bug: even if the mouse position is not changed during clicking of the button, the width and/or height of the floating bar may be decreased by a few pixel.
In this sample this is just a minor visual defect. For our programs this bug is very annoying: some of our bars contain a scroll view with an "ideal size". The scroll sizes of these views are set to the ideal size and the bars are initially created with this ideal size as client area. But as soon as the user clicks to the right or bottom border of such bar (without moving the mouse !), the ideal size of the bar becomes disordered and nasty scroll bars appear (due to the decrease of the bar’s size, which causes a decrease of the scroll view’s size, too).
You can reproduce the annoying effect, too:
- Build and start the sample. - Make one of the bars floating. - Enlarge the height of the floating bar carefully just to the point, where the vertical scroll bar is disabled. - Activate another bar. - Now move the mouse cursor to the right or bottom border of the (now inactive) floating bar, until the cursor becomes a double headed horizontal or vertical cursor. - Now click the left mouse button without moving the mouse cursor.
Bug: even if the mouse cursor is not moved the height of the bar changes and the scroll bar is activated again.
|
|
Khachatur Petrosyan
|
Jun 21, 2007 - 1:23 PM
|
Hello,
I find the way to programmatically enum all ReportGrid columns (ReportColumnGetStartPosition & ReportColumnGetNext) but cannot find the similar functions for enumerating the ReportGrid rows.
Is there any way to do this?
Thanks, Khachatur
|
|
Technical Support
|
Jun 22, 2007 - 11:01 AM
|
The CExtReportGridWnd</code> is based on the CExtTreeGridWnd tree grid control. You should use the CExtTreeGridWnd::Item***() methods to enumerate tree rows. Each tree rows is uniquely identified by its HTREEITEM handle. The CExtTreeGridWnd::ItemGetRoot() method returns a handle to the root item, which is invisible. The CExtTreeGridWnd::ItemGetChildCount() and CExtTreeGridWnd::ItemGetChildAt() methods allow you to walk through all the tree structure. In the case of CExtReportGridWnd , the CExtTreeGridWnd::ItemGetChildCount() method returns zero for data rows and for the root row if the report grid is empty. This method returns a non-zero value for group rows if grouping is applied. The HTREEITEM handles can be converted to CExtReportGridItem* pointers using the CExtReportGridWnd::ReportItemFromTreeItem( )method, but in fact HTREEITEM handles are similar to CExtReportGridItem* pointers.
|
|
Khachatur Petrosyan
|
Jun 25, 2007 - 2:43 PM
|
Thank you, Your answer was helpfuul.
KP
|
|
Dave Calkins
|
Jun 21, 2007 - 11:12 AM
|
We’re using CExtReportGridWnd and are grouping on one of the columns (using ReportSortOrderGet(), CExtReportGridSortOrder::ColumnInsert(), and ReportSortOrderUpdate()).
This works, in that the items are correctly grouped according to the grouping column.
However, the group rows (as seen in the ReportGrid sample) are not shown.
How do we turn on display of the group rows so that there is some separation between the groups?
|
|
Technical Support
|
Jun 22, 2007 - 8:52 AM
|
The CExtReportGridSortOrder class describes both sorting and grouping rules for the CExtReportGridWnd class. The report grid’s sort order in your case contains one column for sorting. The number of columns for grouping should be less than or equal to the number of columns for sorting. You may simply have forgotten to specify the number of columns for grouping after invoking CExtReportGridSortOrder::ColumnInsert() . So just call the CExtReportGridSortOrder::ColumnGroupCountSet() method and specify 1 in its parameter.
|
|
Dave Calkins
|
Jun 22, 2007 - 9:53 AM
|
Thanks for the reply! Calling ColumnGroupCountSet(1) fixed the problem, causing the group rows to be displayed.
|
|
Technical Support
|
Jun 22, 2007 - 10:25 AM
|
By overriding CExtReportGridWnd::OnReportGridPaintGroupRow() you can repaint group rows exactly as you need. Please let us know if you need any help on this.
|
|
Oliver Burkert
|
Jun 21, 2007 - 7:27 AM
|
When I run the RibbonBar sample (ProfUIS 2.70) under Vista, it doesn’t work properly with the Aero transparency effects. In the upper left corner, two rectangles are nontransparent:
http://www.zumbo.ch/upload/ribbonvista.jpg
Is this a known bug?
|
|
Oliver Burkert
|
Jun 28, 2007 - 2:58 AM
|
I tried it on several computers and each one shows the same painting error. And I get the same error with your RibbonBar.zip (Win32). However, all of my Vista computers have a similar configuration. Could it have something to do with the video card or the video driver? My card is an Intel Q965/Q963 Express Chipset Family.
How long will it take for the title bar height bug to fix? Do I have to wait for the next ProfUIS version?
|
|
Technical Support
|
Jun 30, 2007 - 11:17 AM
|
There is no problem to fix this issue. The problem is how to reproduce the same issue on our computer(s). We are not sure if we will see the same when debugging the problem on your computer remotely. Could you test the ribbon sample in the terminal mode between two of your computers? Additionally, do you have the latest driver for video card on your computer installed?
|
|
Oliver Burkert
|
Jul 4, 2007 - 2:27 AM
|
On a remote desktop, I can’t reproduce the bug (but I don’t see any Aero effects anyway). My video driver is the latest version. Here’s some addidional information about the bug:
It happens only with Prof-UIS 2.7, not with 2.6. It happens only in Vista Aero display mode. All the machines I used in my test have the German version of Vista Business installed. It happens only with the Office2007_R3 skins (all three of them) It happens both with the dynamically and the statically linked library. It happens both in debug and release version. It happens both with your sample and my application.
|
|
Technical Support
|
Jul 5, 2007 - 9:24 AM
|
Thank you for the valuable information. We did change the background bitmap of the Quick Access Toolbar in R3 themes. The new bitmap provides pixel-to-pixel matching between Prof-UIS-based applications and Office 2007 applications running on Vista with DWM. But we did not change the painting algorithm. We have no idea in which way the new bitmap can corrupt the DWM surface on your computers, but we simply have no any other guesses at present. The biggest problem is that DWM cannot be debugged well remotely. So we would like to ask you to do the following experiment:
1) Find the CExtPaintManagerOffice2007_Impl::Ribbon_NcOverPaint() virtual method in Prof-UIS and insert the following line before the very first line: return; Compile Prof-UIS and run the RibbonBar sample or your project. We guess no trash areas should appear over the DWM-based window non-client area. 2) Comment out some parts of the CExtPaintManagerOffice2007_Impl::Ribbon_NcOverPaint() virtual method so that you can find out which of them produce the incorrectly painted areas. Thank you.
|
|
Technical Support
|
Jun 22, 2007 - 9:03 AM
|
Actually we have never encountered this problem. We tested the ribbon on Windows Vista x86/x64 editions on several computers and failed to reproduce what the picture you provided. Would you run the sample on some other computers? Additionally please do the following experiment: activate and deactivate the main frame window with the ribbon bar by single clicking on the desktop and then on the main frame caption. We need to know whether the caption is repainted correctly. Please also let us know whether you can see the same effect when the window is maximized?
|
|
Oliver Burkert
|
Jun 26, 2007 - 3:24 AM
|
I get this bug constantly, also when I reactivate the window or when I maximize it. The maximized window has one more bug: The title bar is not high enough and the quick access symbols are cut off at the top:
http://www.zumbo.ch/upload/ribbon.jpg
Could this have something to do with the language resources? I use a German Vista.
|
|
Technical Support
|
Jun 27, 2007 - 12:37 PM
|
We confirm the vertical shift issue of the Quick Access Toolbar when it at the top of the ribbon and window is maximized. But this is not difficult to fix. The incorrect painting is what is interesting and what we cannot reproduce. The worth thing is that we have no similar reports from other users. This is not related to locale settings of your Vista. Did you try to run it on other computers? Do you see the same when running our RibbonBar sample?
Here are the download links for Win32 and x64 platforms:
RibbonBar.zip (Win32)
RibbonBar.zip (x64)
|
|
Colin Brain
|
Jun 21, 2007 - 2:41 AM
|
I’m using ProfUIS 2.70, Visual Studion 6.0 and Windows XP Sp2.
I’m trying to create a dialog-based application, similar to the ProfUIS Controls example, with a menu bar and toolbar. I’ve inserted custom controls for the two bars as per the ’Getting Started’ article. I’ve created a menu and toolbar resource and loaded them as below and called the RepositionBars method at the bottom of InitDialog. When I run (MBCS debug) the two bars aren’t displayed. I’ve included snippets of code below.
Include file:
CExtMenuControlBar m_wndMenuBar ; CExtToolControlBar m_wndToolBar ;
CPP file: OnInitDialog VERIFY( CExtNCW < CExtResizableDialog >::OnInitDialog() );
BOOL CTestBathMatDlg::OnInitDialog() { VERIFY( CExtNCW < CExtResizableDialog >::OnInitDialog() );
ASSERT( m_wndMenuBar.GetSafeHwnd() != NULL ); if( ! m_wndMenuBar.LoadMenuBar( IDR_MENU_FOR_MY_MENUBAR )) { ASSERT( FALSE ); return FALSE; } m_wndMenuBar.SetBarStyle( m_wndMenuBar.GetBarStyle() & ~CBRS_GRIPPER );
ASSERT( m_wndToolBar.GetSafeHwnd() != NULL ); if( ! m_wndToolBar.LoadToolBar(IDR_TOOLBAR_FOR_MY_TOOLBAR)) { ASSERT( FALSE ); return FALSE; } m_wndToolBar.SetBarStyle( m_wndToolBar.GetBarStyle() & ~CBRS_GRIPPER );
. . .
// TODO: Add extra initialization here CWnd::RepositionBars( 0, 0xFFFF, 0 );
return TRUE; // return TRUE unless you set the focus to a control }
I’m sure I’m doing something stupid but can’t see it. Any help please.
|
|
Technical Support
|
Jun 21, 2007 - 4:36 AM
|
Do you have DDX entries added for the menu bar and toolbar?
|
|
Brett Cook
|
Jun 20, 2007 - 6:56 PM
|
Dear Tech Support,
I would like to flash a tab from a CExtControlBar that is inside a CExtDynTabWnd.
For example: the user docks a log window bar onto the side of the main frame window and then auto-hides it. When the log window receives a new message, it would be nice if the tab of the log window could flash, and/or perhaps show the bar.
Thanks, -Brett
|
|
Technical Support
|
Jun 21, 2007 - 4:34 AM
|
The flashing effect is not supported for tab items at present. As a possible solution you could notify users through as a small icon pane in the status bar.
|
|
Brett Cook
|
Jun 21, 2007 - 4:21 PM
|
How about can I simply unhide the docked dialog when a message comes in?
|
|
Technical Support
|
Jun 22, 2007 - 9:07 AM
|
If you want to show/activate a control bar in any state, you should send the WM_COMMAND message to the main frame window and specify the control bar’s dialog control identifier in the WPARAM parameter: CMainFrame * pMainFrame = . . .
CExtControlBar * pBar = . . .
pMainFrame->SendMessage( WM_COMMAND, WPARAM( pBar->GetDlgCtrlID() ) ); If you mean something else, please let us know.
|
|
Chris Anderson
|
Jun 20, 2007 - 2:06 PM
|
Does CExtTabWnd support wrapping to display tab pages spanning muliple rows instead if the scroll buttons?
|
|
Technical Support
|
Jun 21, 2007 - 4:32 AM
|
This feature is already partially implemented. It is unsupported for vertical tabs. Here is the test project. Please note the multi row tabs are obsolete and not recommended by Windows Vista UI Guidelines. You can read more about this here
|
|
Scott Moore
|
Jun 20, 2007 - 10:48 AM
|
I’m looking for a prof ui control or someway to easy create something similiar to the windows explorer breadcrumb control.
Something where you can click on individual crumbs and possibly edit them. The editing is optional and could be done with a hidden text control, but I would really like something that works like the breadcrumb.
is there anything like that in Prof UI 2.7?
|
|
Technical Support
|
Jun 20, 2007 - 12:23 PM
|
Would you send us some screenshots of this control so we can better understand what you need?
|
|
Technical Support
|
Jun 25, 2007 - 9:21 AM
|
Thank you for the screenshots. We added this feature to our TO-DO list and will implement in one of the next versions. If you need this feature right now, this can be regarded only as a custom work.
|
|
Offer Har
|
Jun 20, 2007 - 2:53 AM
|
Dear Support.
When moving in a CExtPropertyGridCtrl to the bottom, below all the rows, into the white space, and right-click, the application crash in OnPgcContextMenuTrack :
void CExtPropertyGridCtrl::OnPgcContextMenuTrack(
CWnd * pWndHit,
CPoint ptScreen,
CExtGridHitTestInfo * pHtInfo, // can be NULL
CExtPropertyItem * pPropertyItem, // can be NULL
CExtPropertyGridWnd * pPGW // can be NULL
)
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
pWndHit;
if( ! pPropertyItem->OnInputEnabledGet( ( pPGW != NULL ) ? pPGW->m_bInputEnabledNestedFlags : false ) )
return;
CExtPopupMenuWnd * pPopup = new CExtPopupMenuWnd;
if( ! pPopup->CreatePopupMenu( m_hWnd ) )
{
ASSERT( FALSE );
delete pPopup;
return;
}
... The variable pPropertyItem is NULL, you say that it can be NULL in the comment, but there is no check for that. Please make verify, and fix. Thanks, Ron.
|
|
Technical Support
|
Jun 20, 2007 - 8:26 AM
|
We fixed this bug is recently. Thank you. The CExtPropertyGridCtrl::OnPgcContextMenuTrack() virtual method is invoked for tracking the popup menu over the active tree grid window inside the property grid control. This method is invoked even if a right mouse click is performed over the empty area - not over some property item. In this case, the pPropertyItem parameter is set to NULL. Please add the following two lines at the beginning of this method to fix this: void CExtPropertyGridCtrl::OnPgcContextMenuTrack(
CWnd * pWndHit,
CPoint ptScreen,
CExtGridHitTestInfo * pHtInfo, // can be NULL
CExtPropertyItem * pPropertyItem, // can be NULL
CExtPropertyGridWnd * pPGW // can be NULL
)
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
pWndHit;
if( pPropertyItem == NULL ) // THIS LINE WAS ADDED
return; // THIS LINE WAS ADDED
. . .
|
|
Rado Manzela
|
Jun 18, 2007 - 1:42 AM
|
How can I make my main frame’s menubar daockable but disable user to hide it (or close it when it is floating)? I need to avoid situation when user closes menu all toolbars - there is no way how to show them again in this case. Thank you!
|
|
Technical Support
|
Jun 18, 2007 - 9:33 AM
|
If you want the end user NOT to be able to hide a toolbar, you need to do two things:
1) Remove the Close button of the toolbar by overriding the OnNcAreaButtonsReinitialize() method like as follows: class CNoCloseMenuControlBar : public CExtMenuControlBar
{
protected:
virtual void OnNcAreaButtonsReinitialize()
{
INT nCountOfNcButtons = NcButtons_GetCount();
if( nCountOfNcButtons > 0 )
return;
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
NcButtons_Add( new CExtBarNcAreaButtonAutoHide(this) );
#endif
NcButtons_Add( new CExtBarNcAreaButtonMenu(this) );
}
}; 2) The user can show and hide toolbars by toggling the corresponding menu items in the Prof-UIS build-in menus. So you should also remove the toolbar’s item from these menus: m_wndMenuBar.m_bAppearInDockSiteControlBarPopupMenu = false; This information is applicable to the menu bar too. Please note if the menu bar is hidden, you can always show it by pressing and releasing the ALT key.
|
|
Ian McIntosh
|
Jun 17, 2007 - 9:06 AM
|
I get an assert following right clicking on some items.
NB, this project uses dlls so the problem could be connected to module state maybe.
It appears to be something to do with _HookMouseProc. Can you tell me what triggers this code & how to stop it / override it?
call stack:
> ProfUIS270md.dll!CExtPopupMenuSite::_HookMouseProc(int nCode=0, unsigned int wParam=512, long lParam=1242968) Line 1038 C++ user32.dll!7e4318e3() [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] user32.dll!7e41f7f6() user32.dll!7e431688() ntdll.dll!7c90eae3() user32.dll!7e431891() user32.dll!7e46cd34() CobraUtils.dll!CDevComboCtrl::OnRButtonDown(unsigned int nFlags=2, CPoint point={...}) Line 274 + 0x22 bytes C++ mfc80d.dll!CWnd::OnWndMsg(unsigned int message=516, unsigned int wParam=2, long lParam=458843, long * pResult=0x0012fa08) Line 2169 C++ mfc80d.dll!CWnd::WindowProc(unsigned int message=516, unsigned int wParam=2, long lParam=458843) Line 1741 + 0x20 bytes C++ ProfUIS270md.dll!CExtComboBoxBase::WindowProc(unsigned int message=516, unsigned int wParam=2, long lParam=458843) Line 1559 C++ ProfUIS270md.dll!CExtComboBox::WindowProc(unsigned int message=516, unsigned int wParam=2, long lParam=458843) Line 2879 C++ mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x037fb470, HWND__ * hWnd=0x00111eaa, unsigned int nMsg=516, unsigned int wParam=2, long lParam=458843) Line 240 + 0x1c bytes C++ mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00111eaa, unsigned int nMsg=516, unsigned int wParam=2, long lParam=458843) Line 389 C++ MercatorIV.cbr!AfxWndProcDllStatic(HWND__ * hWnd=0x00111eaa, unsigned int nMsg=516, unsigned int wParam=2, long lParam=458843) Line 73 + 0x15 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41c63f() user32.dll!7e41f65d() ProfUIS270md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=516, unsigned int & wParam=2, long & lParam=458843) Line 236 + 0x20 bytes C++ ProfUIS270md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00111eaa, unsigned int nMessage=516, unsigned int wParam=2, long lParam=458843) Line 300 + 0x14 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e4189cd() user32.dll!7e4196c7() mfc80d.dll!AfxInternalPumpMessage() Line 183 C++ mfc80d.dll!CWinThread::PumpMessage() Line 896 C++ mfc80d.dll!CWinThread::Run() Line 625 + 0xd bytes C++ mfc80d.dll!CWinApp::Run() Line 894 C++ mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f11, int nCmdShow=1) Line 47 + 0xd bytes C++ GuiMdi.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f11, int nCmdShow=1) Line 33 C++ GuiMdi.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C GuiMdi.exe!WinMainCRTStartup() Line 414 C kernel32.dll!7c816fd7() GuiMdi.exe!AfxWinMain() + 0x1c35b bytes C++ GuiMdi.exe!AfxWinMain() + 0x1c31a bytes C++ ffeb5983()
|
|
Ian McIntosh
|
Jun 18, 2007 - 2:23 AM
|
Thanks , this is very helpful.
You did not touch on the _HookMouseProc. Can you tell me what triggers this code & how to stop it / override it?
You mention "RDE configuration can be unsafe in particular cases when itaˆ™s used from more than one regular DLL loaded into the one running process" - can you give me any more info on this? We do try to keep our footprint as small as possible so loading additional versions of prof-UIS is really not what we want to do.
Besides the InitExtension, are there any other functions in prof UIS that deal with Module State? In particular, do I need to call anything when I do an AFX_MANAGE_STATE?
|
|
Technical Support
|
Jun 18, 2007 - 12:29 PM
|
We believe the problem is in an incorrect state managing and it should be gone by applying the correct RDE version in your regular DLLs. If more than one regular DLL uses Prof-UIS, you should link them with Prof-UIS statically. Otherwise, the state managing will not be performed correctly in any hook based components. This means you would not be able to use only simple non-hook based controls. If you want to save space and avoid multiple Prof-UIS copies, then you should convert your DLLs into MFC extension DLL type.
|
|
Technical Support
|
Jun 17, 2007 - 11:57 AM
|
You said that you are using Prof-UIS as a DLL. Prof-UIS is an MFC extension DLL. Any MFC extension DLL can extend either EXE or DLL MFC based modules. Unfortunately it’s impossible to create one MFC extension DLL that can be used both from EXE and DLL modules. Prof-UIS supports simple (non-RDE) configurations for using in EXE projects and Regular DLL Extension (RDE) configurations for using in MFC based regular DLL projects including OCX projects. First of all, please ensure your regular DLL are using the correct RDE configuration of Prof-UIS. The MFC/Prof-UIS regular DLL project should have the __PROF_UIS_FOR_REGULAR_DLL preprocessor symbol defined in the project settings and should invoke the following code in the InitInstance() virtual method of a CWinApp -derived class: CExt_ProfUIS_ModuleState::InitExtension( AfxGetStaticModuleState() ); This means you will use two Prof-UIS DLLs: one is simple (non-RDE) used by EXE and another one is RDE used in regular DLL. Please also note, RDE configuration can be unsafe in particular cases when it’s used from more than one regular DLL loaded into the one running process. If you want to use Prof-UIS from a regular DLL, then it’s recommended to link your regular DLL with Prof-UIS statically (static LIB also supports RDE configurations). If you plan to use your DLL modules from your Prof-UIS based EXE modules only, we would recommend you convert them into MFC extension DLLs. The MFC extension DLLs take less memory and use the same Prof-UIS and MFC copies which are used by EXE’s code, i.e. there is no RDE configuration required. The only difference is in the following: if you are loading MFC extension DLL dynamically, you should use the AfxLoadLibrary() MFC API instead of LoadLibrary() Win32 API.
|
|
Offer Har
|
Jun 15, 2007 - 7:40 PM
|
Dear Support,
I am using the CExtTabMdiWnd , and I am facing a problem: The names of my views are long, and there’s no problem with this, because it is displayed in the window’s title line, which is big. But when there are several open views, the tab control gets cluttered, because it displayed the names of all views in the same line (the tab line).
I guess that CExtTabMdiWnd takes the name it displays using GetWindowText , but maybe you can add a virtual function that will be called when a child-frame’s name is required, and let me ask this child-frame for a shorter name. something like this:
virtual CString GetFrameTitle(CWnd* pFrame); If this function is not derived, or return and empty string, use the default GetWindowText . What do you think? Thanks, Ron.
|
|
Technical Support
|
Jun 16, 2007 - 9:10 AM
|
First of all, you can override the CExtTabWnd::OnTabWndUpdateItemMeasure() virtual method to make the width of a tab item not greater than some value. Your method should invoke the parent class method and then adjust the sizePreCalc.cx value. The tab window is able to show tooltips for the tab items having too long text painted with "..." ellipsis.
You can also provide tab items with alternative text. You should override the CExtTabWnd::OnTabWndQueryItemText() virtual method for that. In case of MDI tabs, the LPARAM user defined value of each tab item is set to the HWND window handle of corresponding CMDIChildWnd MDI child frame window.
|
|
Offer Har
|
Jun 16, 2007 - 9:36 AM
|
Great! Problem solved, also used the OnTabWndQueryItemTooltipText to display the full caption text. Thanks. Ron.
|
|
Offer Har
|
Jun 15, 2007 - 3:33 PM
|
Dear Support,
Is there a way to skin the scroll-bar of the drop list of an CExtComboBox?
Thanks, Ron.
|
|
Technical Support
|
Jun 16, 2007 - 11:53 AM
|
The CExtComboBox class implements a skinned/improved version of the combo box common control, but it uses the standard popup list box provided by the basic implementation of this control. If we decided to replace this popup list box control, that would mean to implement the combo box from scratch.
|
|
Offer Har
|
Jun 17, 2007 - 6:26 PM
|
I still think that is looks a little strange that the whole applications is skinned, and then suddenly you get this old scroll-bar.
|
|
Technical Support
|
Jun 18, 2007 - 9:36 AM
|
We agree with you. This feature is still in our to-do list. The main problem is that such a scroll bar in a standard control is not a separate window but part of the control’s non-client area. So the HWND -based CExtScrollBar cannot be used here. There is an article at CodeProject that demonstrates an approach to using scroll bar common controls with other common controls instead of built-in scroll bars. You can also download our test project that implements the approach given in the article (with regard to CExtScrollBar windows).
|
|
Offer Har
|
Jun 19, 2007 - 6:12 AM
|
Dear Support,
I see that skinning the list box is possible (from the codeproject project), but i could not find it in the sample project - correct me if I’m wrong.
Thanks, Ron.
|
|
Fabio Ermotti
|
Jun 15, 2007 - 8:30 AM
|
Hi, I have a problem on my application using Menus with the "Highlight rarely used menu items" option enabled. I can reply the problem even in your Drawcli demo application.
The problem is the following: "Highlight rarely used menu items" option enabled "Show full menus after short delay" option disabled On DrawCli application I open "View" on main menu, I leave the mouse on "MDI tabs" until sub menu appear. Then I click on the bottom "View" menu to open the remaining part. The application remains blocked until I switch the focus on others application.
Do you have solution for this ?
Thanks
|
|
Technical Support
|
Jun 15, 2007 - 1:32 PM
|
Thank you for reporting this issue. You can fix it in this way. Please find the following code in the CExtPopupMenuWnd::_OnMouseMove() method: if( nCurIndex == IDX_EXPAND )
{
HWND hWndOwn = m_hWnd;
_ItemFocusCancel( TRUE );
if( ! ::IsWindow( hWndOwn ) )
return true;
if( g_bMenuDelayExpanding )
{
_SetCapture();
if( m_nWaitingExpandTickCount == 0 )
{
SetTimer(
ID_TIMER_DELAY_EXPAND,
ID_TOTAL_DELAY_EXPAND/ID_FREQ_DELAY_EXPAND,
NULL
);
m_nWaitingExpandTickCount = 1;
}
} // if( g_bMenuDelayExpanding )
return true;
} and replace it with: if( nCurIndex == IDX_EXPAND )
{
HWND hWndOwn = m_hWnd;
_ItemFocusCancel( TRUE );
if( ! ::IsWindow( hWndOwn ) )
return true;
_SetCapture();
if( g_bMenuDelayExpanding )
{
if( m_nWaitingExpandTickCount == 0 )
{
SetTimer(
ID_TIMER_DELAY_EXPAND,
ID_TOTAL_DELAY_EXPAND/ID_FREQ_DELAY_EXPAND,
NULL
);
m_nWaitingExpandTickCount = 1;
}
} // if( g_bMenuDelayExpanding )
return true;
}
|