MCISendString

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis

    #1

    MCISendString

    I am trying to use the Notify Flag to send a message when a song is finished
    playing. I got it to work by setting up a dummy window and overriding it's
    WndProc procedure then raising an event in my application. This work great
    until I open a new window then the Notify message doesn't seem to trigger the
    WinProc procedure in my dummy window. I guess it's because another window
    has the focus...is there any other way I can intercept this message when the
    window or it's parent doesn't have the focus?

    Dennis in Houston
  • Dennis

    #2
    RE: MCISendString

    I got it to work. The sample code I was using had poorly constructed dispose
    methods and it was hanging up. Just one question though, if I have a routine
    like MciSendString that notifies a window when it's done by sending a message
    that window's handle and that window does not have the focus, will it still
    receive the message or will the message be qued until the window gets the
    focus?
    --
    Dennis in Houston


    "Dennis" wrote:
    [color=blue]
    > I am trying to use the Notify Flag to send a message when a song is finished
    > playing. I got it to work by setting up a dummy window and overriding it's
    > WndProc procedure then raising an event in my application. This work great
    > until I open a new window then the Notify message doesn't seem to trigger the
    > WinProc procedure in my dummy window. I guess it's because another window
    > has the focus...is there any other way I can intercept this message when the
    > window or it's parent doesn't have the focus?
    >
    > Dennis in Houston[/color]

    Comment

    • Mattias Sjögren

      #3
      Re: MCISendString

      >notifies a window when it's done by sending a message[color=blue]
      >that window's handle and that window does not have the focus, will it still
      >receive the message[/color]

      Yes.

      [color=blue]
      >or will the message be qued until the window gets the focus?[/color]

      The message is still queued, but when it will be retrieved from the
      queue doesn't have anything to do with whether or not the window has
      focus.



      Mattias

      --
      Mattias Sjögren [MVP] mattias @ mvps.org
      http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
      Please reply only to the newsgroup.

      Comment

      • Dennis

        #4
        Re: MCISendString

        Thanks. It seems to work that way but I wanted a "second" opinion from
        someone before I based my application design on this. Thanks again.
        --
        Dennis in Houston


        "Mattias Sjögren" wrote:
        [color=blue][color=green]
        > >notifies a window when it's done by sending a message
        > >that window's handle and that window does not have the focus, will it still
        > >receive the message[/color]
        >
        > Yes.
        >
        >[color=green]
        > >or will the message be qued until the window gets the focus?[/color]
        >
        > The message is still queued, but when it will be retrieved from the
        > queue doesn't have anything to do with whether or not the window has
        > focus.
        >
        >
        >
        > Mattias
        >
        > --
        > Mattias Sjögren [MVP] mattias @ mvps.org
        > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
        > Please reply only to the newsgroup.
        >[/color]

        Comment

        Working...