WM_COPYDATA return code when calling em_ commands
Posted: 2018-11-02, 14:32 UTC
I don't know if this can be considered a bug report or a suggestion (maybe both).
Feel free to move this post to the appropriate section if I posted it in the wrong one.
From MSDN:
WM_COPYDATA Return value:
If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.
Instead, when calling em_ user defined commands, TC always returns FALSE (0).
I suggest to return TRUE (1) and to return FALSE only in case of error, i.e. if the command has not been implemented.
Or you can notify the window passing the data, if its handle was set in the wParam argument of SendMessage, just like the "GW" / "GA" usage of WM_COPYDATA which notify a "RW" / "RA" to the calling window.
This way, as an added bonus, you can avoid the error message box in TC, if the calling window handle has been passed.
Feel free to move this post to the appropriate section if I posted it in the wrong one.
From MSDN:
WM_COPYDATA Return value:
If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.
Instead, when calling em_ user defined commands, TC always returns FALSE (0).
I suggest to return TRUE (1) and to return FALSE only in case of error, i.e. if the command has not been implemented.
Or you can notify the window passing the data, if its handle was set in the wParam argument of SendMessage, just like the "GW" / "GA" usage of WM_COPYDATA which notify a "RW" / "RA" to the calling window.
This way, as an added bonus, you can avoid the error message box in TC, if the calling window handle has been passed.