Click here to Skip to main content
16,008,490 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow I can paste a bitmap which is contain in the clipboard to a file? Pin
20-Aug-01 5:34
suss20-Aug-01 5:34 
Generalexport acess.mdb tables to ascii text file Pin
20-Aug-01 5:13
suss20-Aug-01 5:13 
GeneralRe: export acess.mdb tables to ascii text file Pin
Christian Graus20-Aug-01 13:16
protectorChristian Graus20-Aug-01 13:16 
GeneralRe: export acess.mdb tables to ascii text file Pin
21-Aug-01 4:36
suss21-Aug-01 4:36 
Generalselect region screen Pin
20-Aug-01 5:11
suss20-Aug-01 5:11 
GeneralCPrintDialog don't work on Win2000 Pin
20-Aug-01 4:19
suss20-Aug-01 4:19 
GeneralRe: CPrintDialog don't work on Win2000 Pin
Not Active20-Aug-01 7:10
mentorNot Active20-Aug-01 7:10 
GeneralTreeView Drag drop query Pin
20-Aug-01 3:22
suss20-Aug-01 3:22 
Hi,

I'm trying to implement a drag drop within my MFC, MDI based app.

I have a CTreeView derived view, and I've implemented drag drop with it. I want the user to be able to drag treeview items and drop them on another window in my application.

I haven't implemented everything yet, but I'm taking it step by step. Here's what I've done

1. Handled the TreeView notification TVN_BEGINDRAG. Used the TreeCtrl to create a drag image list, done a BeginDrag and a DragEnter, set a member pointer to this window (m_p_wndDragSrc) in my main frame, and then SetCapture() in the main frame, my CMDIFrame derived window...

2. The CMDIFrame window handles WM_MOUSEMOVE to update the imagelist/pointer location.

That much all works fine.

What I want to happen is that when a drag starts, if the cursor is moved over a different child window in the main frame, that window should be brought to the front.

I've tryed code like this in the CMainFrame::OnMouseMove function:

CWnd *p_wndUnderPoint=ChildWindowFromPoint(point);
if (p_wndUnderPoint && (p_wndUnderPoint != this)) 
	p_wndUnderPoint->SetFocus();


Unfortunately, this doesn't do anything. I've tryed all sorts of possible CWnd:: functions, like SetFOcus, BringWindowToTop and so on. But none of them have the desired effect.

Can anyone give me some pointers? (pun. bad one. sorry)

Thanks in advance for your help

Jon
GeneralI have a very similiar problem! Pin
datablader8-Nov-01 16:29
datablader8-Nov-01 16:29 
QuestionLayout problem? Pin
20-Aug-01 3:15
suss20-Aug-01 3:15 
Generallarge text files in rich edit controls Pin
lio20-Aug-01 2:24
lio20-Aug-01 2:24 
GeneralRe: large text files in rich edit controls Pin
Per20-Aug-01 5:17
Per20-Aug-01 5:17 
GeneralDetecting instance of app in System Tray Pin
Jinxter20-Aug-01 1:49
Jinxter20-Aug-01 1:49 
GeneralRe: Detecting instance of app in System Tray Pin
20-Aug-01 8:40
suss20-Aug-01 8:40 
GeneralRe: Detecting instance of app in System Tray Pin
Giles20-Aug-01 8:47
Giles20-Aug-01 8:47 
GeneralApplication Exit function Pin
20-Aug-01 0:20
suss20-Aug-01 0:20 
GeneralRe: Application Exit function Pin
lio20-Aug-01 2:08
lio20-Aug-01 2:08 
GeneralRe: Application Exit function Pin
20-Aug-01 6:18
suss20-Aug-01 6:18 
GeneralDLL loading trouble. Pin
The_Server19-Aug-01 21:01
The_Server19-Aug-01 21:01 
GeneralRe: DLL loading trouble. Pin
yamini19-Aug-01 22:51
yamini19-Aug-01 22:51 
GeneralRe: DLL loading trouble. Pin
The_Server20-Aug-01 1:03
The_Server20-Aug-01 1:03 
GeneralRe: DLL loading trouble. Pin
Mukkie21-Aug-01 7:18
Mukkie21-Aug-01 7:18 
QuestionHow settings the DCB for SerialPort ? Pin
youssef19-Aug-01 20:54
youssef19-Aug-01 20:54 
AnswerRe: How settings the DCB for SerialPort ? Pin
Tim Deveaux20-Aug-01 13:05
Tim Deveaux20-Aug-01 13:05 
Generalconnection options Pin
19-Aug-01 20:47
suss19-Aug-01 20:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.