File System Methods
-
Hi, I'm trying to write a program that can copy a file URI into any window by drag and drop. The problem lies in C++, so far i've found only two methods: GetLogicalDrives and GetLogicalDriveString. In .NET there is this eqivalent: Environment.GetLogicalDrives and DriveInfo.GetDirectories. Im wondering if there is any eqivalent in Visual C++ Thanks Tom
-
Hi, I'm trying to write a program that can copy a file URI into any window by drag and drop. The problem lies in C++, so far i've found only two methods: GetLogicalDrives and GetLogicalDriveString. In .NET there is this eqivalent: Environment.GetLogicalDrives and DriveInfo.GetDirectories. Im wondering if there is any eqivalent in Visual C++ Thanks Tom
What does a URI have to do with
GetLogicalDrives()
orGetLogicalDriveString()
? How does drag/drop relate to all of this? Please explain what it is that you are after.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
-
What does a URI have to do with
GetLogicalDrives()
orGetLogicalDriveString()
? How does drag/drop relate to all of this? Please explain what it is that you are after.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
DavidCrow wrote:
What does a URI have to do with GetLogicalDrives() or GetLogicalDriveString()? How does drag/drop relate to all of this? Please explain what it is that you are after.
Ok, My app is supposed to display a tree view of the file system, you can then select the file you want. Then you drag a cross hair like in Spy++, to the window and it will copy the absolute path of the file to the location you dragged the crosshair to. I know that can be done without an app been written, but in some windows that don't support drag/drop operations, eg. Lan Connections Screen in Internet Options. Dragging the cross hair over the selected area will retreive the handle of the control and send a WM_PASTE message to that control and paste the file path into the selected window. :) Tom
-
DavidCrow wrote:
What does a URI have to do with GetLogicalDrives() or GetLogicalDriveString()? How does drag/drop relate to all of this? Please explain what it is that you are after.
Ok, My app is supposed to display a tree view of the file system, you can then select the file you want. Then you drag a cross hair like in Spy++, to the window and it will copy the absolute path of the file to the location you dragged the crosshair to. I know that can be done without an app been written, but in some windows that don't support drag/drop operations, eg. Lan Connections Screen in Internet Options. Dragging the cross hair over the selected area will retreive the handle of the control and send a WM_PASTE message to that control and paste the file path into the selected window. :) Tom
As soon as you start dragging from your tree control, are you sending a
TVN_BEGINDRAG
notification message?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
As soon as you start dragging from your tree control, are you sending a
TVN_BEGINDRAG
notification message?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
DavidCrow wrote:
As soon as you start dragging from your tree control, are you sending a TVN_BEGINDRAG notification message?
I don't think you understand! You don't drag from the tree view, you drag the crosshair like in Spy++ (See The Window Finder Article) They'd be a cross hair in the bottom of the screen, then when you drag the cross hair onto the window, eg. Textbox , it would copy and paste the file path from the tree view into the window control that you dragged the cross hair. Thanks Tom
-
DavidCrow wrote:
As soon as you start dragging from your tree control, are you sending a TVN_BEGINDRAG notification message?
I don't think you understand! You don't drag from the tree view, you drag the crosshair like in Spy++ (See The Window Finder Article) They'd be a cross hair in the bottom of the screen, then when you drag the cross hair onto the window, eg. Textbox , it would copy and paste the file path from the tree view into the window control that you dragged the cross hair. Thanks Tom
So what exactly is the problem? Implementing the crosshair? Figuring out what is selected in a tree control? Setting the text of an edit control?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
So what exactly is the problem? Implementing the crosshair? Figuring out what is selected in a tree control? Setting the text of an edit control?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
DavidCrow wrote:
So what exactly is the problem? Implementing the crosshair? Figuring out what is selected in a tree control? Setting the text of an edit control?
The exact problem is implementing the drag and drop procedure so it works out of the current program, the cross hair needs a function that returns the window handle or control handle, so I can send a WM_PASTE message to the necessary control. Tom
-
DavidCrow wrote:
So what exactly is the problem? Implementing the crosshair? Figuring out what is selected in a tree control? Setting the text of an edit control?
The exact problem is implementing the drag and drop procedure so it works out of the current program, the cross hair needs a function that returns the window handle or control handle, so I can send a WM_PASTE message to the necessary control. Tom
Tom Moore wrote:
...the cross hair needs a function that returns the window handle or control handle, so I can send a WM_PASTE message to the necessary control.
From the article:* Whenever the mouse moves, get the screen position of the mouse (
GetCursorPos()
)-
Get the
HWND
of the window beneath the mouse (WindowFromPoint()
)
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-