Announcement

Collapse
No announcement yet.

Drag&Drop Vs COMMAND$

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Drag&Drop Vs COMMAND$

    When you pros write an app do you write code to cover dropping files on the .exe icon as well as on the main dialog window of the .exe, or do you just offer one solution?

    ------------------
    Kind Regards
    Mike

  • #2
    Mike, it is generally application-dependent, however, the more flexible an application is, the better it is to use.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]erbasic.com</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Is there a %WM_thingy for COMMAND$ ?

      SELECT CASE CBMSG
      CASE %WM_INITDIALOG
      ' Blah blah
      CASE %WM_DROPFILES
      CALL GetDroppedFiles(CBWPARAM) ' Retrieve the filenames
      InputStr = ""
      FOR k = 1 TO UBOUND(gDroppedFiles)
      InputStr = InputStr+" "+RIGHT$(gDroppedFiles(k), LEN(gDroppedFiles(k))-INSTR(-1, gDroppedFiles(k), "\"))+" "+$CRLF
      NEXT
      MSGBOX InputStr,," Files Dropped"
      CASE %WM_COMMANDSENT ' Or something?????????????
      NumFiles = 0
      TempStr = " "
      WHILE TempStr <> ""
      INCR NumFiles
      TempStr = PARSE$(COMMAND$, any " ", NumFiles)
      gDroppedFiles(NumFiles) = TempStr
      WEND
      END SELECT

      I checked win API, but once again I have no idea what the *keyword* might be short of cracking open my copy of 1479 paged Petzold.


      ------------------
      Kind Regards
      Mike

      Comment


      • #4
        Originally posted by Mike Trader:
        Is there a %WM_thingy for COMMAND$ ?
        IFAIK no, its set when you run your app.

        I think there are (MS Windows *not* PB) limits, on how many filenames you can recieve in COMMAND$.
        These can be overcome with drag and drop.
        That could be a reson not to use the command line option at all, and force the user to drag and drop.
        Otherwise you shold handle this.
        I have at least one app that issues a warning like:
        "Due to a limitation in MS Windows etc. etc."

        ------------------
        Best Regards
        Peter Scheutz

        [This message has been edited by Peter Scheutz (edited June 18, 2001).]
        Best Regards
        Peter Scheutz

        Comment

        Working...
        X