SendNotifyMessage() - Not working?

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

    #1

    SendNotifyMessage() - Not working?

    I need to update a VB6 label, with information showing progress of some
    processing being carried out in a C DLL.

    Basically, I want my C function to be able to write messages back to
    VB6, which will then display the message in a label. I am subclassing
    the form that contains the label to be updated (and passing its hWnd to
    the C DLL), I then have a C function like this:


    void writeGUIMessage (const char* msg)
    {
    SendNotifymessa ge(g_hWnd, WM_SETTEXT, 0, (LPARAM)msg);
    }


    This is not working - any idea why ?


    Note: My Subclassing function stores the form Hwnd into the variable g_hWnd


  • Cor Ligthert[MVP]

    #2
    Re: SendNotifyMessa ge() - Not working?


    "Anonymous" <no.reply@here. comschreef in bericht
    news:5YydnVAbco asKkfbnZ2dnUVZ8 tninZ2d@bt.com. ..
    >I need to update a VB6 label, with information showing progress of some
    >processing being carried out in a C DLL.
    >
    Basically, I want my C function to be able to write messages back to VB6,
    which will then display the message in a label. I am subclassing the form
    that contains the label to be updated (and passing its hWnd to the C DLL),
    I then have a C function like this:
    >
    >
    void writeGUIMessage (const char* msg)
    {
    SendNotifymessa ge(g_hWnd, WM_SETTEXT, 0, (LPARAM)msg);
    }
    >
    >
    This is not working - any idea why ?
    >
    >
    Note: My Subclassing function stores the form Hwnd into the variable
    g_hWnd
    >
    >

    Comment

    • Cor Ligthert[MVP]

      #3
      Re: SendNotifyMessa ge() - Not working?

      Hi,

      As the name of this newsgroup says, it is for dotNet programming. VB6 is no
      dotNet programming, the newsgroup for those you can find as:

      news:\\Microsof t.public.vb.Gen eraldiscussions

      Cor

      "Anonymous" <no.reply@here. comschreef in bericht
      news:5YydnVAbco asKkfbnZ2dnUVZ8 tninZ2d@bt.com. ..
      >I need to update a VB6 label, with information showing progress of some
      >processing being carried out in a C DLL.
      >
      Basically, I want my C function to be able to write messages back to VB6,
      which will then display the message in a label. I am subclassing the form
      that contains the label to be updated (and passing its hWnd to the C DLL),
      I then have a C function like this:
      >
      >
      void writeGUIMessage (const char* msg)
      {
      SendNotifymessa ge(g_hWnd, WM_SETTEXT, 0, (LPARAM)msg);
      }
      >
      >
      This is not working - any idea why ?
      >
      >
      Note: My Subclassing function stores the form Hwnd into the variable
      g_hWnd
      >
      >

      Comment

      • Newbie Coder

        #4
        Re: SendNotifyMessa ge() - Not working?

        Anonymous,

        Is this a MFC DLL or not?

        SendNotifyMessa ge returns a boolean value not null

        See:

        http://msdn2.microsoft.com/en-us/library/ms644953.aspx

        But maybe SendMessageCall Back will be better:

        http://msdn2.microsoft.com/en-us/library/ms644951.aspx

        You can also post your DLL question to:

        microsoft.publi c.dotnet.langua ges.vc

        but remember just to mention its unmanaged & whether or not it MFC or not

        --
        Newbie Coder
        (It's just a name)



        "Anonymous" <no.reply@here. comwrote in message
        news:5YydnVAbco asKkfbnZ2dnUVZ8 tninZ2d@bt.com. ..
        I need to update a VB6 label, with information showing progress of some
        processing being carried out in a C DLL.
        >
        Basically, I want my C function to be able to write messages back to
        VB6, which will then display the message in a label. I am subclassing
        the form that contains the label to be updated (and passing its hWnd to
        the C DLL), I then have a C function like this:
        >
        >
        void writeGUIMessage (const char* msg)
        {
        SendNotifymessa ge(g_hWnd, WM_SETTEXT, 0, (LPARAM)msg);
        }
        >
        >
        This is not working - any idea why ?
        >
        >
        Note: My Subclassing function stores the form Hwnd into the variable g_hWnd
        >
        >

        Comment

        Working...