Subject |
Author |
Date |
|
Offer Har
|
Feb 17, 2008 - 4:37 PM
|
Dear Support,
All built in controls, including ProfUIS controls, when calling EnableWindow invalidates the control. For a grid control, I need to explicitly call Invalidate for this to happen.
Please explain/rectify.
Thanks, Ron
|
|
Technical Support
|
Feb 18, 2008 - 11:15 AM
|
We implemented a WM_ENABLE message handler in the CExtScrollWnd class which is the base class of all the grid windows:
1) message map entry ON_WM_ENABLE()
2) handler methodās declaration afx_msg void OnEnable( BOOL bEnable ); 3) handler methodās implementation void CExtScrollWnd::OnEnable( BOOL bEnable )
{
ASSERT_VALID( this );
if( bEnable )
OnSwUpdateScrollBars();
else
OnSwEnableScrollBarCtrl( SB_BOTH, false );
OnSwRecalcLayout( true );
RedrawWindow(
NULL,
NULL,
RDW_INVALIDATE|RDW_UPDATENOW
|RDW_ERASE|RDW_ERASENOW
|RDW_FRAME|RDW_ALLCHILDREN
);
}
|
|
Offer Har
|
Feb 18, 2008 - 6:01 AM
|
I’m not really sure how come you came to the conclusion that when you call EnableWindow you should not redraw the control - If you call EnableWindow on a combo-box for example, it automatically appears disabled, and the same goes to all other controls.
We have a function to disable a dialog by traveling over all controls in it. This is done using GW_CHILD/GW_HWNDNEXT , getting the CWnd* and calling EnableWindow on it. It seems to work fine with all other controls, so why shouldn’t it work with the grid controls?
|
|
Technical Support
|
Feb 18, 2008 - 4:13 AM
|
Most of the common controls are painted differently depending on whether the state is enabled or disabled. The same is also true for many other child windows we came across. All popup windows on the desktop look equally both for the enabled and disabled states. If you display a modal dialog over the main frame window, the frame becomes disabled while the dialog is running modally and, as a result, clicking anywhere on the frame activates the dialog. That is a convenient behavior of windows on Windows OS, which makes implementation of modal dialogs easier. If the dialog is simply created as a popup window and a descendant of the frame window without running a message loop under the CDialog::DoModal() method and if we disable the main frame window manually, then the user will not be able to detect whether the dialog or modal or not. The message loop will be controlled by the CWinApp::Run() method but the frame and dialog will behave equally unlike a modal dialog over the frame. In both cases the frame window will have exactly the same look in the disabled and enabled states. The grid windows also have equal states and that is why we do not handle the WM_ENABLE standard message in the CExtGridWnd class for repainting the grid control. Please let us know details about disabled grid windows in your projects to clarify your point of view.
|
|
Offer Har
|
Feb 17, 2008 - 4:26 PM
|
Dear Support,
I see that the implementation of this function is set the check-box to not checked. In all other controls, like color or number, it clears the cell to no value (’?’ in color, empty in number) I think that intermediate state (2) is more suitable for and empty check-box rather then a un-checked check-box.
Let me know what you (or other users....) think.
Thanks, Ron.
|
|
Offer Har
|
Feb 18, 2008 - 11:37 AM
|
Cool - I will try that out.
|
|
Technical Support
|
Feb 18, 2008 - 11:35 AM
|
Yes, this feature is applicable to all the cell classes.
|
|
Offer Har
|
Feb 18, 2008 - 11:16 AM
|
Does this work for all cell types? I have a generic function that decides weather a cell should be empty, regardless of the cell type, that’s why I used the virtual function Empty .
|
|
Technical Support
|
Feb 18, 2008 - 11:13 AM
|
You can invoke pCell->ModifyStyleEx( __EGCS_EX_EMPTY ) to mark a grid cell as empty without clearing its data.
|
|
Offer Har
|
Feb 18, 2008 - 6:10 AM
|
My problem is that it breaks the consistency - in all other cells Empty moves to a ’don’t-know’ state (think of a property grid), and in a check-box it’s not the same.
Maybe in CExtGridCellBool Empty should be to uncheck, and in CExtGridCellComboBox it should intermediate. Or, you can add a flag/style to CExtGridCellComboBox for deciding on what is the default Empty implementation.
|
|
Technical Support
|
Feb 18, 2008 - 4:15 AM
|
This is a really difficult question about the really simple thing. At least it raises one more question and explanation at the same time: the check box cell is a kind of cell whose Enable() method should never be called and we have no idea what is the emptying of the check box? We supposed the closes meaning of the emptying of the check box control is making it un-checked.
|
|
Offer Har
|
Feb 17, 2008 - 8:36 AM
|
Dear Support,
I have a combo-box derived from CExtComboBox, which is Owner-Draw Fixed and Has Strings true. I noticed that each time I redraw the combo-box it flickers - when I move the dialog, and I call Invalidate, when the mouse hovers over it etc. I placed a break-point in the beginning of my DrawItem, and I noticed that the combo-box is first drawn in the normal Windows style, and only after the end of the DrawItem it gets the ProfUIS skin, hence the flicker problem. How can this be fixed?
Thanks, Ron.
|
|
Offer Har
|
Feb 22, 2008 - 6:03 PM
|
I sent you clips showing the problem in both original code, and your suggested modification - did you receieve it?
|
|
Technical Support
|
Feb 21, 2008 - 6:57 AM
|
|
|
Technical Support
|
Feb 21, 2008 - 5:45 AM
|
We received your e-mail and replied to it.
|
|
Offer Har
|
Feb 20, 2008 - 9:00 AM
|
Were able to reproduce the problem?
|
|
Technical Support
|
Feb 18, 2008 - 7:10 AM
|
We received it. Thank you.
|
|
Offer Har
|
Feb 18, 2008 - 5:50 AM
|
Dear Support,
I am sending you a project by mail - please acknowledge so I know that you received it.
Thanks, Ron.
|
|
Technical Support
|
Feb 18, 2008 - 3:22 AM
|
The new combo box skinning code does not affect the client area of the combo box window nor the client area of the list box window as the embedded or popup part of the combo box common control. Could you create a simple dialog based test project, put your combo box into it and send this project to us?
|
|
Oliver Rau
|
Feb 15, 2008 - 11:13 AM
|
Dear ProfUIS-Team,
there appears to be a bug with floating window persistence if loading an archive file. We could reproduce the buggy behaviour after having implemented the archive load/save features in your ProfStudio sample application. I’ll immediately send you the corresponding souce code attached to an email for support@prof-uis.com.
The inconsistency especially appears when loading the file archive_01.FPX not only once but twice.
Best regards,
Martin
|
|
Technical Support
|
Feb 18, 2008 - 4:20 AM
|
We compiled and run your application successfully. We found nothing wrong. The archive_01.FPX state file restores the main frame maximized state when others are restoring in the normal state. The single monitor computer was used in testing and monitor resolution was enough high - 1440x1050. All the state files do not contain description of floating bars.
|
|
Oliver Rau
|
Feb 15, 2008 - 11:12 AM
|
Dear ProfUIS-Team,
there appears to be a bug with floating window persistence if loading an archive file. We could reproduce the buggy behaviour after having implemented the archive load/save features in your ProfStudio sample application. I’ll immediately send you the corresponding souce code attached to an email for support@prof-uis.com.
The inconsistency especially appears when loading the file archive_01.FPX not only once but twice.
Best regards,
Martin
|
|
Technical Support
|
Feb 18, 2008 - 4:19 AM
|
We tried to save/load different bar layouts using your test version of our sample application and everything was OK independently from the number of floating bars. Could you please describe some step by step actions which we should perform to reproduce the problem.
|
|
Oliver Rau
|
Feb 15, 2008 - 10:49 AM
|
Hello ProfUIS-Team,
within your sample RibbonBar the user can add items to the quick access bar by selecting them from a listbox. Generally spoken, there can appear items within this listbox that neither have a qualified name nor an icon to be displayed, e.g. groups, comboboxes ... Wouldn’t it be better to substitute this lag by an optional string (e.g. the title string of a given tooltip attached to this nameless item) to get a clearer assignment within the list? The automatic insertion of a default icon into the quick access bar would be an option for iconless items, too.
Kind regards,
Martin
|
|
Technical Support
|
Feb 18, 2008 - 4:26 AM
|
We think itās not a good idea to get some non-empty text assigned to a command in this case. The text may be too long for displaying in the quick access toolbar. But may be a better idea is to implement one more text property for each command which should describe a short action text and can be used for quick access toolbar and other places when explicit text properties are not specified completely. Even this solution is a guess only. On the other hand, itās easier to pay attention to the complete initialization of all the text properties which are currently supported by commands.
|
|
Oliver Rau
|
Feb 15, 2008 - 9:54 AM
|
Hello ProfUIS-Team,
is there any support for context based help using the F1 key implemented within ribbonbars like it is in MS Word 2007?
Best regards,
Martin
|
|
Technical Support
|
Feb 18, 2008 - 4:27 AM
|
We didnāt implement this feature yet. But itās not difficult to add it to the next release. Thank you for this request.
|
|
Offer Har
|
Feb 15, 2008 - 9:09 AM
|
Dear Support,
I have a grid, each time the mouse moves, I need to redraw one cell in the grid. I could not find a method to update only part of the grid - something like
RedrawCell(int nRow, inrt nCol) or RedrawRow(int nRow) etc. Please point me to the right direction. This is essential to me, as I suffer from a great performance loss due to this... Thanks, Ron.
|
|
Offer Har
|
Feb 26, 2008 - 4:28 AM
|
Dear Support,
This is not a big issue, I can write my own utility function for doing this, but I don’t think there are lot of time you want to repaint only the Drop-Down button... usually you want to invalidate a cell or a roe or a column (or several rows and/or columns).
In any case, if you don’t think that helps the community, I will do it in my utility class.
Regards, Ron.
|
|
Offer Har
|
Feb 25, 2008 - 5:08 AM
|
So every time one row needs to be repainted i need to write all these lines of code?
|
|
Technical Support
|
Feb 26, 2008 - 4:21 AM
|
What the user may need to repaint when the user knows cellās row/column indices:
1) The entire cell only. 2) Some part of the grid cell or a combination of its parts: a) Check box or radio button. b) Text label. c) One or several built-in buttons: c1) Up only. c2) Down only. c3) Up-down. c4) Drop-down. c5) Ellipsis. d) Icon area. e) The rest, which is an internal area free of any other built in-parts. It appears between the built-in cell parts aligned on left and on right. The slider/scroll-bar grid cell uses the rest area as a place for a slider or a scroll-bar like looking control emulation which works as a built-in part of this cell type. f) Specific built-in parts of header cells: f1) Focus arrow. f2) Sort arrow. g) Any specific parts of any particular grid cell classes. For instant, parts of scroll-bar like area in slider/scroll-bar grid cell. h) Each column reserves some extra space on left and/or right. Each row supports some extra space at top and/or bottom. So an inner data cell may reserve some free space area around it and this space can be used for displaying some additional information. For instance, each data row in the report grid window reserves extra space at the bottom of the row for painting auto-preview data related to each data row. 3) Entire row of cells. In Prof-UIS 2.82 each row can contain outer maximum 3 parts (a, b, c) and in Prof-UIS 2.83 row can contain 5 parts (a, b, c, d, e): a) Inner data cells. b) Outer header cells at left. c) Outer header cells at right. d) Frozen inner data cells at left. New in Prof-UIS 2.83. e) Frozen inner data cells at right. New in Prof-UIS 2.83. The user may need to repaint any combination of these row parts. 4) Entire column of cells. Same as 3 but in vertical direction. Prof-UIS 2.83 also supports frozen cell areas at top and/or bottom inside inner area of data cells. 5) Outer header cells at top-left, top-right, bottom-left, bottom-right. 6) Tree grid also supports outline area in one or more columns. User may need to repaint outline area only for some purpose. 7) Tree grid and report grid are supporting tree like structure in vertical direction. User may need to repaint one row and entire visible children in this row only. 8) We are working on cell join feature which will add more than one item into this list. 9) We are also going to support per-cell colorized borders and corner markers which can be used for accessing some data specific for particular grid cell only (for instance, multiline cell description text displayed in some big tooltip window). 10) Itās possible to override the CExtGridBaseWnd::OnGbwAdjustRects() virtual method and modify computed by default rectangular areas of grid cells and make some grid cells placed over/under other grid cells. This situation brings complete new list of cases and should be discussed separately.
Most of the rectangular parts described above can be computed with single invocation of the CExtGridWnd::GridCellRectsGet() method. Some rectangles can be computed as result of the CExtGridWnd::GridCellRectsGet() method combined with some other rectangles. We are not sure itās good idea to code one method for all or most of cases described above. This method will have more complex parameters then entire code for repainting we advised you to use. The result of this method can be some complex HRGN instead of CRect . We are also not sure we should create 10 or more standalone methods for particular situations. But we can add any method which is exactly needed in your project.
|
|
Technical Support
|
Feb 25, 2008 - 4:56 AM
|
Yes, you version is correct. It was our typo. We could add such simple re-painting methods but they would not be very useful. In many cases the entire row/column or simply some part of the cell should be repainted.
|
|
Offer Har
|
Feb 21, 2008 - 6:10 AM
|
It’s not very clear to me how this solves the problem - does pRectCellExtra return the whole row? Maybe you meant:
rcInvalidate.left = rcClient.left;
rcInvalidate.right = rcClient.right; and not: rcInvalidate.left = rcClient.left;
rcInvalidate.top = rcClient.top; Also, how about a wrapper for this in the grid class? Thanks, Ron.
|
|
Technical Support
|
Feb 21, 2008 - 5:34 AM
|
You do not need to walk through all the cells in a row if you need to repaint this row only: CExtGridWnd & wndGrid = . . .
LONG nRowNo = . . . // what we need to repaint
if( ! wndGrid.IsWindowVisible() )
return . . . // nothing to repaint
LONG nColCount = wndGrid.ColumnCountGet();
if( nColCount == 0 )
return . . . // nothing to repaint
CRect rcInvalidate;
if( ! wndGrid.GridCellRectsGet( 0, nRowNo, 0, 0, NULL, &rcInvalidate )
return . . . // nothing to repaint
CRect rcClient;
wndGrid.GetClientRect( &rcClient );
rcInvalidate.left = rcClient.left;
rcInvalidate.top = rcClient.top;
wndGrid.InvalidateRect( &rcInvalidate );
|
|
Offer Har
|
Feb 20, 2008 - 12:44 PM
|
Dear Support,
This does boost my performance issue.
However, there are times in which I need to invalidate a full row, and with this solution I need to run over all cells, which again, harms the performance. Also, how about a simple function that returns the cell rectangle without the other 11 RECTs? For invalidation all one need is the cell’s rectangle, and this can also make the performance improve.
I think that:
GridCellRectGet( LONG nColNo, LONG nRowNo, INT nColType, INT nRowType, RECT * pRectCell) and
GridRowRectGet( LONG nRowNo, INT nColType, INT nRowType, RECT * pRectCell) and
GridColRectGet( LONG nColNo, INT nColType, INT nRowType, RECT * pRectCell)
Are a welcomed addition to the library... Thanks, Ron.
|
|
Offer Har
|
Feb 15, 2008 - 10:53 AM
|
Dear Support,
Don’t you think this should be an integral part of the grid? If I need to update one cell i need to write all these rows? Can you please add such functions for the next version? I think it’s needed.
In any case I will try it out see how it improves performance...
Thanks, Ron.
|
|
Technical Support
|
Feb 15, 2008 - 10:48 AM
|
You should get the coordinates of a grid cell first in client coordinates of the grid window: LONG nColNo = ...
LONG nRowNo = ...
CExtGridWnd & wndGrid = ...
CRect rcInvalidate;
if( ! wndGrid.GridCellRectsGet( nColNo, nRowNo, 0, 0, NULL, &rcInvalidate ) )
return ... // cell is outside of the visible cell range The CExtGridWnd::GridCellRectsGet() method can compute locations of the visible grid cells only displayed in the client area of the grid window. Then you should invalidate part of the grid window. wndGrid.InvalidateRect( &rcInvalidate ); Then you may need to compute and invalidate some other cells in the same grid window and finally you can invoke the following line of code to make the invalidated rectangles updated on the screen: wndGrid.UpdateWindow();
|
|
RICHARD ALTON
|
Feb 15, 2008 - 5:01 AM
|
Hi,
There seems to be a bug with the latest version (2.82) and the CExtGridCellUpDown property grid cell. Previously, when you used the mouse wheel to scroll the value up/down, then the value would be updated correctly. Now, the value is not updated until you press enter in the control (or it loses focus). However, if you use the arrow up/down buttons then it works correctly. When using the mouse wheel, the OnGridCellInputComplete function correctly calls the CExtPropertyValue::Apply function, however it passes in the original cell value, not the newly modified active value.
We are using a complex multiple selection grid, using a compound property store. As a specific example, what we have is a 3d editor with an object translation represented in the property grid as 3 float values (X,Y,Z). Previously you could mouse wheel up/down on the X value and the object would move with the mouse wheel. Now when you scroll, the value changes in the cell, but the correctly updated value is not sent to the Apply() function hence the object no longer moves :(
Thanks for your help.
|
|
Technical Support
|
Feb 15, 2008 - 8:10 AM
|
Thank you for reporting that. We fixed it. Please request the update via email.
|
|
tera t
|
Feb 15, 2008 - 2:01 AM
|
|
|
tera t
|
Feb 25, 2008 - 11:21 PM
|
|
|
Technical Support
|
Feb 18, 2008 - 4:31 AM
|
This feature can be implemented as a custom painted toolbar button. You should create your own toolbar button class derived from the CExtBarButton class. Your class should implement a CExtBarButton::PaintCompound() virtual method that calls the parent class method and then draws the frame over the button surface painted by default.
|
|
David Skok
|
Feb 14, 2008 - 1:47 PM
|
I would like to use paint manager to paint a gradient on the client area of the MDI when no view is open. Right now the default is a dark charcoal color. I tried overriding OnEraseBackground and OnPaint of the CMDIFrameWnd and neither affects this background. I also tried overriding OnTabWndEraseClientArea in the CExtTabMdiOneNoteWnd tabs I use. This does not get at this background either. What in the world is responsible for painting the empty client area of MDI?
The main reason I would like to do this is because if no view is open and a dockable control bar is resized, you cannot see the border drag across this area because the drag frame color is the same as the background. I would however like to put a bitmap there in the future.
The gradient code I use is:
COLORREF clrFill = g_PaintManager->GetColor( CExtPaintManager::CLR_TASK_PANE_BK_TOP, (CObject*)this );
g_PaintManager->stat_PaintGradientRect( dc, rcGridInner, RGB(255, 255, 255), clrFill, true //bool bHorz = false, //UINT nCountOfSteps = 256 );
thanks,
Dave
|
|
Technical Support
|
Feb 15, 2008 - 8:09 AM
|
The MDI frame window is not the parent window of MDI child frames directly. The MDI frame window contains an MDI client window (dark charcoal). The MDI client window contains MDI child frames. So, you should subclass the MDI client window and implement paint message handlers in it. First, you need a new C++ class like this: class CMyMdiClientAreaWnd : public CWnd
{
protected:
virtual void PreSubclassWindow()
{
CWnd::PreSubclassWindow();
if( ( GetStyle() & (WS_CLIPCHILDREN|WS_CLIPSIBLINGS) ) != (WS_CLIPCHILDREN|WS_CLIPSIBLINGS) )
ModifyStyle( 0, WS_CLIPCHILDREN|WS_CLIPSIBLINGS );
}
virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
switch( message )
{
case WM_ERASEBKGND:
return 1L;
case WM_PAINT:
{
CPaintDC dcPaint( this );
CRect rcClient;
GetClientRect( &rcClient );
CExtMemoryDC dc( &dcPaint, &rcClient );
if( (! g_PaintManager->GetCb2DbTransparentMode( this ) )
&& (! g_PaintManager->PaintDockerBkgnd( true, dc, this ) )
)
dc.FillSolidRect( &rcClient, g_PaintManager->GetColor( COLOR_3DFACE ) );
}
return 1L;
}
return CWnd::WindowProc( message, wParam, lParam );
}
}; Then you should add the following property to the CMainFrame class: CMyMdiClientAreaWnd m_wndMyMdiClientArea; Finally you should invoke the following code in the CMainFrame::OnCreate() method:
HWND hWnd = ::GetDlgItem( m_hWnd, AFX_IDW_PANE_FIRST );
ASSERT( hWnd != NULL && ::IsWindow( hWnd ) );
m_wndMyMdiClientArea.SubclassWindow( hWnd );
|
|
Offer Har
|
Feb 14, 2008 - 10:42 AM
|
Dear Support,
I have cells of type CExtGridCellBool . I need to add an intermediate state to this cell. I do it using the __EGCS_CHK_INDETERMINATE flag. When in intermediate state I want to remove the text from the cell, but cannot, it allows to display only the true and false value. How can I clear the text for that case?
Thanks, Ron.
|
|
Offer Har
|
Feb 21, 2008 - 7:19 AM
|
Dear Support,
I think that should not be a language specific texts in the source-code, only in the resource file, so maybe it’s better to default them to empty strings...
The second issue - It’s not completely true, because in many places you do not need to monitor the change in state, only the check the state when Apply is needed.
I very common characteristic of the 3 state is that when pressed the intermediate state is removed is something that is common. Adding a flag for this sound to me as a reasonable and simple feature to add to this great library...
Thanks, Ron.
|
|
Technical Support
|
Feb 21, 2008 - 7:00 AM
|
We think the Yes/No/Default, Set On/Set Off/Inherit From..., True/False/Indeterminate, Available/Unavailable/Unknown and other possible strings of 3-state check boxes are really very specific to each particular project and may have various translations for different languages.
We can add the feature (turning off the 3-state mode automatically) but we think your code as well as any other project will handle each state changing of each 3-state check box and this is the place where the input will be verified and 3-state mode will be optionally turned off depending on the input validation specific for particular project.
|
|
Offer Har
|
Feb 18, 2008 - 6:04 AM
|
This sound about right. One concern here is that the global strings are hard-coded inside the code, and not in the resource file (which was also the case before).
What do you say about the feature to automatically remove the 3 state when the user clicks the check-box? can you add this as well?
|
|
Technical Support
|
Feb 18, 2008 - 4:04 AM
|
Thank you for sharing your ideas with us. We would like to discuss the finally formed feature request.
We added the CExtGridCellBool::g_strTextIndeterminate static property of CString type and _T("Indeterminate") is used as the default value. May be it would be more correct to port it to the CExtGridCellCheckBox class but the CExtGridCellBool::g_strTextTrue and CExtGridCellBool::g_strTextFalse static properties are already enough long time declared in scope of the CExtGridCellBool class so we would prefer to keep the compatibility with older Prof-UIS versions. We added the m_sLabelTrue , m_sLabelFalse and m_sLabelIndeterminate internal properties and CExtGridCellCheckBox::LabelTextGet() /CExtGridCellCheckBox::LabelTextSet() methods to the CExtGridCellCheckBox class. So, the CExtGridCellCheckBox class is now equally customizable as the CExtGridCellBool class and you can assign custom automatically changeable text values: 3 for check box cell and 2 for bool cell.
|Please let us know any additional details you need.
|
|
Offer Har
|
Feb 17, 2008 - 8:41 AM
|
I made a mistake in the previous post - I enhanced CExtGridCellCheckBox not CExtGridCellBool. Basically it was adding the two strings for true & false instead of using the static variables you borrowed from CExtGridCellBool for the AutoTextMode.
If you can please incorporate this into the next version of CExtGridCellCheckBox.
Another feature I added to CExtGridCellCheckBox was that when in 3 state mode, and user clicks the box, the check-box removes automatically the 3 state - what happens now is that when you set 3 state mode, clicking the box will go though the intermediate state, which is not a good idea, as we uses the intermediate state because there is no user input.
If you can add this feature into the next version let me know.
If you want I can send you the modified files.
Thanks, Ron.
|
|
Offer Har
|
Feb 17, 2008 - 5:53 AM
|
My problem is that I need the text assignment to true & false implemented in CExtGridCellBool , and the 3 state implemented in CExtGridCellCheckBox . I think this should be done in the library level, and not by me. As it looks now, I will change the class CExtGridCellBool to support 3 state. If you want, I can send you the update, and you can add this for future builds.
|
|
Technical Support
|
Feb 14, 2008 - 11:54 AM
|
We would recommend you use the CExtGridCellCheckBox grid cell instead. It supports the intermediate state and looks like a 3-state checkbox common control. This class may completely meet your requirements. You can also apply the __EGCS_EX_UNDEFINED_ROLE extended grid style to any grid object. This style is widely used in the property grid control. Any grid cell with this style looks as it is empty. The property grid control applies this style to grid cells representing combined property values which have different initial values.
|
|
Michael Bailey
|
Feb 14, 2008 - 9:06 AM
|
Hi,
Our QA found a bug with toolbars that can easily be duplicated in the DRAWCLI sample app.
Steps:
1. Start the DrawCLI application 2. For the "Standard" toolbar, Open the "Toolbar Options" dropdown (the tiny down arrow at the far right of the toolbar) 3. Select "Add Remove Buttons" > "Standard" 4. Turn OFF all buttons except the "Select" one
Result: All buttons are missing from the Standard toolbar and there is a space where the Select button should be.
The problem appears to be turning off all buttons except one, and that one button is proceeded with a separator.
Mike
|
|
Technical Support
|
Feb 15, 2008 - 8:07 AM
|
Thank you for reporting this issue. It is fixed . Please request the update by email.
|
|
tera t
|
Feb 13, 2008 - 10:14 PM
|
Hello.
A program falls.
void CMyRibbonBar::OnRibbonGalleryItemSelEndOK( CExtRibbonGalleryWnd & wndRG, CExtRibbonGalleryPopupMenuWnd * pGalleryPopup, CExtRibbonButtonGallery * pRibbonGalleryTBB, CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI ) { AfxMessageBox("A program falls."); }
|
|
Technical Support
|
Feb 14, 2008 - 6:27 AM
|
Thank you very much for reporting this issue. To fix it, please update the following method: void CExtToolBoxWnd::OnLButtonUp(UINT nFlags, CPoint point)
{
nFlags;
if( GetEditorHWND() != NULL )
return;
HWND hWndOwn = GetSafeHwnd();
bool bMultipleExp = ( (GetToolBoxWndStyle() & __TBWS_MULTIPLE_EXPANDED_GROUPS) != 0 ) ? true : false;
CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI_Hit = ItemHitTest( point );
if( m_pItemTrackPressed != NULL )
{
CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI = (pTBCI_Hit == m_pItemTrackPressed) ? pTBCI_Hit : NULL;
m_pItemTrackPressed->ModifyItemStyle( 0, __TBWI_PRESSED );
m_pItemTrackPressed = NULL;
if( pTBCI != NULL )
{
CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI_Parent = pTBCI->ItemGetNext(__TBCGN_PARENT);
ASSERT( pTBCI_Parent != NULL );
if( bMultipleExp && pTBCI_Parent == m_pItemRoot )
{
bool bHaveVertScrollBar = OnSwHasScrollBar( false );
ItemExpand( pTBCI, TVE_TOGGLE, true, bHaveVertScrollBar ? false : true );
}
else
{
ItemSetActive( pTBCI, true, true );
OnToolBoxWndItemSelEndOK( pTBCI );
if( ! ::IsWindow( hWndOwn ) )
return;
}
}
else
UpdateToolBoxWnd( true );
if( CExtMouseCaptureSink::GetCapture() == hWndOwn )
CExtMouseCaptureSink::ReleaseCapture();
m_ptStartLeftBtnTrack.x = m_ptStartLeftBtnTrack.y = -1;
return;
}
if( m_bTrackingBtnDown )
{
ASSERT( ! m_bTrackingBtnUp );
KillTimer( __EXT_TOOLBOXWND_TIMER_ID_SCROLL );
m_nScrollStepNo = 0L;
m_bTrackingBtnDown = m_bPushedBtnDown = false;
UpdateToolBoxWnd( true );
if( CExtMouseCaptureSink::GetCapture() == GetSafeHwnd() )
CExtMouseCaptureSink::ReleaseCapture();
return;
}
if( m_bTrackingBtnUp )
{
ASSERT( ! m_bTrackingBtnDown );
KillTimer( __EXT_TOOLBOXWND_TIMER_ID_SCROLL );
m_nScrollStepNo = 0L;
m_bTrackingBtnUp = m_bPushedBtnUp = false;
UpdateToolBoxWnd( true );
if( CExtMouseCaptureSink::GetCapture() == GetSafeHwnd() )
CExtMouseCaptureSink::ReleaseCapture();
return;
}
if( pTBCI_Hit != NULL && m_pItemActive2 == NULL )
{
DWORD dwHitStyle = pTBCI_Hit->GetItemStyle();
if( dwHitStyle & (__TBWI_ACTIVE|__TBWI_SELECTED) )
{
SendMessage( WM_CANCELMODE );
ASSERT( m_hWndEditor == NULL );
m_hWndEditor = OnToolBoxWndStartItemEditor( pTBCI_Hit );
}
}
} The bug should be gone after that.
|
|
Richard Gardner
|
Feb 13, 2008 - 9:57 PM
|
Hi
Recently I found such a problem that CExtGroupBox won’t display correctly its children. And, radio buttons are not displayed at all, SpinControl is not bound correctly to its buddy text control, and combobox control gets the dialog background when resizing the dialog. Here you can see a picture of what I get
and here is the demo project http://designleon.com/temp/TestProfUISRadio.zip Pls explain what I do wrong.
thx
|
|
Technical Support
|
Feb 14, 2008 - 3:51 AM
|
Please check the following points:
1) WS_CLIPCHILDREN | WS_CLIPSIBLINGS is set the dialog template.
2) The tab order for the group box control is greater than that for any other control.
3) The spin control is subclassed with CExtSpinWnd and the edit control with CExtEdit .
Finally, check the ProfUIS_Controls sample: there are a number of group boxes.
|
|
Chris Anderson
|
Feb 13, 2008 - 7:28 PM
|
hi,
I used CExtButton to subclass an existing button wnd proc in our legacy code. It works fine except a behavior change : in a dialog which has a few buttons and other controls, when I press TAB key to move the focus to a button, that button doesn’t become the default button - a DM_GETDEFID query doesn’t return the button which obtains the focus. Further observation shows that the button always return DLGC_BUTTON when responding WM_GETDLGCODE.
To fix this behavior change, I change the way button class handles WM_GETDLGCODE and BM_SETSTYLE message:
// CMyButton is derived from CExtButton LRESULT CMyButton::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { // fall back to subclass wnd proc to handle WM_GETDLGCODE if ( message == WM_GETDLGCODE ) return ::CallWindowProc(m_pfnSuper, m_hWnd, message, wParam, lParam);
// let subclass wnd proc handle BM_SETSTYLE before prof-uis take over if ( message == BM_SETSTYLE ) lResult = ::CallWindowProc(m_pfnSuper, m_hWnd, message, wParam, lParam);
// for other message return CExtButton::WindowProc(message,wParam,lParam); }
Is there any consequence from this change? Do you have any comment ? Anything needs attention ?
Thanks
|
|
Technical Support
|
Feb 14, 2008 - 5:59 AM
|
The only correct way of implementing skinned button controls is to make them owner-drawn. Otherwise Windows will occasionally over paint button windows with default looking buttons even if each window completely handles painting messages. So, all the buttons in Prof-UIS are owner-drawn buttons. We think it would be correct to replace the following part of the CExtButton::WindowProc() virtual method: case WM_GETDLGCODE:
return DLGC_BUTTON; with case WM_GETDLGCODE:
if( GetDefault() )
return DLGC_DEFPUSHBUTTON;
else
return DLGC_BUTTON; But this will not affect the button behavior. The default behavior is implemented in the CExtButton::PreTranslateMessage() virtual method and it works without the above improvement. You can change the button type by sending the BM_SETSTYLE message to the button window. This allows you to make the default button a simple push button and vice versa.
|
|
Chris Anderson
|
Feb 14, 2008 - 10:35 AM
|
|
|
Chris Anderson
|
Feb 13, 2008 - 10:54 PM
|
this shouldn’t work as BS_DEFPUSHBUTTON simply overwrites BS_OWNERDRAW, not sure why my changes still work. looks like it’s better to save a different copy of the button style and mimic the behavior of standard button
|
|
Richard Gardner
|
Feb 13, 2008 - 2:29 AM
|
Hi
how to catch the event when the user make a double click on a row and get a rowIndex for that row? all the cells from row have styles ModifyStyle(__EGCS_NO_INPLACE_CONTROL ); ModifyStyle(__EGCS_READ_ONLY, 0); so user won’t go in edit mode. Also all cells are of type CExtGridCellString.
Grid is set that it does not allow multiple row selection.
The grid is created dynamically by calling if (!m_Grid.Create(this)) { ASSERT(FALSE); return FALSE; }
in OnInitDialog.
Thx
|
|
Technical Support
|
Feb 18, 2008 - 5:33 AM
|
You should override the CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() virtual method: bool CYourGrid::OnGbwAnalyzeCellMouseClickEvent(
UINT nChar, // VK_LBUTTON, VK_RBUTTON or VK_MBUTTON only
UINT nRepCnt, // 0 - button up, 1 - single click, 2 - double click, 3 - post single click & begin editing
UINT nFlags, // mouse event flags
CPoint point // mouse pointer in client coordinates
)
{
ASSERT_VALID( this );
ASSERT( 0 <= nRepCnt && nRepCnt <= 3 );
//
// You should invoke parent class method first.
// This will let grid window to process selection/focus by default.
//
bool bRetVal =
CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent(
nChar,
nRepCnt,
nFlags,
point
);
//
// Hit test the mouse click event and get grid cell.
//
CExtGridHitTestInfo htInfo( point );
HitTest( htInfo, false, true );
if( (! htInfo.IsHoverEmpty() ) && htInfo.IsValidRect() )
{
INT nColType = htInfo.GetInnerOuterTypeOfColumn();
INT nRowType = htInfo.GetInnerOuterTypeOfRow();
CExtGridCell * pCell =
GridCellGet(
htInfo.m_nColNo,
htInfo.m_nRowNo,
nColType,
nRowType
);
if( pCell != NULL )
{
ASSERT_VALID( pCell );
if( nChar == VK_LBUTTON && nRepCnt == 2 )
{
//
// Some grid cell is double-clicked.
// It can be outer header cell or inner data cell.
//
if( nColType == 0 && nRowType == 0 )
{
//
// Some inner data cell is double-clicked.
// The htInfo.m_nColNo and htInfo.m_nRowNo properties
// are column and row indices.
//
}
}
}
}
else
bRetVal = false;
return bRetVal;
}
|
|
tera t
|
Feb 12, 2008 - 11:24 PM
|
Hello.
I set SetCmdID of the Ribbon-Node. I perform screen update of RibbonBar. It is not painted pictures in CmdID that a screen was appointed. Please teach a method
CExtRibbonNode * pNodeGrid; pNodeGrid = new CExtRibbonNode( ID_ATTR_NODEGRP_EDGE_EN_TYPE ); pNodeGrid->SetCmdID ( ID_ATTR_STYLE_EN_NONE , true );
RibbonBar->_RecalcPositionsImpl(); RibbonBar->Invalidate(); RibbonBar->_UpdateHoverButton( CPoint(-1,-1), false );
Thanks,
|
|
Technical Support
|
Feb 15, 2008 - 10:49 AM
|
Please also invoke the following code first: CExtCmdIcon * pIcon = pNode->CurrentIconGetPtr( false, NULL );
if( pIcon != NULL )
pIcon->Empty();
|
|
Offer Har
|
Feb 12, 2008 - 4:16 PM
|
Hi,
I need to place a check-box next to a color box. The layout should be one of two:
+------------------------------------+
| CLR CHK DRP |
+------------------------------------+
Or:
+------------------------------------+
| CHK CLR DRP |
+------------------------------------+
When CHK is the check-box CLR is the color box. DRP is the drop-down button of the color drop-down. The only way I came close was this:
+------------------------------------+
| CLR CHK DRP |
+------------------------------------+
How can I switch the places of the color and the check-box? Thanks, Ron.
|
|
Offer Har
|
Feb 14, 2008 - 5:26 AM
|
|
|
Offer Har
|
Feb 13, 2008 - 6:40 AM
|
Correct - no text only check box, color box and drop-down. Will try that out...
|
|
Technical Support
|
Feb 13, 2008 - 6:36 AM
|
Yes, you are right. But we assume you are not displaying text in color cells.
|
|
Offer Har
|
Feb 13, 2008 - 4:46 AM
|
Will it true to say that I need to switch rcIcon and rcCheck ?
|
|
Technical Support
|
Feb 13, 2008 - 3:31 AM
|
You should override the CExtGridCell::OnCalcLayout() in your color grid cell class. Your method should invoke the parent class method and then you should shift the rectangles computed by default.
|
|
Christophe Guibert
|
Feb 12, 2008 - 2:58 AM
|
Hello,
The CExtGridCellComboBox::FindString() method returns the first list item that contains the searched string. Is this on purpose ? One might rather expect the method to return the exact matching string (case sensitive or not).
In other words, if the CExtGridCellComboBox contains three items : "first string", "string", and "other string", I would like the method to return the second item when I search for "string", instead of returning "first string".
A solution could be to replace the str1.Find(str2) call, by (str1 == str2) test.
There might also be other Prof-UIS objects with the same behavior, such as list boxes or menus. Seen on Prof-UIS 2.82.
Thank you for your answer, and best regards,
Christophe Guibert
|
|
Christophe Guibert
|
Feb 12, 2008 - 1:27 PM
|
Thank you for this answer, I will use the FindStringExact() method.
Best Regards,
Christophe Guibert
|
|
Technical Support
|
Feb 12, 2008 - 12:18 PM
|
The CExtGridCellComboBox::FindString() method works as it was designed. You should use the CExtGridCellComboBox::FindStringExact() method which searches for the first list-box string in the cell combo box that matches the specified string. Note the search is not case sensitive.
|