Dekkerware console applications

The following two console applications allow you to find a window and drop your files from the Win32 command prompt.


DropFiles drops files onto a window. For example, the following command will drop a file named "C:\WINDOWS\setuplog.txt" onto the specified window handle, 000105FE:
  DropFiles.exe 000105FE C:\WINDOWS\setuplog.txt
Download now:
  The C/C++ source file: DropFiles.cpp
  The application: DropFiles.exe


FindWindow offers a command-line interface to the Windows API FindWindow. It tries to find the handle to a top-level window whose class name and window title match the specified arguments, and prints a hexadecimal representation of this handle onto the screen (standard output).
For example, the following command will try to find a window whose class name is OpusApp and whose window title is "Document1 - Microsoft Word":
  FindWindow.exe OpusApp "Document1 - Microsoft Word"
Download now:
  The C/C++ source file: FindWindow.cpp
  The application: FindWindow.exe

FindWindow + DropFiles

The output of FindWindow is a valid input to DropFiles! So for example, the following command finds a Notepad window, and passes its handle to DropFiles, so that the file "C:\boot.ini" gets dropped onto Notepad:
  FindWindow.exe Notepad | DropFiles.exe "" C:\boot.ini


Converts an image file to another format, using the Microsoft Windows GDI+ API. Interestingly, this little application appears to have been helpful during the development of GDI+ support for Wine. (As reported by Lei Zhang: ConvertImage cannot run.)
  ConvertImage.exe C:\input.jpg D:\output.bmp
Download now:
  The C++ source file: ConvertImage.cpp
  The application: ConvertImage.exe

Developed by Niels Dekker for Dekkerware
E-mail (no spam please): dekkerware at
Page updated on 2008-03-25