By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,911 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,911 IT Pros & Developers. It's quick & easy.

DragQueryFile Error

P: n/a
I am trying to capture the filename from a dragged/dropped file into a
list control. I have read every single Tutorial, How-To and other
documentation I can find and I still can't get it to work. The drag
procedure works properly (the application captures it) but the filename
is passed as complete gibberish characters. As a test, I have been
tryingto get the name to display in either a list box or a message box.
I am using Windows XP and Dev-CPP.

Here is the source:

case WM_DROPFILES:
{
HDROP hdrop2;
TCHAR anewname[256];
DragQueryFile(hdrop2,0, anewname, 256);//sizeof(anewname));
SendMessage(hListBox,LB_ADDSTRING,0,(LPARAM)TEXT(a newname));
MessageBox(hwnd,anewname, "Dropped File:", MB_OK );
DragFinish(hdrop2);

}

Jul 26 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* al************@gmail.com:
[off-topic]


Try posting this q in e.g. [comp.os.ms-windows.programmer.win32].

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 26 '05 #2

P: n/a
ok, just did. I was hoping, however, that someone in the C++ group
would have run across this before.

Jul 26 '05 #3

P: n/a
On 26 Jul 2005 02:13:01 -0700, <al************@gmail.com> wrote:
ok, just did. I was hoping, however, that someone in the C++ group
would have run across this before.


almost certainly.
:)
but here, they do not answer questions which are not related to c++ by
principle. for good reasons, imho.
Jul 26 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.