Print Page | Close Window

A couple of questions on drag-n-drop

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=15720
Printed Date: 15 May 2024 at 1:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: A couple of questions on drag-n-drop
Posted By: dennisV
Subject: A couple of questions on drag-n-drop
Date Posted: 25 November 2009 at 4:30pm
Hi!

I've implemented the basics of drag and drop by implementing the following functions:

    ON_NOTIFY(XTP_NM_REPORT_BEGINDRAG, XTP_ID_REPORT_CONTROL, OnReportBeginDrag)
    ON_NOTIFY(XTP_NM_REPORT_DRAGDROP_COMPLETED, XTP_ID_REPORT_CONTROL, OnReportDrop)
    ON_NOTIFY(XTP_NM_REPORT_DRAGOVER, XTP_ID_REPORT_CONTROL, OnReportDragOver)

Now I need to move a bit further:

1) I can't seem to find any built-in functionality for scrolling while dragging (vertically), so I assume I'll need to implement this myself, right? Would I better off using the mousemove in my view (where the report is located)? How can I programatically scroll the report up/down a number of rows?

2) I've got 2 view with 2 separate reports, they're created the same and have very similar code, but in one when I drag I get a red marker drawn in the other I get a blue one - I couldn't find what the blue one is. Can you please give me a clue

Thanks!


-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)



Replies:
Posted By: mdoubson
Date Posted: 25 November 2009 at 8:12pm
1. We are working on Core support for AutoScrolling - will be in 13.2.2 soon
2. Blue (GetPaintManager()->m_clrHyper) marker line appears ONLY in debug mode in CXTPReportControl::DrawExtDropMarker function - in release mode red line (GetPaintManager()->m_clrHotDivider) used, CXTPReportControl::DrawDropMarker(CDC* pDC) use only red color.
Now analyze your code why different functions used


-------------
Mark Doubson, Ph.D.


Posted By: dennisV
Date Posted: 30 November 2009 at 6:10am
Thanks,

It seems that the flag m_bSortedDragDrop was set to true in one and false in another, not sure why though.


-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)


Posted By: dennisV
Date Posted: 01 December 2009 at 4:04pm
Also, it seems that when I get a XTP_NM_REPORT_BEGINDRAG message, the dragged records list is empty for some reason. Currently, I store a pointed to it in my app, because I need to know about it - I have to check that they're not dropped on their own children.

-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)


Posted By: mdoubson
Date Posted: 01 December 2009 at 4:23pm
please use 13.2.2 - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar  as DD still in process of modifications (e.g. to support custom clipboard types)

-------------
Mark Doubson, Ph.D.


Posted By: dennisV
Date Posted: 11 December 2009 at 5:38pm
Is there an ETA on when 13.2.2 will be released? Thanks.

-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)


Posted By: mdoubson
Date Posted: 11 December 2009 at 5:45pm
Yes- and you need to get source updates from same permanent link
https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar  
because DD support still in progress - e.g. we want to have RightButton Drag'nDrop - like Windows Explorer - with app-level context menu


-------------
Mark Doubson, Ph.D.


Posted By: dennisV
Date Posted: 17 December 2009 at 5:39pm
Ok, thanks. But when do you plan to release the next update? I can wait a little bit if it's not too far away ;)

-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net