View Single Post
Old 06-19-2018, 02:32 PM   #3
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,964
Default

The type cast is not necessary: the argument can be kept as HWND in the C++ code. As long as it's exposed to REAPER as void* in ReaScript.cpp it should work the same (because the auto-generated reascript_vararg.h does the cast anyway).

Another bug with HWND in extension APIs is that returning one always gives 0. For the FXChain window APIs I created a custom type (FXChain as an alias of HWND__) to work around this while attempting to keep type checks (it turns out REAPER doesn't seem to type check custom types – it's possible to pass a MediaTrack* just like with void*).

The BR_MIDI_CCLaneReplace and BR_MIDI_CCLaneRemove functions were broken in this commit: https://github.com/reaper-oss/sws/co...a4e4084ddeL149.

I think the best solution would be for REAPER to support HWND for extension APIs.

Last edited by cfillion; 06-19-2018 at 03:48 PM.
cfillion is offline   Reply With Quote