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
590 Views

Similar Articles

[PageSpeed] 42

>       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:

Prevent change to refs in second worksheet when drag cells in firs
I have a complex calendar in Excel. Each week, admins Ctrl-drag cells among different locations in the primary calendar worksheet. I have a second worksheet that needs to list those cell values in a fixed configuration, e.g. the value in Sheet1!A1 needs to always appear in the cell of Sheet2!G10. Sheet2!G10 contains the formula: “Sheet1!$A$1”. If the user drags Sheet1!A1 to Sheet1!A3, the formula in Sheet2!G10 gets automatically updated to “Sheet1!$A$3”. I have tried all combos of locking and protecting to prevent this updating. Is there a way to do this? Try referencing the other shee...

How to convert Quicken QFX files?
I am unable to convert a Quicken QFX file to be used in Microsoft Money 2003. Any ideas? In microsoft.public.money, Greg wrote: >I am unable to convert a Quicken QFX file to be used in >Microsoft Money 2003. Any ideas? Have you tried File->Import? ...

Can't open .pub files either
I have installed / unistalled / installed / uninstalled Publisher 2003 several times and have the same problems others seem to have. I can create and save a .pub file but cannot open them. Get the "cannot find file" message followed by the "cannot open" message. I have loaded the same Publisher program on another computer in our office and it works fine. To save time I should said ahead of time that we: DO NOT use Norton Antivirus DO use Norton Internet Securities which have been set to "allow scripts" Please help! If I cannot re-open and re-edit .pub fi...

Bought Pub 2003 now it won't open my Pub 2003 file
I just bought Publisher 2003 yesterday. I spent 3 hours creating a project. I tried to laod the saved project and got the message "Publisher can not open file. I tried open pun 97 files with the same result. I've used Publisher 2.0, 97 for years. What am I missing? Most likely you are running Norton Anti-Virus. Norton AV can actually break a Publisher file rendering it unusable. You need to disable script-blocking and possibly the Office plug-in components of Norton AV. Refer to http://www.davidbartosik.com/pub2002/pub2002_issues.htm -- David Bartosik - MS MVP for Publisher help...

enumerating file on a directory
hi, How can i enumerate files on a directory based on a filter like "*.h" and store the result on an array on VC++. tnx, hope you guys can help. I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html Look For CFileFind Class if working in MFC or FindFirstFile FindNextFile or FindClose if you project based on Win32 -- cheers, Alok Gupta Visit me at http://alok.bizhat.com "lawrence" <las@cybees.com> wrote in message news:#NvsWCRXFHA.2796@TK2MSFTNGP09.phx.gbl... > hi, How can i enumerate files on a directory based on a filter...

How do I print a text file ?
Hi, I am new to the group and wonder if any of you could offer any advice. I am trying to print a text file directly from my visual c++ application to the default printer without displaying the print dialog What is the best way of doing this ? If it is not possible to print directly from a text file, what commands to I use in between CDC::StartPage () To print the following Hello, my name is Joe Bloggs How are you I hope you can help with this problem etc..... CDC::EndPage () Thanks in advance Paul Paul, More info on printing than you can comfortably shake a stick at: http://www....

Outlook pst file
My original pst file was about 30 mb in size. Somehow it is corrupted and showing only 30 kb in size. I am not able to recover my previous info. Is there any way to retrieve info from this pst. You could try the inbox repair tool, scanpst.exe David "Ajay" <ajayget@indiatimes.com> wrote in message news:07e301c358de$6534d0d0$a101280a@phx.gbl... > My original pst file was about 30 mb in size. Somehow it > is corrupted and showing only 30 kb in size. I am not able > to recover my previous info. Is there any way to retrieve > info from this pst. ...

Log files in Great Plains 8.0
We use a web based program to import orders from our website into Great Plains. We have recently come across some errors where invoices show up with no associated order or customer information. The only thing that shows on these invoices is item information. I believe these invoices are generated somehow by a glitch in the import we do for our web orders. Is there a log file somewhere in GP where I can see what information was entered based on date? Or if anyone else has experienced this problem before, am I correct in my assumption that the "ghost" invoices are being caused by ...

