Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Problem with drag/drop
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with drag/drop

 Post Reply Post Reply
Author
Message
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Topic: Problem with drag/drop
    Posted: 10 June 2008 at 5:16pm
I have AfxOleInit in app InitInstance, I have called in my docview::initinstance:
wndReport.EnableDragDrop( _T("BuildITTask:v2"), xtpReportAllowDrag | xtpReportAllowDrop );


When I drag I get the standard cursor with a little box under it ... but I do not get the red line between the rows.

Any reason for this? Could anyone help.
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2008 at 3:18pm
In fact I dont get either of the drag/drop notifications called as per ReportSample:
ON_NOTIFY(XTP_NM_REPORT_BEGINDRAG, XTP_ID_REPORT_CONTROL, OnReportBeginDrag)

ON_NOTIFY(XTP_NM_REPORT_DROP, XTP_ID_REPORT_CONTROL, OnReportDrop)


Help, please ... oh, I am running v10.3.1
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2008 at 4:42pm
Found it, I had to clear the group and sort by order arrays (even though they are disabled) when I initialise my view. Now I have drag/drop, my messages are being received and the red drop marker is being drawn. Hurrah!

For anyone else, if you load/save state, call these two after adding columns and loading the state if you dont actually want groupby and column sorting (as you cant have drag/drop with column sort/grouping):
CXTPReportControl &wndReport = GetReportCtrl();

wndReport.GetColumns()->GetGroupsOrder()->Clear();
wndReport.GetColumns()->GetSortOrder()->Clear();
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.180 seconds.