Announcement

Collapse
No announcement yet.

%mm_mcinotify

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

  • %mm_mcinotify

    Hi,

    Been looking around the forum but cant find the answer.

    Can I include a value in the call of

    MCISENDSTRING( "play mp3 notify", "", 0, hDlg )

    So if I'm playing 2 mp3 files and can tell which one has finished

    CASE %MM_MCINOTIFY

    IF CBWPARAM = %MCI_NOTIFY_SUCCESSFUL THEN

    ?????

    END IF
    Last edited by Steve Bouffe; 6 Jan 2012, 08:42 AM.

  • #2
    >MCISENDSTRING( "play mp3 notify", "", 0, hDlg )



    Perhaps you could create a separate callback window (not visible, or a message-only window) for each separate string and use the callback param of the MciSendString() function....

    hwndCallback
    Handle to a callback window if the "notify" flag was specified in the command string.
    ... and when you get called back that playing completed you'll know which string has completed....

    ???

    MCM
    Michael Mattias
    Tal Systems Inc.
    Racine WI USA
    mmattias@talsystems.com
    http://www.talsystems.com

    Comment


    • #3
      Thaks for the suggestion.

      I added the following

      Code:
      FUNCTION MCI_Notify_Dialog_Init AS LONG
      
      LOCAL hDlg AS LONG
      
      DIALOG NEW 0, "", - 100, - 100, 1, 1 , TO MCI_NotifyDlgHan_GL
      
      DIALOG SHOW MODELESS MCI_NotifyDlgHan_GL, CALL MCI_Notify_Proc
      
      END FUNCTION
      
      CALLBACK FUNCTION MCI_Notify_Proc AS LONG
      
      SELECT CASE AS LONG CBMSG
      
      CASE %MM_MCINOTIFY
      
      IF CBWPARAM = %MCI_NOTIFY_SUCCESSFUL THEN
      
      POSTMESSAGE EposDlgHan_GL, %WM_USER + 102, 0, 0
      
      END IF
      
      END SELECT
      
      END FUNCTION
      This works fine but whats a "message-only window" ?

      Comment


      • #4
        Originally posted by Steve Bouffe View Post
        This works fine but whats a "message-only window" ?
        A window which is only used to process callback messages and which the user doesn't see or interact with in any way ( Hence your negative screen co-ordinates and 1 pixel size).
        --
        [URL="http://www.camcopng.com"]CAMCo - Applications Development & ICT Consultancy[/URL][URL="http://www.hostingpng.com"]
        PNG Domain Hosting[/URL]

        Comment


        • #5
          A message-only window is created by specifying certain values in the hWndParent param of your call to CreateWindowEx:
          hWndParent
          [in] Handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows.
          Windows 2000/XP: To create a message-only window, supply HWND_MESSAGE or a handle to an existing message-only window.
          MCM
          Michael Mattias
          Tal Systems Inc.
          Racine WI USA
          mmattias@talsystems.com
          http://www.talsystems.com

          Comment


          • #6
            To amplify MCMs comment:
            Message-Only Windows

            A message-only window enables you to send and receive messages. It is not visible, has no z-order, cannot be enumerated, and does not receive broadcast messages. The window simply dispatches messages.
            To create a message-only window, specify the HWND_MESSAGE constant or a handle to an existing message-only window in the hWndParent parameter of the CreateWindowEx function. You can also change an existing window to a message-only window by specifying HWND_MESSAGE in the hWndNewParent parameter of the SetParent function.
            To find message-only windows, specify HWND_MESSAGE in the hwndParent parameter of the FindWindowEx function. In addition, FindWindowEx searches message-only windows as well as top-level windows if both the hwndParent and hwndChildAfter parameters are NULL.
            It appears to work the same with DDT created dialogs if you use the constant %HWND_MESSAGE.
            Last edited by Stuart McLachlan; 8 Jan 2012, 05:54 PM.
            --
            [URL="http://www.camcopng.com"]CAMCo - Applications Development & ICT Consultancy[/URL][URL="http://www.hostingpng.com"]
            PNG Domain Hosting[/URL]

            Comment

            Working...
            X