Subject |
Author |
Date |
|
Ulrich Heinicke
|
Mar 11, 2009 - 3:09 PM
|
Hi, when a CEdit control will be disabled the background color will be changed. So i want to have the same when a CExtGridCell will be readonly. So i insert the following code into my class: if (bReadOnly)
{
GridCellGet(nColNo, nRowNo)->ModifyStyle(__EGCS_NO_INPLACE_CONTROL);
GridCellGet(nColNo, nRowNo)->BackColorSet(CExtGridCell::__ECS_NORMAL,
g_PaintManager->GetColor(CExtPaintManager::CLR_3DFACE_IN, (CObject*)this);
} When the user change the theme maybe from Office2007 LunaBlue to Native Windows XP then grid will be redrawn. But the color of the readonly cells are the same. Only after a restart they are different. My question is: Is there an event that i can used to redraw the readonly cells or do you have another idea to handle that without restart the application? Thanks Ulrich
|
|
Technical Support
|
Mar 13, 2009 - 3:39 PM
|
It’s not effective to reset colors of all the cells when the UI theme is changed. Please do not assign any colors to grid cells. You should simply implement the CExtScrollItemWnd::OnSiwGetReadOnlyTextColor() and CExtScrollItemWnd::OnSiwGetReadOnlyBackgroundColor() virtual methods in your grid class and return the required colors of read only grid cells.
|
|
Ulrich Heinicke
|
Mar 13, 2009 - 4:45 PM
|
|
|
Offer Har
|
Mar 11, 2009 - 12:24 PM
|
|
|
Offer Har
|
Mar 11, 2009 - 10:34 AM
|
|
|
Technical Support
|
Mar 11, 2009 - 11:29 AM
|
- Use the CExtNCSB < CScrollView > template based type if you cannot avoid scroll view, if you need different MM_*** mapping/scaling modes, if you need the CScrollView class as part of document/view architecture and so on. The DRAWCLI sample application demonstrates splitter enabled scrollable views.
- Use the CExtNCB < CExtScrollWnd > template based type if you need simple and effective scrollable UI control with pixel by pixel based scrolling. But it does not mean you cannot implement scaling in this case. The ZoomScrollBar and AviFrames sample application use the CExtScrollWnd class and support scaling. The CExtImageEditWnd class is based on the CExtScrollWnd class and also supports scaling. Here is sample project demonstration something scrollable and simplest as possible:
http://www.prof-uis.com/download/forums/test_scroll_wnd.zip
- Use the CExtNCB < CExtScrollItemWnd > template based type if you need simple and effective scrollable UI control with optional pixel by pixel or item by item based scrolling in the horizontal and/or vertical directions line our grid controls do.
- If you need something scrollable and scaleable with higher precession computations, then you should implement scrolling based on the floating point values. The CExtFloatScrollWnd class in the following test project does this:
http://www.prof-uis.com/download/forums/TestGraph3.zip
|
|
Offer Har
|
Mar 11, 2009 - 11:47 AM
|
Dear Support, When I try to replace CScrollView with CExtNCSB < CScrollView > , I get this error: 1>z:\3rdparty\prof-uis\include\extscrollwnd.h(446) : error C2661: ’CScrollView::CScrollView’ : no overloaded function takes 2 arguments
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(420) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CScrollView
1> ]
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1178) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CScrollView
1> ]
1> z:\infra\baseframework\baseview.h(42) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CScrollView
1> ]
Is there any competability issue between CExtNCSB and CScrollView ? Thanks, Ron.
|
|
Technical Support
|
Mar 11, 2009 - 1:18 PM
|
We are sorry. Some template classes require adaptors. Could you please check whether the following specialization is present in the …/Prof-UIS/Include/ExtScrollWnd.h file?
template < > class __PROF_UIS_API CExtNCSB < CScrollView > : public CExtNCSB_Impl < CExtANCSB < CScrollView > >
{
public:
CExtNCSB(
bool bNcsbDelayedInitialization = false,
bool bNcsbForceMiddleContainerMode = false
)
{
m_bNcsbDelayedInitialization = bNcsbDelayedInitialization;
m_bNcsbForceMiddleContainerMode = bNcsbForceMiddleContainerMode;
}
virtual ~CExtNCSB()
{
}
}; // template < > class CExtNCSB < CScrollView >
If it’s not, then here is the source code update: http://www.prof-uis.com/download/forums/tmp/Updated_Scroll_Classes_in285.zip
|
|
Offer Har
|
Mar 11, 2009 - 1:23 PM
|
Yep, I don’t have this... Will these file work in 2.84?
|
|
Technical Support
|
Mar 11, 2009 - 2:26 PM
|
Seems it should. If it’s not, then we can provide you with 2.85 pre release download.
|
|
Offer Har
|
Mar 11, 2009 - 2:30 PM
|
Dear Support, It does not work: 1>z:\3rdParty\Prof-UIS\Include\ExtScrollWnd.h(446) : error C2661: ’CZoomView::CZoomView’ : no overloaded function takes 2 arguments
1> z:\3rdParty\Prof-UIS\Include\ExtScrollWnd.h(420) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CZoomView
1> ]
1> z:\3rdParty\Prof-UIS\Include\ExtScrollWnd.h(1178) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CZoomView
1> ]
1> z:\infra\behaivorview\BehaviorView.h(9) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CZoomView
1> ]
I cannot use 2.85 because it crashes all owner-drawn combo-boxes. Were you able to take a look at this problem? When is 2.85 supposed to be out?
|
|
Offer Har
|
Mar 11, 2009 - 2:51 PM
|
|
|
Technical Support
|
Mar 11, 2009 - 1:18 PM
|
We suspect you exported this project somehow incorrectly. Try to turn off and/or on manifest generation.
|
|
Offer Har
|
Mar 11, 2009 - 1:21 PM
|
I tried, but then it started looking for MFC80.dll, which it never does. Your project was in VC6, which I don’t have, adn my VC2005 converterd it - I did not do anything but pressing F7... Can you please check if it works for you in VC2005? Thanks, Ron.
|
|
Technical Support
|
Mar 13, 2009 - 3:37 PM
|
|
|
Offer Har
|
Mar 11, 2009 - 11:36 AM
|
Dear Support, I tried build TestGraph3, and I keep getting this error: 1>------ Build started: Project: TestGraph, Configuration: Debug Win32 ------
1>Linking...
1>CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
1>Build log was saved at "file://z:\3rdParty\Prof-UIS\TestGraph3\Debug\BuildLog.htm"
1>TestGraph - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any ides? Thanks, Ron.
|
|
DAN MAZILU
|
Mar 11, 2009 - 9:12 AM
|
Hi, Can you confirm that you receive my emails and provide me the answers to the problems contained in that emails ? Best Regards, Nelu
|
|
Technical Support
|
Mar 11, 2009 - 10:32 AM
|
Please let us know when you sent the email in question? The last email from you is dated March 4.
|
|
Offer Har
|
Mar 11, 2009 - 6:54 AM
|
Dear Support, I have a mutli-line edit box, and when it is resized it flickers heavily. What can be done to prevent this? I am also e-mailing you a clip showing it. Thanks, Ron.
|
|
Technical Support
|
Mar 11, 2009 - 8:54 AM
|
This is an issue of Win32 editor common control. You can solve it by using a rich edit control instead. The editors inside toolbars, popup menus and ribbon bars in all the modern Microsoft applications are rich edit controls.
|
|
Offer Har
|
Mar 11, 2009 - 8:55 AM
|
Is there support for rich edit control in Prof-UIS? I need it with theme etc.
|
|
Technical Support
|
Mar 11, 2009 - 10:25 AM
|
The CExtNCSB class works well with the MFC’s CRichEditCtrl class. So, you can use the rich edit control with skinned scroll bars and you can see it in the ProfUIS_Controls sample application where the Date Browser dialog page contains scrollable log view window which is rich editor.
|
|
Offer Har
|
Mar 10, 2009 - 7:09 PM
|
Dear Support, As I reported in teh past, there is a crash bug in CExtTreeGridWnd : http://www.prof-uis.com/prof-uis/tech-support/support-forum/crash-in-prof-uis-tree-gird-when-resizing-for-no-reason-63668.aspx#@lt;/p>
I narrowed it down to the ItemHide function - If I remove all the instances of this call, the crashes stop. I still don’t have a reproducible application, but I hope this can help in figuring out the bug. While I was trying to reproduce this sneaky bug, I encountered another bug, again, caused by the same ItemHide function, which I am sending you a clip and an application to reproduce it. Can you please take a lot at this function and see how it can cause these bugs? Thanks, Ron.
|
|
Offer Har
|
Mar 11, 2009 - 10:34 AM
|
Can you please confirm that you got this mail with the application that reproduces this bug? Thanks, Ron.
|
|
Technical Support
|
Mar 11, 2009 - 11:30 AM
|
Yes, it’s in the queue for reviewing. The e-mail queue is more hot than the thread lists in forums.
|
|
tera tera
|
Mar 9, 2009 - 11:13 PM
|
Hello. I want to move a cell in TAB key.
|
|
Technical Support
|
Mar 10, 2009 - 8:14 AM
|
This feature is supported in Prof-UIS 2.85. We can provide you with the source code update.
|
|
tera tera
|
Mar 9, 2009 - 6:10 PM
|
|
|
Technical Support
|
Mar 10, 2009 - 5:45 AM
|
Could you send us the test project used for taking the screen shot?
|
|
tera tera
|
Mar 10, 2009 - 6:23 PM
|
|
|
Technical Support
|
Mar 15, 2009 - 10:02 AM
|
We received your e-mail and replied it.
|
|
tera tera
|
Mar 15, 2009 - 6:19 PM
|
Hello. There is not the answer by an email.
Give me email (x956123@yahoo.co.jp) here as soon as possible.
Or give this page an answer.
|
|
Technical Support
|
Mar 17, 2009 - 10:19 AM
|
|
|
tera tera
|
Mar 12, 2009 - 7:03 PM
|
Hello. I e-mailed support a source code.
Please teach the situation.
I want an answer early. Thanks,
|
|
Offer Har
|
Mar 9, 2009 - 4:12 PM
|
Dear Support, When certain events happen in our application we need to go over all rows (visible and non-visible, which are collapsed nodes in tree grid) and update them. Is there any way of iterating over all HTREEITEMs in the tree grid in one loop? Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 5:44 AM
|
The CExtTreeGridWnd class has the following methods for tree row enumeration:
virtual HTREEITEM ItemGetNext(
HTREEITEM hTreeItem,
bool bSiblingOnly,
bool bExpandedWalk,
bool bIncludeHidden
) const;
virtual HTREEITEM ItemGetPrev(
HTREEITEM hTreeItem,
bool bSiblingOnly,
bool bExpandedWalk,
bool bIncludeHidden
) const;
virtual HTREEITEM ItemJumpNext(
HTREEITEM hTreeItem,
LONG nJump,
bool bSiblingOnly,
bool bExpandedWalk,
bool bIncludeHidden
) const;
virtual HTREEITEM ItemJumpPrev(
HTREEITEM hTreeItem,
LONG nJump,
bool bSiblingOnly,
bool bExpandedWalk,
bool bIncludeHidden
) const;
The ItemJump***() methods invoked with the nJump parameter set to 1 do the same as the ItemGet***() methods.
|
|
Offer Har
|
Mar 9, 2009 - 2:36 PM
|
Dear Support, Our cells’ text have colors assigned to them, and on the blue back-ground it is not so visible. We only use a one cell or one row focus, so we would to have only the dotted lines around the focused cell/row to be rendered. Can this be done? Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 5:44 AM
|
Please override the CExtGridBaseWnd::SelectionGetForCellPainting() virtual method. It’s invoked when grid cells need to know whether they should use a selection highlighted background.
You can also override the CExtGridWnd::OnGbwPaintCell() and invoke the parent class method with the modified dwHelperPaintFlags parameter which should have removed __EGCPF_HIGHLIGHTED_BY_FOCUSED_COLUMN | __EGCPF_HIGHLIGHTED_BY_FOCUSED_ROW flags. This will remove the focus rectangle painting. After the parent class method invocation you can manually paint focus rectangle where you need it.
|
|
Offer Har
|
Mar 9, 2009 - 2:25 PM
|
Dear Support, In a tree grid, do the following: Have a node A with sub-nodes B & C, all cells don’t have in-place edit: 1. Expand node A 2. Click on the sub-node B 3. Click on the node A You will see the node A collapsed all its sub-tree, even though it was not supposed to. It happens in all tree grids, including the one I send you to test other bugs in the tree grid (project called combo problem) Please fix. Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 1:20 PM
|
We failed to reproduce it:
|
|
Offer Har
|
Mar 10, 2009 - 1:24 PM
|
Please, first expand all nodes, then click on the child or R2, it will happen.
|
|
Offer Har
|
Mar 9, 2009 - 6:14 AM
|
Dear Support, We need Check-list combo-box, but not as a grdi cell, as a normal combo-box in a dialog. Is ther such component in Prof-UIS? Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 1:17 PM
|
1) Where can we take a look at any similar crash in some of Prof-UIS sample projects? 2) Did you invoke the complete rebuilding for the required configurations of the Prof-UIS / ProfAuto / ProfSkin libraries after applying this source code update?
|
|
Offer Har
|
Mar 10, 2009 - 1:21 PM
|
1. It happened in all the owner-drawn (fixed) combo-boxes we have. Just run any dialog with a owner draw combo box. 2. What do you mean by complete rebuild? I replaced the two files, and did a clean and build of the Prof-UIS DLL - was I supposed to do anything else?
|
|
Offer Har
|
Mar 9, 2009 - 1:09 PM
|
Dear Support, We repalced the files as the thread suggest, bug we get crashes in owner-drawn combo-boxes that we didn’t get before: These are the stack: > ProfUIS284md.dll!CExtComboBoxBase::PreSubclassWindow() Line 2811 + 0x19 bytes C++
mfc80d.dll!CWnd::SubclassWindow(HWND__ * hWnd=0x00031178) Line 4613 C++
mfc80d.dll!DDX_Control(CDataExchange * pDX=0x0012d67c, int nIDC=6127, CWnd & rControl={...}) Line 641 + 0x12 bytes C++
For non-owner drawn combo-boxes there are no problem. Please fix, in the meanwhile we have no choice but to roll-back to the old version, and wait for the check-box combo-box we desperately need Thanks, Ron.
|
|
Technical Support
|
Mar 9, 2009 - 11:41 AM
|
|
|
tera tera
|
Mar 9, 2009 - 12:38 AM
|
Hello. I want to draw a color to a group node name.
In addition, I want to display the red frames. Give my best regards
|
|
Technical Support
|
Mar 9, 2009 - 11:43 AM
|
This is a very interesting idea. The CExtRibbonNodeGroup class is used for representing button groups in the ribbon’s command tree. You need to create and use your own class derived from it and implement the CExtRibbonNodeGroup::_OnRibbonGetButtonRTC() virtual method:
CRuntimeClass * C_YOUR_RibbonNodeGroup::_OnRibbonGetButtonRTC()
{
ASSERT_VALID( this );
return ( RUNTIME_CLASS( C_YOUR_RibbonButtonGroup ) );
}
Where the C_YOUR_RibbonButtonGroup is also your class derived from the CExtRibbonButtonGroup class: class C_YOUR_RibbonButtonGroup : public CExtRibbonButtonGroup
{
public:
DECLARE_DYNCREATE( C_YOUR_RibbonButtonGroup );
C_YOUR_RibbonButtonGroup( CExtRibbonPage * pBar = NULL, UINT nCmdID = ID_SEPARATOR, UINT nStyle = 0 ) : CExtRibbonButtonGroup( pBar, nCmdID, nStyle ) { }
virtual void PaintCompound(
CDC & dc,
bool bPaintParentChain,
bool bPaintChildren,
bool bPaintOneNearestChildrenLevelOnly
)
{
. . .
}
};
IMPLEMENT_DYNCREATE( C_YOUR_RibbonButtonGroup, CExtRibbonButtonGroup );
The PaintCompound() is invoked for painting background of the group of ribbon buttons over already painted background of the ribbon page. You can copy the source code of this method from the CExtRibbonButtonGroup::PaintCompound() method and replace the following part of it: GetRibbonPage()->PmBridge_GetPM()->
Ribbon_PaintGroupBk(
dc,
rcRibbonGroupButton,
this
);
With your colored implementation.
|
|
Chun Pong Lau
|
Mar 7, 2009 - 5:51 PM
|
Dear support team, We would like to toggle our appliation with ribbon bar to fullscreen mode. Here are 3 questions. 1) How to hide ribbonbar in fullscreen mode? Your FullScreenState sample does not use ribbon bar hence we have no trace to go. 2) How to hide the tab when we are using CExtDynTabControlBar() in fullscreen mode? 3) How to hide the windows taskbar at the bottom of the screen in fullscreen mode? Thanks a lot. Regards, Chun Pong
|
|
Chun Pong Lau
|
Mar 13, 2009 - 9:42 PM
|
Dear support team,
Thank you for your efforts.
But the sample does not remove: 1) the ribbon bar at the top 2) the taskbar at the bottom
Thanks, Chun Pong
|
|
Technical Support
|
Mar 15, 2009 - 8:37 AM
|
Here is the updated version of the sample project written for you:
http://www.prof-uis.com/download/forums/RibbonBarFullScreen3.zip
We fixed the main frame window position problem when it’s switched into the full screen mode and now it covers all the shell bars including task bar. By default this sample application displays the ribbon bar. We think this is very correct UI solution. Even in the full screen mode user is still able to press the Alt button and start navigating the commands inside the ribbon bar.
But you can do the following:
1) Comment the following line of code near beginning of the MainFrame.h file:
//#define __HIDE_RIBBON_BAR_IN_FULL_SCREEN_MODE__
2) Compile the sample application. 3) Remove the HKEY_CURRENT_USER\Software\Foss\RibbonFullScreen registry key using REGEDIT.EXE. 4) Run the new version of the sample application and try to press the F11 key in it. Now the ribbon bar is not visible in the full screen mode. You cannot access it until you will return the main frame window into the normal mode. If you need to return to the recommended version of this sample application, then you should comment the __HIDE_RIBBON_BAR_IN_FULL_SCREEN_MODE__ preprocessor variable again and do not forget to remove the HKEY_CURRENT_USER\Software\Foss\RibbonFullScreen registry key.
|
|
Technical Support
|
Mar 13, 2009 - 3:38 PM
|
Please take a look at the following test project:
http:/www.prof-uis.com/download/forums/RibbonBarFullScreen2.zip
The switching between the full screen and normal modes can be quickly performed using the F11 key.
|
|
Technical Support
|
Mar 9, 2009 - 10:37 AM
|
The FullScreenState sample project demonstrates how to implement full screen mode. A ribbon bar based frame window should do exactly the same. A ribbon bar, menu bar, tool bar, resizable control bar and status bar controls are kind of MFC control bars. To hide any of them, you should invoke the CFrameWnd::ShowControlBar() method. You don’t need to hide the task bar and other shell bars when your main frame window is switched into the full screen mode. You should just bring the main frame window to the top like the FullScreenState sample application does.
|
|
Chun Pong Lau
|
Mar 10, 2009 - 6:35 AM
|
Dear support team, I’ve found the following problem after hiding all the control bar, including a ribbon bar, a tab container and a status bar. 1) There is a black line on the top the screen. I don’t know how to remove it. 2) The FullScreenState sample cannot cover the task bar. Thanks a lot. Regards, Chun Pong
|
|
Krustys Donuts
|
Mar 6, 2009 - 1:44 PM
|
I have a CExtGridWind with CExtGridCellString cells in the first column. When one of these cells is double-clicked, my override of OnGbwBeginEdit is called and I call the super class OnGbwBeginEdit. This seems to be working fine. When I add the line:
FrozenColumnCountLeftSet(1, false);
the edit on double-click no longer functions properly. Is there a bug here?
Gil
|
|
Technical Support
|
Mar 9, 2009 - 10:38 AM
|
We are sorry for this inconvenience. To fix this issue, please update the source code for the following method:</pre>void CExtGridWnd::OnGridCellInplaceControlAdjustCreationRect( CExtGridCell & _cell, LONG nVisibleColNo, LONG nVisibleRowNo, LONG nColNo, LONG nRowNo, INT nColType, INT nRowType, const RECT & rcCellExtra, const RECT & rcCell, RECT & rcInplaceControl, // RECT to adjust LONG nLastEditedColNo, LONG nLastEditedRowNo ) { ASSERT_VALID( this ); ASSERT_VALID( (&_cell) ); _cell; nVisibleColNo; nVisibleRowNo; nColNo; nRowNo; nColType; nRowType; rcCellExtra; rcCell; rcInplaceControl; nLastEditedColNo; nLastEditedRowNo; if( nColType == 0 && nRowType == 0 ) { CRect rcFrozenRange = OnSiwGetFrozenRange(); ASSERT( rcFrozenRange.top >= 0 && rcFrozenRange.bottom >= 0 && rcFrozenRange.left >= 0 && rcFrozenRange.right >= 0 ); if( nColNo < rcFrozenRange.left ) return; if( nRowNo < rcFrozenRange.top ) return; LONG nColCount = ColumnCountGet(); LONG nColFR = nColCount - rcFrozenRange.right; if( nColNo >= nColFR ) return; LONG nRowCount = RowCountGet(); LONG nRowFR = nRowCount - rcFrozenRange.bottom; if( nRowNo >= nRowFR ) return; CRect rcClient = OnSwGetClientRect(); rcInplaceControl.left = max( rcInplaceControl.left, rcClient.left ); rcInplaceControl.top = max( rcInplaceControl.top, rcClient.top ); rcInplaceControl.right = min( rcInplaceControl.right, rcClient.right ); rcInplaceControl.bottom = min( rcInplaceControl.bottom, rcClient.bottom ); return; } } </pre>
|
|
Krustys Donuts
|
Mar 6, 2009 - 10:40 AM
|
Dear Support, I have a CExtGridWnd grid that has a horizontal scrollbar. Because the first column in the grid is frozen, I want the left side of the the scrollbar to line up under the right side of the first column. As well, when the first column width is changed by the user, the left side of the scrollbar should change such that it’s left side remains linded up under the right side of the column. Thanks, Gil
|
|
Krustys Donuts
|
Mar 9, 2009 - 11:26 AM
|
When both horizontal and vertical scroll bars are displayed, there is a square beneath the vertical scroll bar and to the right of the horizontal scroll bar. The fill used for this square is what I would expect for the area in the same row as the horizontal scroll bar and directly under the frozen columns.
|
|
Technical Support
|
Mar 10, 2009 - 1:19 PM
|
|
|
Technical Support
|
Mar 9, 2009 - 10:39 AM
|
Thank you for the interesting question. Please take a look at the scroll bars inside the main grid window in the AdoRecordsetView sample application. There are several toolbars with small buttons and one vertical slider control are present near scroll bars in this grid. Prof-UIS supports automatic repositioning of two windows for each scroll bar. This feature can be used for implementing behavior you requested. But what you would like to see in the same row with the horizontal scroll bar under the frozen columns area inside your grid window?
|
|
Krustys Donuts
|
Mar 6, 2009 - 10:19 AM
|
Dear Support, I have a CExtGridWnd grid that, via drag and drop, allows the user to move rows within the grid. As the row is dragged, the cursor changes to indicate weather or not the row can be dropped at the cursor location. This seems to work fine. Now I would like to add code that highlights the row which will recieve the dragged row when dropped. The complication is that the row to be highlighted may not be under the cursor. That is, as the row is dragged over the grid, I would like to highlight any row in the grid. The row to be highlighted will depend on the row over which cursor is located, but may not be the row over which the cursor is located. Hope this made sense. I look forward to your response/questions. Gil
|
|
Technical Support
|
Mar 9, 2009 - 10:39 AM
|
We coded a very similar task but it’s related to the tree grid window. Please take a look at the following test project:
http://www.prof-uis.com/download/forums/test_tree_grid_idea_dnd.zip
It that is the kind of drag-n-drop target row highlighting you need? Will you be able to port parts of code from the test project above into your project?
|
|
Eric Houvenaghel
|
Mar 6, 2009 - 8:25 AM
|
Hello I have a grid that derives from CExtReportGridWnd. This grid used to sort when clicking on the column header. After upgrading to 2.84, this sort feature has vanished. i.e. No more sorting when clicking on the column header. Note that your CExtReportGridWnd sample also has this problem. Is there a fix or something I have to do to reactivate it? Thanks.
|
|
Technical Support
|
Mar 9, 2009 - 10:36 AM
|
We are sorry for this inconvenience. To fix this issue, please update the source code for the following method:pre>CExtReportGridDataProvider::CExtReportGridDataProvider() { m_pTreeNodeDefaultRTC = RUNTIME_CLASS( CExtReportGridItem ); m_DP.m_bEnableSortOrderUpdatingRows = true; } </pre>
|
|
Offer Har
|
Mar 6, 2009 - 6:11 AM
|
Dear Support, I’m implementing much custom cell, and I need to override OnPaintText , and I need to know when a cell is in focus, so that I will paint its text in light color, because the focused cell has a blue background. However, I see that when I right click or left click on a cell, in both cases, __EGCPF_FOCUSED_CONTROL is set, but when I right-click on a cell, you do not chane its background to blue, you just draw the dotted line around the cell. Is there any other way of knowing when you decide to change the color of the cell? Thanks, Ron.
|
|
Technical Support
|
Mar 9, 2009 - 10:38 AM
|
There is a set of the __EGCPF_*** flags defined in the .../Prof-UIS/Include/ExtGridWnd.h file. These flags are used in the dwHelperPaintFlags parameter of many methods of grid cell and controls classes. The __EGCPF_FOCUSED_CONTROL flag indicates the focused state of the grid control - not the focused state of some cell. This flags allows to implement selection painting. When the grid window is focused, then all the selected cells are using the white text on dark blue background. This is not the only flag you need. The __EGCPF_HIGHLIGHTED_BY_FOCUSED_COLUMN flag indicates whether the grid cell is in the same column with the focused grid cell. The __EGCPF_HIGHLIGHTED_BY_FOCUSED_ROW flag indicates whether the grid cell is in the same row with the focused grid cell. You need to check presence of both __EGCPF_HIGHLIGHTED_BY_FOCUSED_COLUMN|__EGCPF_HIGHLIGHTED_BY_FOCUSED_ROW flags if the individual cells can be focused in your grid window. You need to check presence of the __EGCPF_HIGHLIGHTED_BY_FOCUSED_ROW flag if your grid window is based on the full row focus and selection model.
|
|
Offer Har
|
Mar 9, 2009 - 10:57 AM
|
Dear Support, I tried this in my cell’s OnPaintText function:
CPoint pt = wndGrid.FocusGet();
if (pt.x==nColNo && pt.y==nRowNo && (dwHelperPaintFlags&(__EGCPF_HIGHLIGHTED_BY_FOCUSED_COLUMN|__EGCPF_HIGHLIGHTED_BY_FOCUSED_ROW)))
{
// I have blue background
}
else
{
// I have white background
} But now, I always get to the I have white background. Before I got to the I have blue bakcground if the cell was focused, even if it was right-clicked, which did not change the background color. What am I doing wrong? Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 5:41 AM
|
The conditional statement is incorrect. It should be ( dwHelperPaintFlags & ( __EGCPF_HIGHLIGHTED_BY_FOCUSED_COLUMN | __EGCPF_HIGHLIGHTED_BY_FOCUSED_ROW ) ) == ( __EGCPF_HIGHLIGHTED_BY_FOCUSED_COLUMN | __EGCPF_HIGHLIGHTED_BY_FOCUSED_ROW ) . I.e. both flags should be present. If both flags are present, then you should paint the selected background if the __EGCPF_FOCUSED_CONTROL flag is present (i.e. if the grid window is focused). If the __EGCPF_FOCUSED_CONTROL is absent, then you can draw dark gray background or not to draw any background depending on whether your grid has the "show selection always" style (CExtGridBaseWnd::NoHideSelectionGet() ).
|
|
Offer Har
|
Mar 5, 2009 - 8:46 PM
|
Dear Support 1) Run the MDI application. 2) Open a new document 3) Maximize it, so that there will be a document icon to the left of the File menu 4) Click 3 times fast on the document icon The application will crash (after two clicks the document will close, and the third click will crash the application) Please fix. Thanks, Ron.
|
|
Offer Har
|
Mar 10, 2009 - 1:23 PM
|
This is weird, because it happen in every application we try to run... ours, your samples etc etc. I tried it in the MDI application that you sent me a few days ago to try and reproduce another bug, and it also happened. We are using Win XP SP3 in a dual view, and the application is mazimized and the view is maximized as well.
|
|
Technical Support
|
Mar 10, 2009 - 1:19 PM
|
We are unable to reproduce this crash both in MDI and DRAWCLI sample applications. We tried different Prof-UIS themes with and without skinned window non client area. When we click the first toolbar’s button representing system menu button of the active and maximized MDI child frame window once, then it displays system menu of the MDI child frames. If we immediately and fast as possible click it again, then the double click event is generated and both system menu and MDI child frame windows become closed. The third click is always not related to the already closed MDI child frame window.
|
|
Offer Har
|
Mar 10, 2009 - 1:38 PM
|
I am sending you a video & a sample application that reproduces this bug, let me know that you got it.
|