Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - A couple of questions on drag-n-drop
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

A couple of questions on drag-n-drop

 Post Reply Post Reply
Author
Message
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Topic: A couple of questions on drag-n-drop
    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)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2009 at 4:23pm
please use 13.2.2 - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar as DD still in process of modifications (e.g. to support custom clipboard types)
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2009 at 5:45pm
Yes- and you need to get source updates from same permanent link
because DD support still in progress - e.g. we want to have RightButton Drag'nDrop - like Windows Explorer - with app-level context menu
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.