WM_QUIT - OS2

This is a discussion on WM_QUIT - OS2 ; In a stand-alone *.C file I'm using a few standard PM dialogs. Assuming it would be better to do so, how/when do I process "external" messages like WM_QUIT and/or the shutdown-one then? Right now I'm using standard PM dialogs to ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: WM_QUIT

  1. WM_QUIT


    In a stand-alone *.C file I'm using a few standard PM dialogs. Assuming
    it would be better to do so, how/when do I process "external" messages
    like WM_QUIT and/or the shutdown-one then?

    Right now I'm using standard PM dialogs to open files, some messageboxes
    to replace printf(), and later a few WinDlgBoxes to replace PULL's. I'm
    not using any other PM elements (yet).



    ---

  2. Re: WM_QUIT

    ML wrote:
    > In a stand-alone *.C file I'm using a few standard PM dialogs. Assuming
    > it would be better to do so, how/when do I process "external" messages
    > like WM_QUIT and/or the shutdown-one then?
    >
    > Right now I'm using standard PM dialogs to open files, some messageboxes
    > to replace printf(), and later a few WinDlgBoxes to replace PULL's. I'm
    > not using any other PM elements (yet).


    If you created your own message processing loop, you will have to handle
    WM_QUIT there. If you're using WinProcessDlg for everything, it has its
    own internal message processing loop, but WM_QUIT messages are posted
    back to your message queue. So the only way to catch them is to have
    your own WinGetMsg()/WinDispatchMsg() loop. The WM_QUIT will cause the
    loop to exit.

    --
    [Reverse the parts of the e-mail address to reply.]

  3. Re: WM_QUIT


    >> In a stand-alone *.C file I'm using a few standard PM dialogs.
    >> Assuming it would be better to do so, how/when do I process
    >> "external" messages like WM_QUIT and/or the shutdown-one then?


    > So the only way to catch them is to have your own WinGetMsg()/
    > WinDispatchMsg() loop. The WM_QUIT will cause the loop to
    > exit.


    Allright, I'm not using a loop at all. I'll check out WinGetMsg()
    later. If I understand it correctly, a WM_QUIT won't stop my
    called WinMessageBox(), but I could use it to stop processing
    after the WinMessageBox() returns something. The processing
    itself doesn't take long, but it could at least be used to
    avoid a few more encounters with another WinMessageBoxes.




    ---

+ Reply to Thread