BUG: Drag&Drop enabled with all rows selected |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
Posted: 03 August 2009 at 11:36am |
Hi;
when all rows within a report control are selected then Drag&Drop within the same control is possible, resulting in an access violation! I think this should be disabled by default. |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You right - let's change a few lines in function
BOOL CXTPReportControl::OnDrop(COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point) ...........................................................................
if (m_bDragMode && dropEffect == DROPEFFECT_MOVE)
{ if (nDropPos == -1) return FALSE; CXTPReportRecords* pDropRecords = new CXTPReportRecords(TRUE); if (!_GetSelectedRows(pDropRecords) || pDropRecords->GetCount() == GetRows()->GetCount()) //EXTRA CONDITION { CMDTARGET_RELEASE(pDropRecords); return FALSE; } |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Hi;
I'm still using v12.1.1 and partly v13.0, so I will wait until 13.1.1 will be available. Meanwhile I solved it in LVN_BEGINDRAG handler of my report control parent window and prevent this completely by returning *pResult=TRUE |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Sure but if you select all to drop in another control? This is proper operation.
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Fortunately, this is also not allowed in this application
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Sigh...
//<<>> if (m_nDropPos == -1) <--- disaster return FALSE;If I drag records from control A to control B, nothing happens. m_nDropPos is -1...
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
I think you need to improve your report sample. Add another report control etc, so that these things can be tested easily.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Right - this is why I post yesterday somewhere link to simple sample - https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewStatic.rar
You can run 2 instances same time and check internal and external drag and drop
To use standard mode - uncheck menu - Edit - Vista DD
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
>> if (m_nDropPos == -1) <--- disaster m_nDropPos generated during OnDragOver - so it irrelevant internal or external Drag source |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |