Subject |
Author |
Date |
|
Offer Har
|
Dec 6, 2010 - 12:09 AM
|
Dear Support, I needed some tooltips for my status-bar. By default, the tooltip box was displayed at the location of the cursor, which is not very good - it obscured the text of the pane (I need to display extra information about the text in the pane, like when you stand on the time and see the date at the task-bar of windows) so I found the variable m_nAdvancedTipStyle in CExtStatusControlBar , and changed it to CExtPopupMenuTipWnd::__ETS_BALLOON which is much better, howver, still the tooltip obscure the text of the pane a little - there is a need to raise it bu 2-3 pixels. Also, why doesn’t m_nAdvancedTipStyle have any access function? Does the tip control support HTML? Thanks, Ron.
|
|
Technical Support
|
Dec 9, 2010 - 11:16 AM
|
The balloon tooltip is displayed by the CExtStatusControlBar::OnAdvancedPopupMenuTipWndDisplay() virtual method. But it uses a globally provided popup menu tip window which implements the positioning behavior you want to change. So, you should override the CExtStatusControlBar::OnAdvancedPopupMenuTipWndGet() virtual method which should return pointer to the instance of your CExtPopupMenuTipWnd -derived class. Your class should implement popup menu tip window which positions itself using the current horizontal cursor location. The CExtPopupMenuTipWnd::Show() virtual method should be overriden for that.
|
|
Technical Support
|
Dec 6, 2010 - 9:36 AM
|
The CExtStatusControlBar::OnAdvancedPopupMenuTipWndDisplay() virtual method is invoked to display a screen tip. The rcExcludeArea parameters specifies a rectangular area which should not be intersected with the screen tip window. You can override this virtual method and invoke the parent class’s method with a larger exclude area rectangle in its parameter. The m_nAdvancedTipStyle parameter allows you to customize the style of the popup screen tip window.
|
|
Offer Har
|
Dec 6, 2010 - 10:35 PM
|
Another thing I saw was that when I changed to style to __ETS_BALLOON the tooltip was always at the top-left position of the pane - and I want it at the top with X of the cursor - how can I do it?
|
|
Luis Alberto Pereira
|
Dec 5, 2010 - 4:31 PM
|
|
|
Luis Alberto Pereira
|
Dec 8, 2010 - 3:24 AM
|
i´m using vs2008 project with some modifications need to use vtk/itk. The config of project is Mbcs debug and release. I noticed that the error happens sometimes, depending on available layout My source code is: http://www.4shared.com/file/zDYxbM7z/ImplantPlan.html#@lt;/span> To facilitate the collection if they need to adjust the class that uses the ITK: CImplantPlanDoc thanks
|
|
Technical Support
|
Dec 6, 2010 - 9:36 AM
|
We cannot reproduce this assertion using Prof-UIS 2.91. The right mouse button click should show a context menu with the list of control bars in the tabbed group. Please provide us with more details. Which Visual Studio version are you using? Which Prof-UIS library configuration?
|
|
Luis Alberto Pereira
|
Dec 10, 2010 - 5:39 AM
|
i´m using vs2008 project with some modifications need to use vtk/itk. The config of project is Mbcs debug and release. I noticed that the error happens sometimes, depending on available layout My source code is: http://www.4shared.com/file/zDYxbM7z/ImplantPlan.html#@lt;/span> To facilitate the collection if they need to adjust the class that uses the ITK: CImplantPlanDoc thanks
|
|
Robert Webb
|
Dec 1, 2010 - 11:38 PM
|
I have a combo box on a toolbar, defined by calling cmdItem->StateSetCombo() from LoadToolBar(). However I can’t figure out how to change the default width or max height of the drop-down popup. I want to make the popup wider in order to fit the longest item it contains. Setting cmdItem->m_nDropDownWidth and cmdItem->m_nDropDownHeightMax have no effect. I also tried overriding OnPopupListBoxMeasureTrackSize() in the frame and returning different sizes, but again it makes no difference. I have confirmed that it does indeed enter this function. Should those things be working as I’d hoped? Is there something else that might be overriding their directions? Even better, is there a simple way to ask a combo box’s popup to auto-fit the longest item? Thanks, Rob.
|
|
Technical Support
|
Dec 2, 2010 - 4:54 AM
|
Here is how combo fields are configured in the CMainFrame::OnCreate() method of the StyleEditor sample application:
pCmdItem = g_CmdManager->CmdGetPtr( pApp->m_pszProfileName, ID_SE_STYLE_LIST );
pCmdItem->StateSetCombo();
pCmdItem->StateSetResizable();
pCmdItem->m_nTextFieldWidth = /*pCmdItem->m_nDropDownWidth =*/ 120;
pCmdItem->m_nDropDownWidth = -1; // auto-calc
pCmdItem->m_nDropDownHeightMax = 500;
//pCmdItem->StateSetTextFieldNotEditable();
pCmdItem = g_CmdManager->CmdGetPtr( pApp->m_pszProfileName, ID_SE_FONT_LIST );
pCmdItem->StateSetCombo();
pCmdItem->StateSetResizable();
pCmdItem->m_nTextFieldWidth = /*pCmdItem->m_nDropDownWidth =*/ 150;
pCmdItem->m_nDropDownWidth = -1; // auto-calc
pCmdItem->m_nDropDownHeightMax = 500;
//pCmdItem->StateSetTextFieldNotEditable();
pCmdItem = g_CmdManager->CmdGetPtr( pApp->m_pszProfileName, ID_SE_SIZE );
pCmdItem->StateSetCombo();
pCmdItem->StateSetResizable();
pCmdItem->m_nTextFieldWidth = /*pCmdItem->m_nDropDownWidth =*/ 45;
pCmdItem->m_nDropDownWidth = -2; // same as button width
pCmdItem->m_nDropDownHeightMax = 500;
//pCmdItem->StateSetTextFieldNotEditable();
Please note, the code above is invoked before CExtCustomizeSite initialization. You should also erase application state data in the registry to see the changes in combo fields.
|
|
Offer Har
|
Dec 1, 2010 - 11:28 PM
|
Hi, We have MDI application with an MDI tab control. when we set the title of one of the view to use the <html><big>... the tab displays no string. Can you please provide us a full list where this feature works and where it doesn’t before you start and use it? It will be a problem if we find out that in some places we need it, it doesn’t work after we reworked all of our code. Thanks, Ron.
|
|
Technical Support
|
Dec 3, 2010 - 11:16 AM
|
Yes, HTML is supported for any tabs. Could you insert the title modification code into the DRAWCLI sample project and then send it to us?
|
|
Technical Support
|
Dec 2, 2010 - 4:53 AM
|
The CExtEdit andCExtListCtrl is not compatible with the HTML everywhere feature. The CExtTreeCtrl does not support custom measured tree items, i.e. HTML can be displayed but does not affect item sizes. The window captions can be HTML but we cannot display HTML in tip windows displayed for Windows Task Bar’s buttons and inside windows displayed on Alt+Tab keys. Of course, non-skinned window captions cannot display HTML. The CExtThemedTabCtrl tabs do not support custom measured tab items, i.e. you cannot use a big HTML in resizeable property page captions. HTML is better for use in CExtTabWnd Prof-UIS tab window than in its themed versions like One Note. Everything else looks like compatible with the HTML everywhere feature. Please find the IDR_DRAWCLTYPE string resource in the DRAWCLI sample project. It’s the following string:
\nDrawcl\nDrawcl Document\nDrawcl Files (*.drw)\n.drw\nDrawcl.Document\nDrawcl Document\nDCLI\nDrawcl Files
Then replace its value with: \n<html><big style="color:red;">Drawcl</big></html>\nDrawcl Document\nDrawcl Files (*.drw)\n.drw\nDrawcl.Document\nDrawcl Document\nDCLI\nDrawcl Files
Now you should see a big red text in MDI tabs. The same can be done by changing MDI child frame and/or MFC document titles.
|
|
Offer Har
|
Dec 3, 2010 - 5:58 AM
|
I don’t understand - does it or doesn’t it support CExtTabMdiWnd ? What we see is that no text is displayed on the tab if you add <html><big>NAME</html></big> to the view’s title.
|
|
mediatime Conseil
|
Nov 30, 2010 - 4:52 AM
|
Hi Take a look to this image :docs.google.com/leaf After updating profuis from 2.85 to 2.91 i get strange behaviour on Group boxes, the label of some groupboxes is displayed with (...) at the end of the work (ellipsis)? The property sheet is now skinned, how can disable the skin of this control? Thank you
|
|
mediatime Conseil
|
Dec 6, 2010 - 7:21 AM
|
Hi I think the problem in the CExtGroupBox is due to three spaces added to the end of the label, when i remove them the label is displayed correctly without the (...) at the end. Thank you
|
|
Technical Support
|
Dec 1, 2010 - 7:19 AM
|
The CExtResizablePropertySheet window is themed both in v.2.85 and v.2.91. But 2.91 just subclasses the tab common control with a new CExtThemedTabCtrl class. I.e. v.2.91 supports the tabbed property sheet window better. The themed tabs are never resized. This window uses the layout of Win32 tab common control. It’s just repainted using Prof-UIS paint manager. The layout of controls inside tab page dialogs should be exactly the same. The layout problems demonstrated on your screen shot probably depend on particular virtual method and message handler implementations. Could you send us source code of your CExtResizablePropertySheet -derived and/or CExtResizablePropertyPage -derived classes?
|
|
Dominik Braendlin
|
Nov 30, 2010 - 2:13 AM
|
Dear Tech Support, Some of the 2007 and 2010 Office Products feature in the status bar next to the percent controls little buttons to e.g. in Word to change from Pagelayout to Weblayout and so on. I have seen that one of your competitor bcgsoft calls it “Status bar pane buttons group” and has a pretty simple approach to get it done. I was wondering if you also have an easy way to add such a buttons group to an e.g. mdi ribbon project. Regards Adrian
|
|
Technical Support
|
Dec 1, 2010 - 11:31 AM
|
You should create a CExtToolControlBar toolbar window as a child of a CExtStatusControlBar status. Then attach the toolbar to a status pane using the CExtStatusControlBar::SetPaneControl() method. The status pane will be resized according to the size of the attached toolbar. Of course, you will need a toolbar displaying small buttons without a gripper and a chevron. Please take a look at the AdoRecordsetView sample applications. There are several small toolbars near horizontal scroll bars there. These small toolbars are provided by the CInplaceToolbarWnd class implemented as part of the AdoRecordsetView project.
|
|
Dominik Braendlin
|
Nov 30, 2010 - 1:55 AM
|
Dear Tech Support, I recently discovered that if I maximize an mdi document in a ribbon mdi project I do not get the Minimize, Restore and Close icons next to the blue question mark about dialog icon (e.g. Excel 2007). What am I doing wrong? I have also noticed that it is not possible to create mdi documents with your RibbonBarMDI demo project, so I have no example. I am using Prof-UIS 2.91. Regards Adrian
|
|
Peter Rohleder
|
Dec 23, 2010 - 3:13 AM
|
Hello Adrian I’d the same Problem and found Your question. Here ist the answer . You have to insert the MDI-Buttons to your right buttons collection, usually in _InitRibbon_RightButtonsCollection
You can do this with the following lines:
CExtRibbonNodeMdiRightButtons * pNodeMDI = new CExtRibbonNodeMdiRightButtons;
pRibbonNodeRightButtonsCollection->InsertNode( NULL, pNodeMDI ) Regards Udo
|
|
Dominik Braendlin
|
Dec 23, 2010 - 4:03 AM
|
Hi Udo,
Thanks for your help. Unfortunately these lines of code are already in my source code, so this might not be the case. I have checked the critical files with the support and they seem to be ok, although it still does not work. I wonder if I have created some unintended side effect that prevents these buttons from showing. I guess that I have to do some more looking into it L. Any other suggestion is very much appreciated.
Regards,
Adrian
|
|
Technical Support
|
Dec 2, 2010 - 12:21 PM
|
The view window can be any type of window. The problem can be brought by the main frame and/or MDI child frames. Please check implementations of message handlers and virtual methods in these classes.
|
|
Dominik Braendlin
|
Dec 3, 2010 - 5:01 AM
|
I have checked all the relevant spots in the source code and yours looks quite as mine except that I am using a CView Doc/View child window and you are using a CWnd child window which according to you should not be the problem. This code is present:Any idea where else to check? CExtRibbonNodeMdiRightButtons * pNodeMDI = new CExtRibbonNodeMdiRightButtons; pRibbonNodeRightButtonsCollection->InsertNode(NULL, pNodeMDI);
Adrian
|
|
Technical Support
|
Dec 3, 2010 - 11:15 AM
|
|
|
Technical Support
|
Dec 1, 2010 - 11:30 AM
|
The RibbonBarMDI creates a new MDI child frame window when you press the Ctrl+N keys. The [-][o][x] buttons work there. We need to take a look at the main frame’s and MDI child frame’s source code to understand why MDI child frame windows in your project do not handle system commands.
|
|
Dominik Braendlin
|
Dec 2, 2010 - 3:14 AM
|
I checked the RibbonBarMDI project and my project to see if I am missing something in my project but I could not find anything missing. The only big difference that I have found is that you are creating a ChildView based on a CWnd were as I am creating a ChildView based on the MS Doc/View (CView) concept. Our MDI project is based on the Visual Studio Wizard MDI DocView template. Could this be the case?
|
|
Anna Kraus
|
Nov 29, 2010 - 2:14 PM
|
I have menu buttons and separators in a toolbar of type CExtToolControlBar. When a button is selected via a right click I need to know which button or separator is selected. I can get the button selected by calling CExtToolControlBar::HitTest (point) but if a separator is selected HitTest returns -1. I have more than one separator on the toolbar and I need to know which one was selected. Thank you for your help
|
|
Technical Support
|
Dec 1, 2010 - 4:58 AM
|
Yes, the CExtToolControlBar::_HitTestImpl() internal method can be used for hit testing all the buttons, including separators.
|
|
Anna Kraus
|
Nov 30, 2010 - 11:22 AM
|
I believe I have solved this problem by calling CExtToolControlBar::_HitTestImpl (point). Please comment if this is not the correct method for solving my problem.
|
|
Offer Har
|
Nov 29, 2010 - 8:08 AM
|
Dear Support, We would like to have a control over the size of the fonts in the system, for example the status-bar - how do we do it? Thanks, Ron.
|
|
Technical Support
|
Dec 1, 2010 - 10:03 AM
|
Try to use this as text property of tooltip or status pane:
<html><big>This text should be big</big></html>
|
|
Technical Support
|
Dec 1, 2010 - 7:17 AM
|
The FunnyBars sample demonstrates how to change the UI font on-the-fly. But it changes it globally. Prof-UIS classes often provide virtual methods for changing the font of a particular control: CExtToolControlBar::OnGetToolbarFont() . Sometimes you should use custom draw virtual methods to change parameters like the font size: CExtStatusControlBar::OnPaintPane() . But these approaches are not needed if you are using v.2.90 or later. The custom font task is automatically solved with the HTML everywhere feature. Just use HTML instead of plain text when you need custom text that is bigger, smaller, colored, subscript, superscript, bold, italic, underlined or strike-through.
|
|
Offer Har
|
Dec 1, 2010 - 7:21 AM
|
Thank you for the answer. Is there an example of the HTML anywhere were I can see that working? Will it automatic changes the height of title bar and grid rows if the font is bigger? Ron.
|
|
Technical Support
|
Nov 29, 2010 - 12:37 PM
|
Could yo provide us with more details about the control you need? Or send us a screenshot of any similar control.
|
|
Offer Har
|
Nov 29, 2010 - 1:06 PM
|
We need the status bar, tool-bars tooltips and some other controls to have bigger fonts. How do we do this?
|
|
Offer Har
|
Nov 29, 2010 - 12:43 AM
|
Dear Support, We had code that used CBitmap , and we want to change it to use CExtBitmap . We have this piece of code:
CDC dcImage;
dcImage.SelectObject(&bitmap);
dc.BitBlt(0, 0, 100, 100, &dcImage, 0, 0, SRCCOPY); How do we make it work when bitmap is a CExtBitmap ? Thanks, Ron.
|
|
Rado Manzela
|
Nov 27, 2010 - 3:37 PM
|
I know I cannot paint from worker thread, but is it safe just to iterate over tree nodes and read data from cells? Calling ItemGetRoot() and other functions asserts in debug mode. I need to run some processing in timer which reads tree structure and it can take few seconds, it is not nice to hang whole application in "random" intervals when user is probably scrolling the list or doing anything else with application. Is it necessary to lock tree modification (adding/removing nodes) from UI thread when worker thread is iterating the tree? (ItemGetNext, etc.). Thank you.
|
|
Technical Support
|
Nov 29, 2010 - 4:01 AM
|
Object maps in MFC are not cross-thread. I.e. the ASSERT_VALID( pObject ) should be invoked only in the same thread where the pObject object is instantiated. This means Prof-UIS classes should be used in the main UI thread only. I.e. you should use UI controls only for visualizing data.
|
|
Carsten Pedersen
|
Nov 25, 2010 - 6:25 AM
|
Hi,
We are using the ProfUIS Static MBCS with MFC DLL files ( ymlib, ymd.lib).
We are experiencing the following linker errors when using both ProfUIS and our own code that makes use of libpng, that we compiled as static libs.
The libpng/zilb versions that is supplied with ProfUIS are not the same as the ones we use. When linking, the following errors occur: 1>libpngd.lib(pngerror.obj) : error LNK2005: _png_error already defined in LibPNGDLLCRT-d.lib(pngerror.obj) 1>libpngd.lib(pngerror.obj) : error LNK2005: _png_warning already defined in LibPNGDLLCRT-d.lib(pngerror.obj) 1>libpngd.lib(pngerror.obj) : error LNK2005: _png_chunk_error already defined in LibPNGDLLCRT-d.lib(pngerror.obj) 1>libpngd.lib(pngerror.obj) : error LNK2005: _png_chunk_warning already defined in LibPNGDLLCRT-d.lib(pngerror.obj) 1>libpngd.lib(pngerror.obj) : error LNK2005: _png_set_error_fn already defined in LibPNGDLLCRT-d.lib(pngerror.obj) 1>libpngd.lib(pngerror.obj) : error LNK2005: _png_get_error_ptr already defined in LibPNGDLLCRT-d.lib(pngerror.obj)
Can we let ProfUIS use the system based libpng/zlib or what can we do to avoid this linker error?`
Best regards,
Carsten
|
|
Technical Support
|
Nov 29, 2010 - 4:08 AM
|
We perform periodic updating of the libpng library source code. If you choose some 3 year old release of libpng, the ProfSkin library will work OK. If you need some older release of libpng, we will need to check it before provide you with an answer.
|
|
Carsten Pedersen
|
Nov 29, 2010 - 1:31 AM
|
Thanks for the answer. Since we don’t want to be tied to Prof UIS when using libpng in our other projects, solution 2 is the way to go I think. But can we be sure that our version of libpng/zlib (which are newer versions than yours) won’t cause problems in your ProfSkin code?
|
|
Technical Support
|
Nov 26, 2010 - 7:05 AM
|
There are two solutions:
1) Remove any references to these libraries from your project. I.e. your project will be linked with the libraries provided with Prof-UIS.
2) Remove the #pragma comment lines of code from the ...\Prof-UIS\ProfSkin\StdAfx.cpp file. I.e. Prof-UIS will be linked with your libraries.
|
|
tera tera
|
Nov 24, 2010 - 9:15 PM
|
Hello.
I want to increase size of caption of all CExtControlBar.
Please teach a command.
|
|
Technical Support
|
Nov 26, 2010 - 7:06 AM
|
You can override the CExtControlBar::_GripperHeightAtTopGet() virtual method or simply assign the CExtControlBar::m_nGripHeightAtTop property.
|
|
tera tera
|
Dec 24, 2010 - 9:31 PM
|
Hello. I want to increase size of caption of all CDocBar.
Please teach a command.
|
|
Technical Support
|
Jan 3, 2011 - 11:56 AM
|
There are two ways to change the caption height of a floating mini frame window.
1) Override the CExtPaintManager::Bar_MiniDockFrameGetNcMetrics() virtual method in your paint manager class. This solution is good only if your app uses one UI theme.
2) Override the CExtMiniDockFrameWnd::OnQueryNcMetrics() virtual method in your CExtMiniDockFrameWnd -derived class. To make Prof-UIS and MFC using your CExtMiniDockFrameWnd -derived class for floating windows, you should change the CFrameWnd::m_pFloatingFrameClass before creating any control bars.
|
|
Gevork Odabashyan
|
Nov 24, 2010 - 5:57 AM
|
|
|
Technical Support
|
Nov 27, 2010 - 1:54 PM
|
The WM_SETTINGCHANGE handler code is not related to the discussed problem. The following version of it can proof this: case WM_SETTINGCHANGE:
NcFrameImpl_MapHtRects_Clean();
if( ! NcFrameImpl_IsSupported() )
break;
if( NcFrameImpl_IsDwmBased() )
break;
if( wParam == SPI_SETWORKAREA )
{
POINT ptCursor;
if( ::GetCursorPos( &ptCursor ) )
{ // this condition protects code inside it from screen-saver/logoff mode
WINDOWPLACEMENT _wp;
::memset( &_wp, 0, sizeof(WINDOWPLACEMENT) );
_wp.length = sizeof(WINDOWPLACEMENT);
if( GetWindowPlacement( _wp ) && _wp.showCmd == SW_SHOWMAXIMIZED )
{
CExtPaintManager::monitor_parms_t _mp;
CExtPaintManager::stat_GetMonitorParms( _mp, pWndFrameImpl );
WINDOWPLACEMENT _wpAdjust;
::memcpy( &_wpAdjust, &_wp, sizeof(WINDOWPLACEMENT) );
_wpAdjust.showCmd = SW_SHOWNORMAL; // SW_RESTORE;
// pWndFrameImpl->GetWindowRect( &_wpAdjust.rcNormalPosition );
::CopyRect( &_wpAdjust.rcNormalPosition, &_mp.m_rcWorkArea );
_wpAdjust.ptMaxPosition.x = _wpAdjust.ptMaxPosition.x = _wpAdjust.rcNormalPosition.left;
_wpAdjust.ptMaxPosition.y = _wpAdjust.ptMaxPosition.y = _wpAdjust.rcNormalPosition.top;
SetWindowPlacement( _wpAdjust );
SetWindowPlacement( _wp );
//NcFrameImpl_RecalcNcFrame();
afxDump << "changing window\r\n";
} // this condition protects code inside it from screen-saver/logoff mode
else
afxDump << "window is not marked as maximized\r\n";
}
else
afxDump << "no access to cursor position, desktop is invisible\r\n";
}
You will not see any messages in the VS Output window under debug session. But you will see the changing window message if you re-dock the Windows Task Bar to some other side of the desktop. We improved the skinned non client window area support in Prof-UIS 2.91. You can see this during UI theme switching: the flicker and window jitter effects were removed. The problem you are reporting cannot be reproduced with Prof-UIS 2.91 on our computers. We checked Windows XP Professional with SP3 and latest updates, Windows Vista and Windows 7 with all latest updates.
|
|
Gevork Odabashyan
|
Nov 29, 2010 - 9:10 AM
|
I used you code (it some differet fron v.2.91): bool CMainFrame::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )
{
if (message != WM_SETTINGCHANGE)
{
return CExtNCW::NcFrameImpl_PreWindowProc( lResult, message, wParam, lParam );
}
else
{
if( ! m_bNcFrameImpl_IsEnabled )
return false;
m_bNcFrameImpl_RestoreBorder = false;
CWnd * pWndFrameImpl = NcFrameImpl_GetFrameWindow();
switch( message )
{
case WM_SETTINGCHANGE:
NcFrameImpl_MapHtRects_Clean();
if( ! NcFrameImpl_IsSupported() )
break;
if( NcFrameImpl_IsDwmBased() )
break;
if( wParam == SPI_SETWORKAREA )
{
POINT ptCursor;
if( ::GetCursorPos( &ptCursor ) )
{ // this condition protects code inside it from screen-saver/logoff mode
WINDOWPLACEMENT _wp;
::memset( &_wp, 0, sizeof(WINDOWPLACEMENT) );
_wp.length = sizeof(WINDOWPLACEMENT);
if( CExtNcFrameImpl::GetWindowPlacement( _wp ) && _wp.showCmd == SW_SHOWMAXIMIZED )
{
CExtPaintManager::monitor_parms_t _mp;
CExtPaintManager::stat_GetMonitorParms( _mp, pWndFrameImpl );
WINDOWPLACEMENT _wpAdjust;
::memcpy( &_wpAdjust, &_wp, sizeof(WINDOWPLACEMENT) );
_wpAdjust.showCmd = SW_SHOWNORMAL; // SW_RESTORE;
// pWndFrameImpl->GetWindowRect( &_wpAdjust.rcNormalPosition );
::CopyRect( &_wpAdjust.rcNormalPosition, &_mp.m_rcWorkArea );
_wpAdjust.ptMaxPosition.x = _wpAdjust.ptMaxPosition.x = _wpAdjust.rcNormalPosition.left;
_wpAdjust.ptMaxPosition.y = _wpAdjust.ptMaxPosition.y = _wpAdjust.rcNormalPosition.top;
CExtNcFrameImpl::SetWindowPlacement( _wpAdjust );
CExtNcFrameImpl::SetWindowPlacement( _wp );
//NcFrameImpl_RecalcNcFrame();
afxDump << "changing window\r\n";
} // this condition protects code inside it from screen-saver/logoff mode
else
afxDump << "window is not marked as maximized\r\n";
}
else
afxDump << "no access to cursor position, desktop is invisible\r\n";
}
break;
} // switch( message )
}
return false;
} and get the dump message in the VS Output window under debug session : changing window. So The WM_SETTINGCHANGE handler code is related to the discussed problem.
|
|
Technical Support
|
Dec 1, 2010 - 11:38 PM
|
Do you have any specific software based on system wide hooks which may affect this notification? Did you check this issue on more than one computer? We cannot reproduce it.
|
|
Gevork Odabashyan
|
Dec 2, 2010 - 5:02 AM
|
No, we use standart Windows XP SP3.
This bug is reproduced on a all computers with 2 monitors.
To reproduce this bug we use the next sequence:
1. Be sure that Windows task bar is in horizontal bottom position of the default monitor (the 1st monitor).
2. Start your sample "FormulaGrid" and maximized it main frame on the default monitor (the 1st monitor).
Now Windows task bar and maximized "FormulaGrid" main frame is on the same default monitor (the 1st monitor).
3. Move the Windows task bar to the horizontal position (to the left or right side of the monitor).
You will see that the "FormulaGrid" frame will be change it size.
We find that the bug reproduced for ’CExtPaintManagerOffice2007_R1’ and ’CExtPaintManagerOffice2007_Black’ themes.
The same effect appears when you get the new e-mail message and new icon added to tray. This case is most critical (but it reproduced not so stable as discribed one).
|
|
Gevork Odabashyan
|
Dec 3, 2010 - 6:43 AM
|
Excuse me, the third step is incorrect: Instead: 3. Move the Windows task bar to the horizontal position (to the left or right side of the monitor). Must be: 3. Move the Windows task bar to the vertical position (to the left or right side of the monitor).
|
|
Eric
|
Nov 16, 2010 - 12:10 PM
|
Hello,
The idea is to ’lock’ some columns on the left of the grid, so they are always visible when you are scrolling horizontally.
These columns should have exactly the same behavior than the normal ones but should always be visible.
So, I need to keep the sorting, grouping and the text filter on these columns and possibly having the same look.
Is there an easy way to implement this feature, maybe by using the ’OuterColumnCountLeftSet()’ function?
Thanks in advance.
|
|
Technical Support
|
Nov 18, 2010 - 5:27 AM
|
We agree the current version of the frozen columns is mostly designed for the CExtGridWnd plain grid control. It requires some adjustments when applied to the CExtTreeGridWnd / CExtReportGridWnd controls. The CExtGridBaseWnd::OnGbwAnalyzeCellMouseClickEvent() virtual method should be implemented to create custom expand buttons of group rows. The column header drag-n-dropping feature looks like incompatible by design with the frozen columns feature. Or, at least, drag-n-dropping should not be enabled for frozen columns and normal columns should not be dropped between frozen. We need more details about your task. Why do you need both frozen columns and report grid?
|
|
Technical Support
|
Nov 17, 2010 - 2:54 AM
|
|
|
Eric
|
Nov 17, 2010 - 2:55 PM
|
Hello,
I tried this feature today and it is really great but I have nevertheless some issues mainly while grouping.
As I explained in my first post, I want to use this feature in ReportGrid.
I don’t like the fact that the text in group rows doesn’t start from the beginning but just after the last frozen column. Is it possible to have the same behavior than when we have no frozen columns? That is to say, text of group rows starting at the beginning of grid and adding indentation for each new grouping? If that is possible, I think that the expand button would be available again, right?
If not, I know that I can manage the place where is displayed the text in group rows by overriding the ’OnReportGridPaintGroupRow’ method and the place where is displayed the expand button by overriding the ’OnTreeGridPaintExpandButton’ method. But If I do that, the expand button doesn’t work any more. Clicking on it, nothing happens. I think it is because you are detecting where the click occurs and you do the association thanks to the indentation you insert with each new grouping. Is there a way to override or change that behavior? Can I paint the expand button where I want on the row but having nevertheless a button that works?
Finally, I have maybe found a bug. If you do a Drag&Drop of a frozen column and if the new frozen column has a smaller size, a blank column appears. This one disappears as soon as a redraw occurs so with a resize for example.
Thanks.
PS : I use Prof-UIS 2.87. Since which version this feature is available in ReportGrid?
|
|
Alastair Watts
|
Nov 16, 2010 - 9:06 AM
|
How do I remove the dotted lines & expand button from a tree grid?
|
|
Technical Support
|
Nov 17, 2010 - 2:42 AM
|
The CExtTreeGridWnd::OnTreeGridQueryColumnOutline() method defines which column(s) should display a tree outline. The CExtTreeGridWnd::OnTreeGridQueryDrawOutline() virtual method defines whether the outline lines should be painted. The CExtTreeGridWnd::OnTreeGridPaintExpandButton() virtual method paints a tree box. You can override any of these methods and:
1) Hide the tree outline and boxes at all, display it in any column or even in several columns. 2) Hide tree lines anywhere. 3) Hide tree boxes anywhere.
|
|
Offer Har
|
Nov 13, 2010 - 9:45 PM
|
Hi, 1. Download the ProfUIS_Controls sample from your site 2. Go to the grid page 3. Go to the SystemNumber column 4. Try to convert the numbers to negative by adding - before the number The application crashes. Ron.
|
|
Technical Support
|
Nov 15, 2010 - 7:37 AM
|
Thank you for reporting this issue. Please update the source code for the following method: void CExtGridCellSystemNumberCurrencyBase::TextGet( CExtSafeString & strCopy ) const
{
__EXT_DEBUG_GRID_ASSERT_VALID( this );
strCopy.Empty();
LCID _LCID = LANG_USER_DEFAULT;
if( g_ResourceManager->IsCustomLangAllowed() )
_LCID = g_ResourceManager->GetLangIdDesired();
e_internal_mode_t eim = _QueryInternalMode();
HRESULT hr = E_FAIL;
BSTR _bstr = NULL;
switch( eim )
{
case eim_number:
{
long double lfValue = LongDoubleGet();
hr = ::VarBstrFromR8( (DOUBLE)lfValue, _LCID, 0, &_bstr );
if( FAILED( hr ) )
break;
__EXT_DEBUG_GRID_ASSERT( _bstr != NULL );
CExtSafeString _strNegativeSign, _strDecimalPoint, _strGroupSeparator;
INT m_nNegativeFormatIndex;
CList < INT, INT > m_listDigitGrouping;
// negative sign
if( g_ResourceManager->GetLocaleInfo( LOCALE_SNEGATIVESIGN, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_SNEGATIVESIGN, _strNegativeSign.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
_strNegativeSign.ReleaseBuffer();
}
// decimal point
if( g_ResourceManager->GetLocaleInfo( LOCALE_SDECIMAL, NULL, 0 ) )
g_ResourceManager->GetLocaleInfo( LOCALE_SDECIMAL, _strDecimalPoint.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
_strDecimalPoint.ReleaseBuffer();
// group separator
if( g_ResourceManager->GetLocaleInfo( LOCALE_STHOUSAND, NULL, 0 ) )
g_ResourceManager->GetLocaleInfo( LOCALE_STHOUSAND, _strGroupSeparator.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
_strGroupSeparator.ReleaseBuffer();
TCHAR cNegNumFormatIndex = _T(’0’);
if( g_ResourceManager->GetLocaleInfo( LOCALE_INEGNUMBER, NULL, 0 ) )
g_ResourceManager->GetLocaleInfo( LOCALE_INEGNUMBER, &cNegNumFormatIndex, sizeof( cNegNumFormatIndex ) );
m_nNegativeFormatIndex = _ttoi( & cNegNumFormatIndex );
CExtSafeString strDigitGrouping = _T("0");
if( g_ResourceManager->GetLocaleInfo( LOCALE_SGROUPING, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_SGROUPING, strDigitGrouping.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
strDigitGrouping.ReleaseBuffer();
INT nStrLen = INT( strDigitGrouping.GetLength() );
CExtSafeString _strGroup = _T("");
INT nGroup = 0;
if( m_listDigitGrouping.GetCount() > 0 )
m_listDigitGrouping.RemoveAll();
for( INT i = 0; i < nStrLen; i++ )
{
TCHAR ch = strDigitGrouping[i];
if( ch == _T(’;’) )
{
nGroup = _ttoi( _strGroup );
m_listDigitGrouping.AddTail( nGroup );
_strGroup = _T("");
nGroup = 0;
}
else
_strGroup = _strGroup + ch;
}
nGroup = _ttoi( _strGroup );
m_listDigitGrouping.AddTail( nGroup );
}
// ensure the separators are not the same
if( _strDecimalPoint == _strGroupSeparator
&& ( _strDecimalPoint == _T(".")
|| _strDecimalPoint == _T(",")
)
)
_strGroupSeparator = ( _strDecimalPoint == _T(",") ? _T(".") : _T(",") );
if( _strDecimalPoint == _strGroupSeparator
&& ( _strDecimalPoint != _T(".")
&& _strDecimalPoint != _T(",")
)
)
_strDecimalPoint == _T(".");
USES_CONVERSION;
strCopy = OLE2CT( _bstr );
CExtSafeString strTextChange;
INT nDecimalSeparatorLen = INT( _strDecimalPoint.GetLength() );
bool bInsertNegativeSign = ( lfValue < 0 );
if( bInsertNegativeSign )
{
INT nNegSignPos = strCopy.Find( _T(’-’) );
strCopy.Delete( nNegSignPos );
}
if( _strDecimalPoint != _T(’.’) )
{
INT nPosDot = strCopy.Find( _T(’.’) );
if( nPosDot >= 0 )
{
strCopy.Delete( nPosDot );
strCopy.Insert( nPosDot, _strDecimalPoint );
}
}
INT nPositionDecimalPoint = INT( strCopy.Find( _strDecimalPoint ) );
INT nTextLen = INT( strCopy.GetLength() );
INT nWholeNumber = ( ( nPositionDecimalPoint >= 0 ) ? ( ( nPositionDecimalPoint < m_nMaxWholeDigits ) ? nPositionDecimalPoint : m_nMaxWholeDigits ) : ( ( m_nMaxWholeDigits >= nTextLen ) ? nTextLen : m_nMaxWholeDigits ) );
INT nDecimalPointLen = nDecimalSeparatorLen; // 1
INT nCorectTextLen = nWholeNumber + nDecimalPointLen + m_nMaxFractionDigits;
nCorectTextLen = ( nCorectTextLen > nTextLen ) ? nTextLen : nCorectTextLen;
INT nCountDigitGroups = INT( m_listDigitGrouping.GetCount() );
CList < INT, INT > _listPos;
bool bLastZiro = ( m_listDigitGrouping.GetAt( m_listDigitGrouping.FindIndex( nCountDigitGroups - 1 ) ) == 0 ) ? true : false;
__EXT_DEBUG_GRID_ASSERT( nWholeNumber <= m_nMaxWholeDigits );
INT nPos = nWholeNumber;
INT i = 0;
INT nPreviousCount = -1;
for( ; true; )
{
INT nCount = INT( m_listDigitGrouping.GetAt( m_listDigitGrouping.FindIndex(i) ) );
if( nCount == 0 && i < ( nCountDigitGroups - 1 ) )
break;
if( nCount == 0 && i == ( nCountDigitGroups - 1 ) )
{
__EXT_DEBUG_GRID_ASSERT( nPreviousCount != -1 );
nCount = nPreviousCount;
}
nPos -= nCount;
if( nPos > 0 )
_listPos.AddHead( nPos - 1 );
else
break;
if( i == ( nCountDigitGroups - 1 ) && ! bLastZiro )
break;
if( i < ( nCountDigitGroups - 1 ) )
i ++;
nPreviousCount = nCount;
}
INT nCurDigitPos = 0;
INT nPosCount = INT( _listPos.GetCount() );
bool bCanPastGroupSep = ( nPosCount > 0 );
for( i = 0; i < nCorectTextLen; i++ )
{
TCHAR _tchr = strCopy[i];
strTextChange += _tchr;
bool bInsertSign = false;
INT nPosCur = 0;
if( bCanPastGroupSep )
nPosCur = _listPos.GetAt( _listPos.FindIndex( nCurDigitPos ) );
if( ( i <= nWholeNumber )
&& ( i != ( nCorectTextLen - 1 ) )
&& ( i == nPosCur )
&& bCanPastGroupSep
)
{
strTextChange += _strGroupSeparator;
bInsertSign = true;
if( nCurDigitPos < ( nPosCount - 1 ) )
nCurDigitPos ++;
else
bCanPastGroupSep = false;
}
if( i == ( nWholeNumber - 1 ) && ( nPositionDecimalPoint == -1 ) && ( i != nCorectTextLen - 1 ) )
strTextChange += _strDecimalPoint;
}
if( bInsertNegativeSign && AllowNegativeGet() )
{
CExtSafeString _strBeforNegSign = ( (m_nNegativeFormatIndex == 4) ? _T(" "): _T("") );
CExtSafeString _strAfterNegSign = ( (m_nNegativeFormatIndex == 2) ? _T(" "): _T("") );
CExtSafeString _strFirstPart = _strBeforNegSign + _strNegativeSign;
CExtSafeString _strNegativeSign = _strFirstPart + _strAfterNegSign;
if( m_nNegativeFormatIndex == 0 )
{
strTextChange.Insert( strTextChange.GetLength(), _T(")") );
strTextChange.Insert( 0, _T("(") );
}
if( m_nNegativeFormatIndex == 1 || m_nNegativeFormatIndex == 2 )
strTextChange.Insert( 0, _strNegativeSign );
if( m_nNegativeFormatIndex == 3 || m_nNegativeFormatIndex == 4 )
strTextChange.Insert( strTextChange.GetLength(), _strNegativeSign );
}
strCopy = strTextChange;
}
break;
case eim_currency:
{
long double lfValue = LongDoubleGet();
hr = ::VarBstrFromR8( (DOUBLE)lfValue, _LCID, 0, &_bstr );
if( FAILED( hr ) )
break;
__EXT_DEBUG_GRID_ASSERT( _bstr != NULL );
CExtSafeString _strNegativeSign, _strDecimalPoint, _strGroupSeparator, _strCurrencySymbol;
INT m_nNegativeFormatIndex, m_nPositiveFormatIndex;
CList < INT, INT > m_listDigitGrouping;
// negative sign
if( g_ResourceManager->GetLocaleInfo( LOCALE_SNEGATIVESIGN, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_SNEGATIVESIGN, _strNegativeSign.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
_strNegativeSign.ReleaseBuffer();
}
if( g_ResourceManager->GetLocaleInfo( LOCALE_SCURRENCY, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_SCURRENCY, _strCurrencySymbol.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
_strCurrencySymbol.ReleaseBuffer();
}
// decimal point
if( g_ResourceManager->GetLocaleInfo( LOCALE_SMONDECIMALSEP, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_SMONDECIMALSEP, _strDecimalPoint.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
_strDecimalPoint.ReleaseBuffer();
}
// Get group separator
if( g_ResourceManager->GetLocaleInfo( LOCALE_SMONTHOUSANDSEP, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_SMONTHOUSANDSEP, _strGroupSeparator.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
_strGroupSeparator.ReleaseBuffer();
}
TCHAR cPosCurFormatIndex = _T(’0’);
if( g_ResourceManager->GetLocaleInfo( LOCALE_ICURRENCY, NULL, 0 ) )
g_ResourceManager->GetLocaleInfo( LOCALE_ICURRENCY, &cPosCurFormatIndex, sizeof( cPosCurFormatIndex ) );
m_nPositiveFormatIndex = _ttoi( & cPosCurFormatIndex );
CExtSafeString strNegCurFormatIndex = _T("0");
if( g_ResourceManager->GetLocaleInfo( LOCALE_INEGCURR, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_INEGCURR, strNegCurFormatIndex.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
strNegCurFormatIndex.ReleaseBuffer();
}
CExtSafeString strDigitGrouping = _T("0");
if( g_ResourceManager->GetLocaleInfo( LOCALE_SMONGROUPING, NULL, 0 ) )
{
g_ResourceManager->GetLocaleInfo( LOCALE_SMONGROUPING, strDigitGrouping.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH );
strDigitGrouping.ReleaseBuffer();
INT nStrLen = INT( strDigitGrouping.GetLength() );
CExtSafeString _strGroup = _T("");
INT nGroup = 0;
if( m_listDigitGrouping.GetCount() > 0 )
m_listDigitGrouping.RemoveAll();
for( INT i = 0; i < nStrLen; i++ )
{
TCHAR ch = strDigitGrouping[i];
if( ch == _T(’;’) )
{
nGroup = _ttoi( _strGroup );
m_listDigitGrouping.AddTail( nGroup );
_strGroup = _T("");
nGroup = 0;
}
else
_strGroup = _strGroup + ch;
}
nGroup = _ttoi( _strGroup );
m_listDigitGrouping.AddTail( nGroup );
}
m_nNegativeFormatIndex = _ttoi( strNegCurFormatIndex );
if( _strDecimalPoint == _strGroupSeparator
&& ( _strDecimalPoint == _T(".")
|| _strDecimalPoint == _T(",")
)
)
_strGroupSeparator = ( _strDecimalPoint == _T(",") ? _T(".") : _T(",") );
if( _strDecimalPoint == _strGroupSeparator
&& ( _strDecimalPoint != _T(".")
&& _strDecimalPoint != _T(",")
)
)
_strDecimalPoint == _T(".");
USES_CONVERSION;
strCopy = OLE2CT( _bstr );
CExtSafeString strTextChange;
bool bInsertNegativeSign = ( lfValue < 0 );
if( bInsertNegativeSign )
{
INT nNegSignPos = strCopy.Find( _T(’-’) );
strCopy.Delete( nNegSignPos );
}
if( _strDecimalPoint != _T(’.’) )
{
INT nPosDot = strCopy.Find( _T(’.’) );
if( nPosDot >= 0 )
{
strCopy.Delete( nPosDot );
strCopy.Insert( nPosDot, _strDecimalPoint );
}
}
INT nTextLen = INT( strCopy.GetLength() );
INT nDecimalSeparatorLen = INT( _strDecimalPoint.GetLength() );
INT nPositionDecimalPoint = INT( strCopy.Find( _strDecimalPoint ) );
INT nWholeNumber = ( ( nPositionDecimalPoint >= 0 ) ? ( ( nPositionDecimalPoint < m_nMaxWholeDigits ) ? nPositionDecimalPoint : m_nMaxWholeDigits ) : ( ( m_nMaxWholeDigits >= nTextLen ) ? nTextLen : m_nMaxWholeDigits ) );
INT nDecimalPointLen = nDecimalSeparatorLen; // 1
INT nCorectTextLen = nWholeNumber + nDecimalPointLen + m_nMaxFractionDigits;
nCorectTextLen = ( nCorectTextLen > nTextLen ) ? nTextLen : nCorectTextLen;
INT nCountDigitGroups = INT( m_listDigitGrouping.GetCount() );
CList < INT, INT > _listPos;
bool bLastZiro = ( m_listDigitGrouping.GetAt( m_listDigitGrouping.FindIndex( nCountDigitGroups - 1 ) ) == 0 ) ? true : false;
__EXT_DEBUG_GRID_ASSERT( nWholeNumber <= m_nMaxWholeDigits );
INT nPos = nWholeNumber;
INT i = 0;
INT nPreviousCount = -1;
for( ; true; )
{
INT nCount = m_listDigitGrouping.GetAt(m_listDigitGrouping.FindIndex(i));
if( nCount == 0 && i < ( nCountDigitGroups - 1 ) )
break;
if( nCount == 0 && i == ( nCountDigitGroups - 1 ) )
{
__EXT_DEBUG_GRID_ASSERT( nPreviousCount != -1 );
nCount = nPreviousCount;
}
nPos -= nCount;
if( nPos > 0 )
_listPos.AddHead( nPos - 1 );
else
break;
if( i == ( nCountDigitGroups - 1 ) && ! bLastZiro )
break;
if( i < ( nCountDigitGroups - 1 ) )
i ++;
nPreviousCount = nCount;
}
INT nCurDigitPos = 0;
INT nPosCount = INT( _listPos.GetCount() );
bool bCanPastGroupSep = ( nPosCount > 0 );
for( i = 0; i < nCorectTextLen; i++ )
{
TCHAR _tchr = strCopy[i];
strTextChange += _tchr;
bool bInsertSign = false;
INT nPosCur = 0;
if( bCanPastGroupSep )
nPosCur = _listPos.GetAt( _listPos.FindIndex( nCurDigitPos ) );
if( ( i <= nWholeNumber )
&& ( i != ( nCorectTextLen - 1 ) )
&& ( i == nPosCur )
&& bCanPastGroupSep
)
{
strTextChange += _strGroupSeparator;
bInsertSign = true;
if( nCurDigitPos < ( nPosCount - 1 ) )
nCurDigitPos ++;
else
bCanPastGroupSep = false;
}
if( i == ( nWholeNumber - 1 ) && ( nPositionDecimalPoint == -1 ) && ( i != nCorectTextLen - 1 ) )
strTextChange += _strDecimalPoint;
}
CExtSafeString _strSignBefore = _T("");
CExtSafeString _strSignAfter = _T("");
{
__EXT_DEBUG_GRID_ASSERT_VALID( this );
CExtSafeString strBefore = _T("");
CExtSafeString strAfter = _T("");
if( bInsertNegativeSign )
{
switch( m_nNegativeFormatIndex )
{
case 0:
strBefore = _T("(") + _strCurrencySymbol;
strAfter = _T(")");
break;
case 1:
strBefore = _strNegativeSign + _strCurrencySymbol;
break;
case 2:
strBefore = _strCurrencySymbol + _strNegativeSign;
break;
case 3:
strBefore = _strCurrencySymbol;
strAfter = _strNegativeSign;
break;
case 4:
strBefore = _T("(");
strAfter = _strCurrencySymbol + _T(")");
break;
case 5:
strBefore = _strNegativeSign;
strAfter = _strCurrencySymbol;
break;
case 6:
strAfter = _strNegativeSign + _strCurrencySymbol;
break;
case 7:
strAfter = _strCurrencySymbol + _strNegativeSign;
break;
case 8:
strBefore = _strNegativeSign;
strAfter = _T(" ") + _strCurrencySymbol;
break;
case 9:
strBefore = _strNegativeSign + _strCurrencySymbol + _T(" ");
break;
case 10:
strAfter = _T(" ") + _strCurrencySymbol + _strNegativeSign;
break;
case 11:
strBefore = _strCurrencySymbol + _T(" ");
strAfter = _strNegativeSign;
break;
case 12:
strBefore = _strCurrencySymbol + _T(" ") + _strNegativeSign;
break;
case 13:
strAfter = _strNegativeSign + _T(" ") + _strCurrencySymbol;
break;
case 14:
strBefore = _T("(") + _strCurrencySymbol + _T(" ");
strAfter = _T(")");
break;
case 15:
strBefore = _T("(");
strAfter = _T(" ") + _strCurrencySymbol + _T(")");
break;
}
}
else
{
switch( m_nPositiveFormatIndex )
{
case 0:
strBefore = _strCurrencySymbol;
break;
case 1:
strAfter = _strCurrencySymbol;
break;
case 2:
strBefore = _strCurrencySymbol + _T(" ");
break;
case 3:
strAfter = _T(" ") + _strCurrencySymbol;
break;
}
}
_strSignBefore = strBefore;
_strSignAfter = strAfter;
}
if( _strSignAfter.GetLength() > 0 )
strTextChange.Insert( strTextChange.GetLength(), _strSignAfter );
if( _strSignBefore.GetLength() > 0 )
strTextChange.Insert( 0, _strSignBefore );
strCopy = strTextChange;
}
break;
} // switch( eim )
if( _bstr != NULL )
::SysFreeString( _bstr );
}
|
|
Charles Bisbee
|
Nov 10, 2010 - 2:56 PM
|
I need to be able to do the following Enable Disable (make gray) a menu item
Set a check by a menu item
Change the text of a menu item. So far I have discovered that CExtMenuControlBar ( m_wndMenuBar) derives from CExtToolControlBar which has several functions of interest these are
CommandToIndex(ID)
GetButtonStyle
SetButtonStyle
One would think that these would do it so I have the code
int nIndex=m_wndMenuBar.CommandToIndex(ID);
if(nIndex!=-1)
{
UINT nStyle= m_wndMenuBar.GetButtonStyle( nIndex );
if(bEnable)
{
//nStyle |=
}
else
{
//nStyle &= ~
}
m_wndMenuBar.SetButtonStyle(nIndex,nStyle);
} When DoDataExchange is run apparently the m_wndMenuBar is not initialized stepping into the code shows 0 buttons So I can’t set them up there
Later it does not work as there are three buttons. These are the toplevel button (File …) So I need a way to drill down into the next level for this to have a hope of working
Finally the help file for ProfUIS does not list the styles. It only says they are defined by the “TBSS_XXXX” standard. Searching on the ProfUIS dir for these finds a very few entries of absolutely no use for enable disable check uncheck. Please help me with ways to meet this requirement. It was EASY before ProfUIS Maybe it can be done the same way I did it before using CExtMenuControlBar::GetMenu and then standard menu functions. So I tried old way again with modifications. It looks like CMenu *pMenu=m_wndMenuBar.GetMenu();
ASSERT(pMenu);
if(pMenu)
{
CMenu *pSubMenu=pMenu->GetSubMenu(nSubMenu);
ASSERT(pSubMenu);
if(pSubMenu)
{
pSubMenu->EnableMenuItem(ID,bEnable);
m_wndMenuBar.UpdateMenuBar();
}
} This results in the top level menu items disappearing.
|
|
Technical Support
|
Nov 11, 2010 - 12:12 PM
|
We would like to create a sample app for you. Please let us know which kind of window is parent of CExtMenuControlBar in your application? I.e. we need to know whether our test project should be dialog based, SDI or MDI?
|
|
Alastair Watts
|
Nov 10, 2010 - 9:57 AM
|
CExtGridCellHeaderFilter can call CExtGridWnd::OnGbwFocusChanged() a lot when either a Text or Value filter is used & a row is focused in the grid. Can the focused row be cleared when applying filters?
|
|
Alastair Watts
|
Nov 11, 2010 - 3:12 PM
|
When do you suggest I call FocusUnset() Are you sure OnGbwFocusChanged() should be called for each row hidden when (Show All) is cleared?
|
|
Technical Support
|
Nov 13, 2010 - 8:19 AM
|
The focus changing notifications are received during sorting and filtering because the grid control tries to keep the same cells selected and focused after re-sorting or re-filtering. The CExtGridWnd class is derived from the CExtGridDataProvider::IDataProviderEvents interface which provides the OnDataProviderSortEnter() and OnDataProviderSortLeave() virtual methods. You can remove focus and/or selection from any cells in the overridden OnDataProviderSortEnter() virtual method. The CExtGridWnd::OnGridFilterUpdateForRows() virtual method applies filtered state to grid rows. You can also override it. Your method also can remove focus and/or selection before invoking the parent class method.
|
|
Technical Support
|
Nov 11, 2010 - 12:41 AM
|
You should invoke the CExtGridBaseWnd::FocusUnset() method.
|
|
Alastair Watts
|
Nov 10, 2010 - 11:14 AM
|
A bit more info ... the following steps will show the problem everytime: 1. Select the last row in the grid 2. Clear ’(Show All) in ’Value Filters’ OnGbwFocusChanged() is now called for every row in the list.
|
|
Alastair Watts
|
Nov 10, 2010 - 9:24 AM
|
I need to map the visible row index to the un-hidden row index, any ideas?
|
|
Alastair Watts
|
Nov 15, 2010 - 5:48 AM
|
Thanks very much. Interestingly I still get a compiler error with ’- nRowCountReserved
|
|
Technical Support
|
Nov 15, 2010 - 7:36 AM
|
This is probably some compiler’s bug. You can split one line of code into several lines computing the same.
|
|
Alastair Watts
|
Nov 12, 2010 - 5:06 AM
|
The line:
nDstRowNo = LONG( _DataProvider.MapV2RY( ULONG(nSrcRowNo) - nRowCountReserved ) – nRowCountReserved );
gives the compiler error: C2146: syntax error : missing ’)’ before identifier ’’
I’ve tried changing the brackets but just get negative values returned!
|
|
Technical Support
|
Nov 13, 2010 - 8:24 AM
|
We are sorry. We mean: nDstRowNo = LONG( _DataProvider.MapV2RY( ULONG(nSrcRowNo) + nRowCountReserved ) – nRowCountReserved );
We need to add the number of outer header rows first. Then we convert the data provider’s virtual row index into the real index. Finally we need to subtract the number of outer header rows first to get the plain data row index.
|
|
Alastair Watts
|
Nov 11, 2010 - 2:53 AM
|
I want to map inner rows only - can you provide some sample code please.
|
|
Technical Support
|
Nov 11, 2010 - 11:27 AM
|
Here is the sample code: LONG nSrcRowNo = . . .
CExtGridWnd * pWndGrid = . . .
CExtGridDataProvider & _DataProvider = pWndGrid->OnGridQueryDataProvider();
LONG nDstRowNo = nSrcRowNo;
if( _DataProvider.MappingIsEnabledY() )
{
ULONG nColCountReserved, nRowCountReserved;
_DataProvider.CacheReservedCountsGet( &nColCountReserved, &nRowCountReserved );
nDstRowNo = LONG( _DataProvider.MapV2RY( ULONG(nSrcRowNo) - nRowCountReserved ) – nRowCountReserved );
}
|
|
Technical Support
|
Nov 10, 2010 - 11:56 AM
|
This information is stored inside the data provider decorated by the CExtMDP template class. The CExtMDP::MapV2RY() does what you need. Please note, the parameter and return value of this method is the plain index in entire row storage which is organized as the following sequence: header rows at top, then header rows at bottom, then data rows.
|