Thread: IPlug - Youlean
View Single Post
Old 05-01-2018, 07:46 PM   #411
Human being with feelings
Youlean's Avatar
Join Date: May 2015
Location: Serbia
Posts: 652

Originally Posted by Opcode 7 View Post
How can I make it so the window cant be resized out of the bounds of the current monitor? Or make it so the plugin is resized to the max monitor width / height on load.

cuz I have 3 monitors -- and when the plugin is on the middle main monitor, and gets resized into the second monitor -- next time the plugin loads, it gets centered in the middle monitor, and the drag-arrow in the bottom right of the plugin is out of bounds and invisible on the bottom of the screen....

Wouldn't it make sense to have some sort of functionality controlling / preventing this behavior baked in?

EDIT : Oops. Doh. I just noticed a method called "SetWindowSizeLimits"....

EDIT 2 : It's not working the way I would've expected it too...assume screenHeight and screenWidth are 1080 and 960 here...
I have not figured this out completely. GetDesktopResolution will give you desktop resolution but so far I have not found a way to get plugin border size to compensate for that too.

SetWindowSizeLimits will just limit resizing, but when you switch monitors you should resize GUI yourself.
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote