View Single Post
Old 10-15-2018, 05:01 AM   #37
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by lb0 View Post
I like the look of Window_Resize and Move - does this mean a script can resize it's own GUI window?
Yep.

Besides checking and resetting window size and position in each defer cycle, you can prevent a user from changing the size or position of the window by dragging on the frame by blocking "WM_NCLBUTTONDOWN" mouse events:
Code:
iOK = reaper.JS_WindowMessage_Intercept(window, "WM_NCLBUTTONDOWN", false)
If you block these messages, you will probably have to check for clicks on the "Close" button yourself.

(There may be other, better ways to prevent resizing that I am not familiar with. Unfortunately, window frame styles don't seem to be cross-platform applicable.)

Last edited by juliansader; 10-15-2018 at 05:17 AM.
juliansader is offline   Reply With Quote