Announcement

Collapse
No announcement yet.

MDIGETACTIVE

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

  • MDIGETACTIVE

    Hello,

    Does anyone know if the wm_mdigetactive message really returns the active
    child window of an mdi app?

    I have tried it for both MSWord and PowerBasic MDI's and keep getting zero(handle)
    as the active child. Maybe the client is wrong but when I enum the children of the
    MSWord client I do get the actual document sheets plus alot of other window controls.
    I'm just trying to isolate the actual current sheet document of sheet of a MDI app.

    According to the sendmessage docs it works if whether I'm the current thread or not.

    Basically I'm looking for a consistent way to determine an MDI app and it's children(sheets)
    that are open.

    Thanks.

  • #2
    Thad,

    Does anyone know if the wm_mdigetactive message really returns the active child window of an mdi app?
    Yes, it works just fine. There are actually two ways to do this as follows:
    Code:
    FUNCTION MdiGetActive(BYVAL hClient AS LONG) AS LONG
      FUNCTION = SendMessage(hClient, %WM_MDIGETACTIVE, 0, 0)
    END FUNCTION
    Via the wrapper fn in mdi.inc file and the more traditional way

    hMDIChild = SendMessage(hClient, %WM_MDIGETACTIVE, 0, 0)

    Hope this helps some!!!

    Cecil

    ------------------




    [This message has been edited by Cecil Williams (edited April 26, 2000).]

    Comment

    Working...
    X