?
Solved

Drag/Drop on CTabCtrl?

Posted on 2000-03-17
3
Medium Priority
?
667 Views
Last Modified: 2013-11-20
Hi,

A friend of mine is using a class derived from the CTabCtrl and wants to add drag and drop to it. The problem he gets with drag and drop is that he only can drop on the tab area of the control and not on the client area. The new class has not changed any parts that can be important for this. I have a problem verifying any request since the code isn't mine, so please only answer if you have a good suggestion regarding this topic.

I.E How can he get the client area of the tab control to accept drops?

/ Andreas
0
Comment
Question by:cost
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Expert Comment

by:vachooho
ID: 2629183
probably there is other window in tab ctrl's client area.

YOu need to register drop target for that window too!

0
 

Author Comment

by:cost
ID: 2631441
That I already understood, but since I can't find a way to get to that window I don't know what to do. I suggested to my friend to use CWnd::GetWindow(GW_CHILD), but he says it doesn't work
0
 
LVL 5

Accepted Solution

by:
vachooho earned 900 total points
ID: 2631667
try
CRect rect;
CTabCtrl::GetWindowRect(&rect);
CTabCtrl::AdjustRect(FALSE, &rect);
CPoint point(rect.left, rect.top);
point.Offset(rect.Width()/2, rect.Height()/2);
Wndn * pChild = CWnd::WindowFromPoint(point);
if(pChild != NULL)
{
   //register it as drop target
}

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question