Announcement

Collapse
No announcement yet.

How to use a message pump? how to communicate between two dialogs?

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

  • #21
    It has just dawned on me that I don't trap %WM_CLOSE but trap %SC_CLOSE; which I have been using for years. If I don't abort %SC_CLOSE, that is allow 'Function = 0', then Windows will then send a %WM_CLOSE.

    I trap %WM_CLOSE to kill a timer or save an ini file, for example.

    Sorry, Andrea.

    Thanks, Dave.
    Last edited by David Roberts; 23 Oct 2020, 11:10 PM. Reason: abort and not handle

    Comment


    • #22
      https://docs.microsoft.com/en-us/win.../wm-syscommand

      %SC_CLOSE comes in wparam of %WM_SYSCOMMAND message.

      Cheers,
      Dale

      Comment


      • #23
        I use Bob Scott's EZ-Post. For some reason, probably old age, I developed a habit of closing EZ-Post with the xPad button unselected so instead of saving a draft I lost everything that I had written and that could have been half a hours work or more. After including a %SC_CLOSE trap I have never lost anything.

        Comment


        • #24
          Agreed! Confirming close, and hourly FLUSH #nFile saved a lot of PBX meta data.
          Dale

          Comment


          • #25
            Originally posted by Dale Yarker View Post
            https://docs.microsoft.com/en-us/win.../wm-syscommand

            %SC_CLOSE comes in wparam of %WM_SYSCOMMAND message.

            Cheers,
            Perfect.
            Thanks to both of you, it works.
            Andrea Mariani
            AS/400 expert
            Basic programmer @ Home

            Comment

            Working...
            X