Announcement

Collapse
No announcement yet.

DragQueryFile in PBCC?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    Michael Mattias
    Member

  • Michael Mattias
    replied
    If you mean like "paste" onto a desktop shortcut icon, that file list comes in thru COMMAND$.

    Same with "send to", the file name(s) come into your program via COMMAND$. (See the "properties" of the "send to" items in your start menu, you'll see ' programname.exe %1' )

    I think multiple files come in null-delimited, with two nulls at the end. That means you will have to parse lpCmdLine yourself, as ASCIIZ [PTR] datatypes will be truncated by the compiler at the FIRST null, which is not what you would want in this case.

    However... when you copy a list of files from Explorer, an 'hdrop' is put on the clipboard with format type CF_HDROP. Go get that, and there's your 'hdrop' for use with DragQueryFile()

    Your completed demo will be appreciated in the source code forum.

    MCM

    Leave a comment:

  • Joseph Cote
    Member

  • Joseph Cote
    started a topic DragQueryFile in PBCC?

    DragQueryFile in PBCC?

    I see a couple of examples of this function for PBWin, but I can't figure out how to get the hDrop parameter in CC.

    Couple someone write up just a brief example where you can drop a file list out of windows explorer onto the icon and have it print the file list to the console?

    The big idea is to use this as a replacement for the COMMAND$() function for a send-to item to avoid the 2k workspace limit.

    Thanks!
Working...
X