Drag and Drop file/directory names on Tree Control.

hi,


       I am writing an application in which i have one Tree control.
Now i want that , when user drag & drop any file/folder on tree
control the file name/folder name should be add in the tree control
item.
       User may drag and drop file from desktop or may be from
directory.
I just want the path of that file/foder name nothing else.

so plz tell me will it be possible ...
Plz Help me.............




Klic.....

0
3/22/2007 11:56:14 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
622 Views

Similar Articles

[PageSpeed] 22

>       I am writing an application in which i have one Tree control.
>Now i want that , when user drag & drop any file/folder on tree
>control the file name/folder name should be add in the tree control
>item.
>       User may drag and drop file from desktop or may be from
>directory.
>I just want the path of that file/foder name nothing else.
>
>so plz tell me will it be possible ...
>Plz Help me.............

Start by having a look at the DragAcceptFiles API. That should point
you in the right direction.

Dave
0
davidl7375 (2060)
3/22/2007 2:03:42 PM
This code is quite extensive, but it may give you some ideas for how to get 
started.  It also populates the files from shell which you may want as well:

http://www.codeproject.com/shell/seashell.asp

This is simpler code, but it doesn't do as much:

http://support.microsoft.com/kb/148738

Tom

"Klic" <rohit.turambekar@gmail.com> wrote in message 
news:1174564574.431432.36860@o5g2000hsb.googlegroups.com...
> hi,
>
>
>       I am writing an application in which i have one Tree control.
> Now i want that , when user drag & drop any file/folder on tree
> control the file name/folder name should be add in the tree control
> item.
>       User may drag and drop file from desktop or may be from
> directory.
> I just want the path of that file/foder name nothing else.
>
> so plz tell me will it be possible ...
> Plz Help me.............
>
>
>
>
> Klic.....
> 

0
tom.nospam (3240)
3/22/2007 2:19:35 PM
Thank You Very much Both of you.

I got my solution with your given Link and suggetions.


Thanks again.



Rohit

0
3/24/2007 1:05:07 PM
Reply:

Similar Artilces:

DDP (Drop down Box)
i have a front sheet that has data input onto it, this then feeds into sheets Monday thru Sunday, I would like to print data on occassions and have decided to creat a form for this option, what i dont want to do is allow users access to the data on the pages then print, am looking for a safe way to do this and decided a form, drop down box, selecting the day of the week to be printed and this would print the required data, Any idea of the code for example, Selecting Monday in the Drop down box, would then print the Sheet "Mon" Tuesday in DDB would then print "Tue" and s...

Converting XLS file to QIF or to OFX
How do I safely and securely convert an excel file (xls) to a QIF or OFX file? "dreamchaser" wrote: > How do I safely and securely convert an excel file (xls) to a QIF or OFX file? In Excel, save the file to CSV and ustilise iCreateOFX Basic from: http://icreateofx.co.uk/Convert-CSV-to-OFX to convert the saved CSV file to OFX. ...

Cannot set menu in MFC ActiveX control
I am dynamically creating a CMenu object and trying to assign it to my ActiveX control. Windows balks and gives me a 1436 error, something to effect that a child window cannot have a menu. It is not a child window, it is the instance of COleControl, the top level window. (I verified this by inspecting m_parentHwnd.) I am trying to assign the menu within the OnCreate event at which time the control has a valid handle, and have tried it before and after the call to the parent OnCreate. Does anyone know the magic words to make this work? Thanks On Mon, 8 Dec 2008 16:22:02 -0500, Duane A. C...

conversion lotus 123 files to excel -- problem
I am converting lotus123 files to excel2002. One problem is that in lotus, literals are ignored when found in a cell within a formula. Excel on the other hand is not doing this and therefore causing #value errors on all the formulas where this occurs. Is there a way to handle this in excel other than manually having to change all the formulas? ...

What does #REF! mean in the Name Manager
I have a 2007 workbook with 6-7 sheets. I made some changes to cell names and apparently made some mistakes. When I open the Name Manager, the last entry looks like this: Name Value Refers to Scope Comments x #REF! =#REF!$C$25 Workbook I cannot find that name anywhere. I have looked in C25 on every sheet. What does this mean? >Name Value Refers to Scope Comments > x #REF! =#REF!$C$25 Workbook #REF! means it's an invalid reference. Did you delete a sheet? If so, that's probably why you're getting those. -- Biff Micro...

