943,677 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 2040
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Sep 16th, 2006
1

API Help

Expand Post »
I'm trying to use input from a text edit box to delete a file. The input from the textbox will be the file location and the delete button will use DeleteFile() to delete the file.

http://img436.imageshack.us/img436/5...leteboxvn0.png

Do you know what I mean?
Similar Threads
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
Quan Chi2 is offline Offline
67 posts
since Jul 2005
Sep 16th, 2006
0

Re: API Help

Yes. We understand what you mean. But where do you have the problem?
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005
Sep 16th, 2006
0

Re: API Help

Click to Expand / Collapse  Quote originally posted by WolfPack ...
Yes. We understand what you mean. But where do you have the problem?
I want to use the text that was put in the textbox(the file location) to be used in the DeleteFile function.

DeleteFile(FileName)

In FileName I want the text that the user input to be used. Just like I would use cin.
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
Quan Chi2 is offline Offline
67 posts
since Jul 2005
Sep 16th, 2006
0

Re: API Help

Use GetWindowText to copy the text in the edit box, and call DeleteFile for that text.
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005
Sep 16th, 2006
0

Re: API Help

Thanks a lot man.
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
Quan Chi2 is offline Offline
67 posts
since Jul 2005
Sep 16th, 2006
0

Re: API Help

"The GetWindowText function copies the text of the specified window's title bar"

Thats not what I want.
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
Quan Chi2 is offline Offline
67 posts
since Jul 2005
Sep 16th, 2006
0

Re: API Help

If you read further it says that if it is a control it copies the text of the control.
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005
Sep 16th, 2006
0

Re: API Help

Click to Expand / Collapse  Quote originally posted by WolfPack ...
If you read further it says that if it is a control it copies the text of the control.

You're right. lol. I over read. Sorry.
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
Quan Chi2 is offline Offline
67 posts
since Jul 2005
Sep 16th, 2006
0

Re: API Help

Okay, Im still confused. Can anyone else help?
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
Quan Chi2 is offline Offline
67 posts
since Jul 2005
Sep 16th, 2006
0

Re: API Help

Okay then. Try sending the EM_GETLINE Message. That surely ought to work.
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: localtime_s, C++ 2005 Express
Next Thread in C++ Forum Timeline: What is wrong with this code?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC