In your windows message loop, you can listen for events of type "WM_ACTIVATE" and "wParam == WA_INACTIVE".
See the msn documentation for details.
This will solve only part of your problem though, because it won't work for all the possible cases:
- For alt-tab and windows-key, you will receive a WM_ACTIVATE event.
- For ctrl+alt+del and lock screen (windows-key + L) you will not receive an event.
So, if you really want to catch all possible cases where your fullscreen mode is interrupted, you have to do what Medo3337 pointed out:
In regular time intervals, actively check the state of your window and/or your display device. This might seem inconvenient, but I have found no better way.