How to find out a window is being dragged by titlebar - OS2

This is a discussion on How to find out a window is being dragged by titlebar - OS2 ; Hi, perhaps this is simple, but I can't figure this out by using obvious logic. I have a multithread PM process, it's classic: one thread to handle PM stuff, another one doing "lengthy operations" to not violate 0.1 second rule. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to find out a window is being dragged by titlebar

  1. How to find out a window is being dragged by titlebar

    Hi,

    perhaps this is simple, but I can't figure this out by using obvious
    logic. I have a multithread PM process, it's classic: one thread to
    handle PM stuff, another one doing "lengthy operations" to not violate
    0.1 second rule. However I want to stop the processing thread while main
    window's titlebar is clicked-on-and-held by user, until the user
    releases the mouse button.
    I thought this would be rather simple - subclass titlebar and if you get
    mouse button down message, do DosSuspendThread(), if you get mouse
    button up message, do DosResumeThread. However, it seems like titlebar
    is not receiving any mouse button up message. How can I detect the user
    released the mouse button (and the tracking stopped - however, I have no
    interest in tracking results)?
    The docs always speak about the beginning of tracking operation. However
    the end of it is nowhere mentioned.

    Cheers,
    Martin

  2. Re: How to find out a window is being dragged by titlebar

    Hi,

    maybe you have to subclass the frame window.
    I think there is something like WM_TRACKFRAMERECT message that could help
    you to find out when tracking starts and when tracking ends. Look up the
    info for WM_TRACKFRAMERECT in the PM Programming Guide.

    Lars

    "MMI" schrieb im Newsbeitrag
    news:c1.2b5.2v2STt$07Q@news.consultron.ca...
    > Hi,
    >
    > perhaps this is simple, but I can't figure this out by using obvious
    > logic. I have a multithread PM process, it's classic: one thread to handle
    > PM stuff, another one doing "lengthy operations" to not violate 0.1 second
    > rule. However I want to stop the processing thread while main window's
    > titlebar is clicked-on-and-held by user, until the user releases the mouse
    > button.
    > I thought this would be rather simple - subclass titlebar and if you get
    > mouse button down message, do DosSuspendThread(), if you get mouse button
    > up message, do DosResumeThread. However, it seems like titlebar is not
    > receiving any mouse button up message. How can I detect the user released
    > the mouse button (and the tracking stopped - however, I have no interest
    > in tracking results)?
    > The docs always speak about the beginning of tracking operation. However
    > the end of it is nowhere mentioned.
    >
    > Cheers,
    > Martin




+ Reply to Thread