Importing large tab-delimited text files?
I deal with very large data sets that are in tab-delimited .txt format. Many times, there are more than 256 columns of data. The Microsoft Knowledge Base had an article titled "Sample Macro to Import Data with More Than 256 Fields or Columns". This could do the trick for me if I could modify the macro to accomodate tab-delimited formats. Q1: Could anyone tell me how to modify the macro described above for tab-delimited .txt files? Q2: Does anyone know of a bulk file conversion utility that would change a tab-delimited text file to a CSV format? Thanks a bunch, Mark R-S Ma...

Open File Dialog Help
I am trying to set the m_ofn.lpstrInitialDir to "My Music" on an open file dialog, but can't seem to get it to work right. I would like it to default to the c:\documents and settings\user\My Documents\My Music, regardless of the machine the application is running on. The project is being built using Visual C++ 6.0 Professional, on a Windows 2K machine, but may be running in any Windows environment. Thanks, SHGetSpecialFolderPath(CSIDL_PERSONAL) gets you to My Documents ...

Published 2000 pictures make file sizes too big
I have scanned pictures using Microsoft Photo/Draw. The pictures are around 250 KB but when I put them in my Published document, the file grows to 14,000KB. I can't email them or save them on a floppy. How can I get this file size down You may have to convert the file to a pdf format. Publisher just make humongous files. You have several choices when it comes to a pdf converter program from freebees to Adobe Acrobat. The later is on the spendy side and the freebees may disappoint you. My choice after comparing 5 pdf converter programs was PDF-XChange, a very nice commercial produc...

Chart, lines drop to zero when no data entered
Have several charts that get the data from a master data sheet which gets its data from several other sheets, thus a linked formula is involved. X axis is for Jan - Dec. I only thus far have data for Jan - May. The lines on the charts are fine for Jan - May, but since there is no data in June - Dec, the line drops to zero. It make the production chart look like the person suddenly stopped working. I realize I can erase the formulas but this is not acceptable in that several people, not excel proficient, will be updating their own charts and printing them. I want the line to sto...