how can I drag formulas with other cell references
example cell A1 contains formula "=stdev(a2:a7) cell a2 contains formula "=stdev(a8:a13) Is it possible to drag the formula down so that cell a3 contains "=stdev(a14:19) and cell a4 contains "=stdev(a20:a25) and so on for cells a5, a6, a7 etc. etc. Hi Bram, See http://www.mvps.org/dmcritchie/excel/snakecol.htm#snkAddr B1: =stdev(OFFSET($A$1,6*ROW()-5,0):OFFSET($A$1,6*ROW(),0)) B2: =stdev(OFFSET($A$1,6*ROW()-5,0):OFFSET($A$1,6*ROW(),0)) It was easier to test and verify using SUM instead of stdev, but the formula is same NOTE the formulas are in a different colu...

How do I get excel files to open automatically from directories?
When I try to open excel files from the directory or from desktop I only get a blank worksheet not the file. I have to then go through File Open to get the file I want. There must be a way to have them open automatically. On Mon, 2 Jan 2006 21:22:01 -0800, Damian <Damian@discussions.microsoft.com> wrote: >When I try to open excel files from the directory or from desktop I only get >a blank worksheet not the file. I have to then go through File Open to get >the file I want. > >There must be a way to have them open automatically. Go to Tools -> Options -> Gen...

Odd problem with worksheets when opening file
Okay, here's the odd problem that's come up. When you double click on a excel file, excel opens up, but you can onl see the toolbars. The grid area looks like a snapshot of whatever you current background is before the file opened up. If you were showin your desktop, after the excel file opened, you'd still see your deskto in the datagrid area. If you start up a new excel file, then do the File>Open>file name, th file will open correctly. This problem happens across users here. Everyone is currently runnin office 2K. Any ideas on what causes the problem and any...

Outlook 2002 multiple file opening
In Outlook 2000, CTRL A would select all attached picture files, then Open would, in my case, open the files in Paintshop Pro. With the 2002 version I cannot find a way to do this. Any suggestions? ...

"File: send to mail recipient" not working
When users (on WinXP) select file, "send to mail recipient", no response from Outlook 2002. This occurs either when Outlook is open or closed. Problem happens when rt. clicking on .doc, .xls, .pdf's....all files. Any ideas?? Thanks!! ...

How do insert name automatically atop of each pg of doc?
Hello, How do I automatically insert name on each page of document like inserting page numbers? My professor told me not to type it in but to insert and I have not been able to do so. This is a new program for me, Word 2007. I have to submit my paper in MLA form and do not wish to lose points because for this. Thanks for your help. Click on the Insert tab of the Ribbon and then in the Header and Footer section, click on Header and make your choice from the options presented or click on the Edit Header button to get a blank header pane in which to insert the name in the...

odd files created
Every time I open and edit an excel spreadsheet on a network share, small odd files get created. They are usually no larger than 25-40k and don't have any extensions to them. Looking at the properties page for any file, the file description says File. Anyone know what this is from or how to get rid of them? Permissions are setup correctly for me, Word files don't have this behavior. Excel 2000 SP3 Thanks, Hi Brian, A file the same size as the workbook would be created in the same directory as the workbook. The filename would be nonsensical (or appear to be random) character...

adding date/time picker to inputbox control
Hi all,is there a way to add a date/time picker control to inputbox?...

change column name from letters to numbers?
I'm importing a 3rd party CSV file into Excel and then comparing some of the contents to a printed spec. Each numbered field in the spec corresponds to a column in the work sheet. I'd like to change the column headers from letters to numbers. Is that possible? Tools-->Options, General tab. Check the R1C1 Reference Style. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "Jerry" <jerry@nowhere.com> wrote in message news:OoyPef$eFHA.3048@TK2MSFTNGP12.phx.gbl... > I'm importing a 3rd party CSV file into Excel and then comparing ...

