Hi Brian:

Thanks very much for pointing this out to me. The more that I look at it, the less I think that a service app is the best way to go for me. Much simpler. :-)


Regards,
Ed

 _________________________________________
|                                         |
| ED LEE               ed_lee @ ncsu.edu  |
|_________________________________________|
|                                         |
|                Windows Systems Support  |
|                      College of Design  |
|                    NC State University  |
|_________________________________________|


Brian Rathbone wrote:


Ed Lee wrote:

Is there system event that I can trap in Windows for logging off? I've seen several apps that can "remap" a logoff command to become a reboot instead, so I'm guessing that there's something available.

Yes. The system sends a WM_QUERYENDSESSION message to all open windows, I believe. The data provided tells you if the user is logging off, the system is shutting down, or your app needs to be closed because it needs to be overwritten.

Second, since I'd basically be waiting for the event to occur, what would be a good approach to take to actually wait for the event? Would a thread be helpful in this case, or would that be too complicated for what I've described?


You could use Aaron's window subclassing example to receive and handle this message.

<http://www.aaronballman.com/programming/REALbasic/WindowSubclassingArticle.php>

hth,

Brian
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to