Announcement

Collapse
No announcement yet.

Send Another PB Win Dialag A Message

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

  • Send Another PB Win Dialag A Message

    I have the handle of another active windows dialog In my PBCC program and I want to send a message to it. Whats the equivalent to this is PBCC?

    DIALOG POST hDlg, %DIALOG_POST_Play_Message_Received, 0, 0

    The worker program is generating a report and ideally I need to message the PB Win app a file name so it can alert the user to view it.

  • #2
    Use the API.

    In WinUser.inc are SendmessageA, SendmessageW, PostmessageA and PostmessageW.Why A and W versions I do not know because there are only 4 dword parameters (hWin, Msg, wParam, lParam), no strings.
    Dale

    Comment


    • #3
      Steve,
      The equivalent is this ...

      Code:
      PostMessage hDlg, %Dialog_Post_Play_Message_Received, 0,0
      Is the receiving window an app of yours, such that the value of %Dialog_Post_Play_Message_Received is known?

      Comment


      • #4
        Dale asked about a string, but I assume your use of "message " only means to send a value to which the receiving app can respond.

        There are ways to send a text strings - some recent threads on that - but I don't think you meant that, did you?

        Comment


        • #5
          No I didn't. I asked why "A" and "W" SendMessage and PostMessage when no strings involved.
          Dale

          Comment


          • #6
            As a guess, the A/W variations might be because for some messages, the wParam and lParam can be pointers to structures that do have strings therein
            There are only two speeds for computers: fast enough, and too bloody slow.
            And there are 10 types of programmer -- those that know binary, and those that don't.

            Comment


            • #7
              Previous discussion and explanation here:
              https://forum.powerbasic.com/forum/u...of-sendmessage

              Comment


              • #8
                You might also be interested in pbcc60\samples\internet\tcp\echoserv.bas
                It creates a GUI window and callback function to receive event notification messages
                https://duckduckgo.com instead of google

                Comment


                • #9
                  Thanks Gary,

                  Yes I'm going to add a vales to the postmessage that references a file for the other application to read.

                  Comment

                  Working...
                  X