1) Open N++ and make some changes to a file so that it's dirty.
2) Shut down Windows.
3) Wait for Windows to ask you if you want to cancel the shutdown. Choose to cancel it.
4) Click "No" in the N++ messagebox asking you if you want to save your work.
5) N++ shuts down.
In this case I would have expected N++ to stay open. Different handling of the WM_QUERYENDSESSION and WM_ENDSESSION messages is needed.