No files selected in openfiledialog
How can I test for openfiledialog OK clicked without any files being selected? (I'm using it with multiple select as true.) I've tried if openfiledialog1.filenames = nothing then ... and if ubound(openfiledialog1.filenames) = -1 then ... but both these give compile errors. Grateful for advice. Am 11.05.2010 15:46, schrieb simonc: > How can I test for openfiledialog OK clicked without any files being > selected? (I'm using it with multiple select as true.) > > I've tried > > if openfiledialog1.filenames = nothing then ... > &g...

Copy a file with only values no formulas
Is there an easy way to copy a workbook so that it only has the values and not the formulas? Thank you. -- Lee Coleman Right click on a sheet tab and select all sheets. Then select all cells on the active sheet. Do a copy, then Edit, paste special, values. Right click on a sheet tab and select ungroup sheets. Save the workbook under a different name!!!! Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Lee Coleman" <lee@nospam.jjlgreenhouses.com> wrote in message news:OIOx4$FeHHA.4020@TK2MSFTN...

Report Index Does Not List All Names
I am trying to create an index for a retiree listing that we have (1600+) however when I open my report to polulate the results for the TableOfContents table- the only names listed are the ones for the top of each page. Here is the module that I used from Microsoft. Any input would be appreciated. Option Explicit Dim db As DAO.Database Dim TocTable As DAO.Recordset Dim intPageCounter As Integer Function InitToc() 'Called from the OnOpen property of the report. 'Opens the database and the table for the report. Dim qd As DAO.QueryDef Set db = CurrentDb() 'Re...

Relative File locations
I have a program that opens file #1 in folder XYZ. In this file is a reference to another file #2 in another folder. Is there a way to reference file #2 so if I put file #2 and file #1 in the same folder, the reference will always be made to the folder that contains the file #1, no matter where I may relocate it? Thanks, ...

Drop Down box
How can I make a drop down box in a cell so to choose either of 3 selections? Does this require a macro or can it be done without? -- Thank you! Data Validation with List Option and in the source, either reference a range or type: Item1,Item2,Item3 http://www.ozgrid.com/Excel/data-validation.htm -- Regards Dave Hawley www.ozgrid.com "Doug" <Doug@discussions.microsoft.com> wrote in message news:39A645AC-3754-444E-B376-E869C4D4A3E3@microsoft.com... > How can I make a drop down box in a cell so to choose either of 3 > selections? > Does this ...

how to detect item selected from List Control?
Hi I'm trying to detect the index of the item selected from a list control when a user hits the up or down arrows from the keyboard. So I made a call to list.GetSelectionMark() in the List control's event LVN_KEYDOWN, however this always results in the call to GetSelectionMark returning the index of the item selected before the arrow key was hit any ideas of how to get the item selected after the arrow key has been hit, or a better event to detect a change in item selected? Thanks ahead of time. How about LVN_ITEMCHANGED notification message? Ali R. "Mark" <anonymou...

Answer file local admin password
Hi, I am trying to apply a local admin password to all PC's during my ghost roll out. Everthing works from my answer file with the only exception the local admin password is not applied. Here is the current part of my answer file [GuiUnattended] AdminPassword="R0ver" EncryptedAdminPassword=NO ...

Schedueled Auto Send .xls File to Receipients
I have an MS2007...I have a progress tracking excel spreadsheet that I must send to certain associates on a biweekly basis. What functionality exists or coding is reqiuried for my document to be automatically sent to selected receipients on a scheduled basis until the project is complete? ...

New pst file
When I split off my pst file into a new one for a different email account, will it point to my existing Rules file and auto-corrects or will I need to create new ones? Thanks, Sherry ...

adding Text to the beginning of a control source
I want to say ="HELP"&Format([Session Start Date 2],"yyyy\:mm") & [ID] I want the word HELP then the start date 2 and finally the ID ie: HELP2010:12430 How do I put the text at the beginning? Where are you putting this? In the Control Source of control on a form/report? Then it should work as posted provided that [Session Start Date 2] and [ID] are in the object's record source. In a query? Then you just need a field alias and drop the = sign; MyHelpText: "HELP" & Format([Session Start Date 2],"yyyy\:mm") & [ID] ...

dragging formula
I have a small formula that wont drag down the column. The answer of the formula is what is dragging. How do I fix this so I have the correct answer in each cell? =left(a3,5) mary Are you getting an error? What happens when you try and do it? Are the cells blank afterwards? Is the worksheet/cell protected? The formula looks fine. If you are dragging by the little black cross in the bottom right hand corner of the cell, there should be no problems. Andy. "mary kay dougherty" <marykay.dougherty@necsa.com> wrote in message news:066501c38f49$d2d20670$a001280a@phx.gbl.....

1st I read mail from my Inbox, then I can jot a note & a rule file
This is a suggestion, this feature may already exist in newer versions, I am using Office 2003. I like creating rules for Outlook e-mail so they go into folders but I tend not to read many of the ones for which I have created rules, they just go into the folders and then get old before I get around to reading them. What I'd like better is have all the emails initially come into my Inbox, read them from there, and then I can be given an option for Outlook to file the e-mail in an e-mail folder using a previously created or newly created rule. It should also give me an option t...

Linking drop down boxes
I'm attempting to create a form where I have a number of columns of dro down boxes of lists. I have one column where I have created drop down boxes linked to a mai list. Each item of the main list has a separate "daughter" list. Each "daughter" list is different. In the form, I want the adjacent column related to the main list dro down choices to contain a drop down list of the relevant "daughter information only; in other words, when one item from the main list dro down box is selected, the choices in the adjacent drop down list mus relate to the selected main...