Solved

Drag/Drop on CTabCtrl?

Posted on 2000-03-17
3
661 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 300 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

729 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