Get when a window is disabled

Just starting out? Need help? Post your questions and find answers here.
User avatar
jacdelad
Addict
Addict
Posts: 1473
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Get when a window is disabled

Post by jacdelad »

Hello,
for my ribbon I need to know when the window, where the canvas is put on, is getting disabled (via DisableWindow). Do I receive a message or how can I get the info that it got disabled? Not searching for the API "IsWindowEnabled", because I would have to call it periodically which I don't want to.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
User avatar
jacdelad
Addict
Addict
Posts: 1473
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: Get when a window is disabled

Post by jacdelad »

Ahaaa,
I found out, that firstly #WM_ACTIVATE and a callback is what I'm searching for and secondly PB already sends a #PB_Event_LostFocus, when the window is deactivated; I just have to additionally check whether the window is active or not. Case closed.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Post Reply