Decimation
❔ Windows API message handling
I am working on this (https://github.com/Decimation/SmartImage) program. I am trying to work with Windows API messages for a few reasons: clipboard listening, drag-and-drop, etc. I have read the relevant documentation (https://learn.microsoft.com/en-us/windows/win32/api/_winmsg/) and tried to get the P/Invoke working but to no avail. I have the relevant P/Invoke in my referenced lib (https://github.com/Decimation/Novus).
Most examples I come across reference
Windows Forms
which I do not want to do for portability reasons (I can use OperatingSystem
and relevant C# features to restrict Windows API calls to Windows platforms), and I want to minimize unnecessary references in an already messy project.
The specific messages I want to utilize are clipboard (https://learn.microsoft.com/en-us/windows/win32/dataxchg/using-the-clipboard) and WM_DROPFILES( https://learn.microsoft.com/en-us/windows/win32/shell/wm-dropfiles). What is the best way to use these API functions without referencing external libraries?4 replies