Announcement

Collapse
No announcement yet.

Last message at closedown for tray app

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • E Dingsor
    replied
    Michael,
    WM_ENDSESSION did the trick!

    Eigil

    Leave a comment:


  • Michael Mattias
    replied
    My bad, I read the question as "windows ending", not application ending.

    WM_DESTROY would be a good choice in that case... assuming you don't want to do "cleanup" before the "END FUNCTION" of WinMain/PBMain.

    Leave a comment:


  • Roger Garstang
    replied
    He wasn't wanting an opportunity, just a message that fires in all cases. Opportunity would be WM_CLOSE or an End Session message giving him the choice to stop the process. He just needs to do cleanup...which is exactly what I do in Destroy messages. He wants to cleanup when the app ends, which can be by normal means or when windows shuts down.

    Leave a comment:


  • Michael Mattias
    replied
    Your Window should always at least get the WM_DESTROY too, and is a for-sure message where the End Sessions can be aborted by any app.
    Um, I don't think so. WM_DESTROY is a NOTIFICATION, not an OPPORTUNITY. Besides, you don't need Windows to be exiting to get WM_DESTROY.

    Leave a comment:


  • Paul Squires
    replied
    Yes, Roger you've been a stranger too. Haven't seen you around the PlanetSquires forum for a while. FireFly 3 is coming along very well. I am very happy with it and I am pushing its development hard in order to get it done.

    Leave a comment:


  • Roger Garstang
    replied
    Well, I didn't want to go that detailed, but yes the NC messages fire last. Haven't seen a post from you in a while. How's my next version of FireFly coming?

    I used to use the NC Activate messages for Top Most fixes in Win 98 too.

    Leave a comment:


  • Paul Squires
    replied
    WM_NCDESTROY is sent after WM_DESTROY. At that point you can be assured that all windows in the application have been destroyed.

    Leave a comment:


  • Roger Garstang
    replied
    Your Window should always at least get the WM_DESTROY too, and is a for-sure message where the End Sessions can be aborted by any app.

    Leave a comment:


  • E Dingsor
    replied
    Thanks Michael.

    Eigil

    Leave a comment:


  • Michael Mattias
    replied
    WM_QUERYENDSESSION and/or WM_ENDSESSION

    Leave a comment:


  • E Dingsor
    started a topic Last message at closedown for tray app

    Last message at closedown for tray app

    Hi,
    I have a Tray application and would like to do some clean up when theapplication ends. If the user exit via my Exit menu everything is ok, BUT when some of my users just closes down the computer without closing the app in a normal way the cleanup is not executetd. What will be the message sent to the message pump to look for? I have tried WM_ Command +%WM_Close, WS_Syscommand + sc_Close, but none seem to be the right one.
    ?

    Eigil
Working...
X