Excel Template Wizard, Very Large File Size
Background: Excel 2000. I created a spreadsheet and used the template wizard that links to an Access 2000 database. The template was later used to create one record and saved as a spreadsheet. The database also contains this one record. Spreadsheet and database work fine. Later I reduced the Access field size properties (none are larger than 150, most are less than 50). There are 35 fields. Unexpected result: The Excel spreadsheet (template) and the linked Access database are huge. The spreadsheet is 35MB and the associated Access 2000 database is 24MB. Each contains one record (a si...

insert a user's name/id
I am aware of functions like =TODAY() which will automatically insert today's date into a cell. I was wondering if something similar existed for user ID's/name. When you create a new spreadsheet it bears the name of the user who first created it in the properties. Is there a function I can put in a cell that will show the user name/id who has opened or last mondified the file (for example)? Thanks. not that i know of but you can do it with code. here is some code we use in some of our files to keep a record of who opened a file, when and how long they were in it. to add cod...

domain controller
If I have a more powerful comuter than needed, can I run Exchange 2003 on a Windows 2003 domain controller, which happens to be the first domain controller in the domain? Yes, you can though it's not recommended. "rook" <anonymous@discussions.microsoft.com> wrote in message news:7e6901c4849a$4ff93a60$a401280a@phx.gbl... > If I have a more powerful comuter than needed, can I run > Exchange 2003 on a Windows 2003 domain controller, which > happens to be the first domain controller in the domain? Yes it is extreamely not recommended because your so called &qu...

drag and drop monitoring
How can i monitor the drag and drop operation in the excel sheet cells. regards, Sunil Virmani I don't think you can directly. I think the closest you can do is look for changes (via worksheet_change). But that is unique to dragging and dropping. virmanisunil@gmail.com wrote: > > How can i monitor the drag and drop operation in the excel sheet cells. > > regards, > Sunil Virmani -- Dave Peterson ...

Date & Time file was last saved
Is there away to display in a cell the date & time the file was last saved? I know you can do this in word but is it possible in Excel 2002? Here is an UDF Function DocProps(prop As String) application.volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties(prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function Now you can use the following formula in one of your cells: =DocProps("Last save time") Obviously, the file has to have been saved. -- HTH Bob Phillips ... looking out across Poole Harbour to ...

OL2000
When opening an attachment in OL2000, the program creates a file in a temporary directory on my hard drive under C:\Documents and Settings\User\Local Settings\Temporary Internet Files\OLK6A2\. This directory is filling up and I would like to clear it. Unfortunately in XP SP2, this directly is not visible in when exploring files in my computer. I believe that I have all "show hidden files and folders" settings checked. Also, the file explorer shows (sometimes) that there is a sub directory under "temporary internet files," but it does not show up when I look further....

How to add a drop down menu to a cell
How to add a drop down menu to a cell? hi, you don't add it to a cell. It's a control in the toolbox and it sits on top of the sheet. Tools>customize>toolbar tab>select control toolbox. it's called a combo box. click it and drag it to the sheet. for more help on combo boxes, type combo box in help. >-----Original Message----- >How to add a drop down menu to a cell? >. > You can do it. Take a look at Data>Validation, see this site for full details http://www.contextures.com/xlDataVal01.html -- HTH RP (remove nothere from the email address if mailing d...

Day names in Calendar weekly view cells.
How does one display the days of the week, as well as the dates, in the title bars of the date cells in Weekly View of Outlook 2003 Calendar? It seems that an 'alternate calendar' of weekday names would do the trick if there's no simple setting that I've missed. Thanks, -- Michael H ...

Corrupt Access 2003 File
I was working on this file earlier today, I even just opened it and it was fine and all of a sudden there is a write delay to the save the file, I closed it and I try opening it again and it is corrupted. I don't get it. The message I am getting is below. What does that mean. I just finished making a lost of update to the file. The last time I backed it up was Tuesday, and I have done a lot of work to it between then and now. I don't have the time to go back and redo all that work again. Any help will be appreciated. "Microsoft Office Access has detected corruption in this ...

Visio Professional 7
i have several visio files (20-40) pages in each and i need to merge them into a single large visio file... is there a way to do this... inserting a page at a time and copying the drawing is not practical On Wed, 30 Apr 2008 07:38:01 -0700, sunman <sunman@discussions.microsoft.com> wrote: >i have several visio files (20-40) pages in each and i need to merge them >into a single large visio file... is there a way to do this... inserting a >page at a time and copying the drawing is not practical I've just added this feature to the utilities at http://www.visio-utilities....

fullscreen flash activex control
hello- i'm trying to author a MFC application that has, as its main window, a full screen shockwave/flash activex control with no title bar, borders, etc. what i've done so far is to create a new MFC application that has a single document (using the document/view architecture) in the "new project" wizard, and add the activex control to the main dialog. displaying the window as fullscreen is not the hard part -- i did that by defining BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( cs.hMenu != NULL ) { ::DestroyMenu( cs.hMenu ); cs.hMenu = NULL; ...