Announcement

Collapse
No announcement yet.

What Message?

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

  • What Message?

    I've looked through the winapi.hlp, but I'm not sure what I'm looking for, so here goes:

    What message is sent when the user clicks anywhere on a dialog other than a child window/control?
    Walt Decker

  • #2
    [3452] 00:51:16 hWnd: 15205422 (042E) wMsg: 272, wParam: 15205422, lParam: 0, Msg: WM_INITDIALOG
    [3452] 00:51:16 hWnd: 15205422 (042E) wMsg: 5, wParam: 0, lParam: 17826117, Msg: WM_SIZE
    [3452] 00:51:16 hWnd: 15205422 (042E) wMsg: 127, wParam: 2, lParam: 0, Msg: WM_GETICON
    [3452] 00:51:16 hWnd: 15205422 (042E) wMsg: 127, wParam: 0, lParam: 0, Msg: WM_GETICON
    [3452] 00:51:16 hWnd: 15205422 (042E) wMsg: 127, wParam: 1, lParam: 0, Msg: WM_GETICON
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 42337127, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554447, Msg: WM_SETCURSOR > WM_MOUSEMOVE (15, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 160, wParam: 15, lParam: 42337127, Msg: WM_NCMOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 41878377, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 17498307, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 40960877, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 16580807, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 40567662, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 16187592, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39781233, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 15401163, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39584626, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 15204556, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39322483, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 14942413, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39191411, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 14811341, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39125875, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 14745805, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39060339, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 14680269, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39060339, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 14680269, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39060339, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 14680269, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39060339, Msg: WM_NCHITTEST

    >>>

    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33619969, Msg: WM_SETCURSOR > WM_LBUTTONDOWN (1, 513)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 513, wParam: 1, lParam: 14680269, Msg: WM_LBUTTONDOWN
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39060339, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33685505, Msg: WM_SETCURSOR > WM_LBUTTONUP (1, 514)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 514, wParam: 0, lParam: 14680269, Msg: WM_LBUTTONUP
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39388019, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 15007949, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 39715699, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 15335629, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 40698740, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 16318670, Msg: WM_MOUSEMOVE
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 132, wParam: 0, lParam: 41419636, Msg: WM_NCHITTEST
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 32, wParam: 15205422, lParam: 33554433, Msg: WM_SETCURSOR > WM_MOUSEMOVE (1, 512)
    [3452] 00:51:17 hWnd: 15205422 (042E) wMsg: 512, wParam: 0, lParam: 17039566, Msg: WM_MOUSEMOVE
    [3452] 00:51:18 hWnd: 15205422 (042E) wMsg: 134, wParam: 0, lParam: 0, Msg: WM_NCACTIVATE
    [3452] 00:51:18 hWnd: 15205422 (042E) wMsg: 28, wParam: 0, lParam: 1324, Msg: WM_ACTIVATEAPP
    [3452] 00:51:18 hWnd: 15205422 (042E) wMsg: 8, wParam: 0, lParam: 0, Msg: WM_KILLFOCUS
    Last edited by Edwin Knoppert; 21 Feb 2009, 05:52 PM.
    hellobasic

    Comment


    • #3
      What in the wide, wide world of sports is that?
      Walt Decker

      Comment


      • #4
        Iow, several messages..
        hellobasic

        Comment


        • #5
          SIOW, take my pick.
          Walt Decker

          Comment


          • #6
            I guess for you it happens in the WM_SETCURSOR message.
            This one has submessages like the ones this log shows.
            wparam stuff and such.

            Check it out
            hellobasic

            Comment


            • #7
              Thems some "Slim Pickens" thar

              I think Walts question is one that is asked often (on a smaller scale) and Edwins answer is more what really happens...you just do not see it unless looking for it


              Although Edwins post gives me a better idea for "What the heck is this post????)

              Engineer's Motto: If it aint broke take it apart and fix it

              "If at 1st you don't succeed... call it version 1.0"

              "Half of Programming is coding"....."The other 90% is DEBUGGING"

              "Document my code????" .... "WHYYY??? do you think they call it CODE? "

              Comment


              • #8
                Well, here's the problem (I don't know whether it's a DDT related or windoz style related), and I've never done this before:

                I created two DDT dialogs, the first with hwnd_desktop as the parent and the second with the first as the parent. The second does not have the topmost style. The second is larger than the first. Moving the second from on top the first, the first appears disabled, and when clicking on it, it is indeed disabled, i.e., I can't get it to move to the foreground. So I thought that if I can figure out what message is sent when I click on it I can send setactivewindow to bring it to the top.

                I think lbuttondown is the way to go, find the location of the cursur, then send setactivewindow.
                Walt Decker

                Comment


                • #9
                  the first with hwnd_desktop as the parent and the second with the first as the parent
                  If the second dialog is a child of the first, and the display is MODAL, the first dialog is disabled by design until the second is dismissed, and no message is going to change that. (code not shown). (well, maybe one "could" make it work, but I would wager you would just be introducing other problems).

                  Better I think to make both dialogs MODELESS and control which one is on top with SetWindowPos or even Show/Hide the window currently not active (DIALOG SHOW STATE, I think?) ... kind of like you do with a TAB control.

                  MCM
                  Michael Mattias
                  Tal Systems Inc. (retired)
                  Racine WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    The second dialog does not have the ws_child, ds_control, ws_ex_appwindow, or ws_ex_topmost properties. I created the two like this:

                    pseudo code
                    Code:
                    '================== first dialog ============================
                    
                    DIALOG NEW %HWND_DESKTOP, title$, x&, y&, xx&, yy&, style&, exstyle&, TO hDlg
                    
                    '================== second dialog ==========================
                    
                    DIALOG NEW hDlg, title$, x&, y&, xx&, yy&, style&, exstyle&, TO nDlg
                    Both are modal.

                    I guess because I made the owner of the second window the first window, it automatically became a child of the first. I'll play with it a bit and see what I can come up with. Perhaps, Michael, just making the second modeless will cure the problem.
                    Walt Decker

                    Comment


                    • #11
                      Modal means here that the last window being made modal is enabled.
                      A reference to a parent does not mean it will be a child but the new window will remain above that one.
                      Side effect is that due modal the 'parent' will be made disabled.
                      (This is not the case in SDK mode)

                      Yes, if you need user interaction in two windows at the same time, you'll need to make all windows modeless except one to handle the messages.
                      hellobasic

                      Comment


                      • #12
                        Side effect is that due modal the 'parent' will be made disabled.
                        (This is not the case in SDK mode)
                        Actually it is the case if you make modal dialog using DialogBox[Param][Indirect]. 'hOwner' is disabled.
                        Michael Mattias
                        Tal Systems Inc. (retired)
                        Racine WI USA
                        [email protected]
                        http://www.talsystems.com

                        Comment

                        Working...
                        X