Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 26th, 2005, 10:15 AM
allen.clarkson@gmail.com
Guest
 
Posts: n/a
Default DragQueryFile Error

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);

}

  #2  
Old July 26th, 2005, 10:15 AM
Alf P. Steinbach
Guest
 
Posts: n/a
Default Re: DragQueryFile Error

* allen.clarkson@gmail.com:[color=blue]
> [off-topic][/color]

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?
  #3  
Old July 26th, 2005, 10:25 AM
allen.clarkson@gmail.com
Guest
 
Posts: n/a
Default Re: DragQueryFile Error

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

  #4  
Old July 26th, 2005, 11:15 AM
ulrich
Guest
 
Posts: n/a
Default Re: DragQueryFile Error

On 26 Jul 2005 02:13:01 -0700, <allen.clarkson@gmail.com> wrote:
[color=blue]
> ok, just did. I was hoping, however, that someone in the C++ group
> would have run across this before.
>[/color]

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

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles