Postmessage to VB


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Postmessage to VB

  1. #1
    Steve Guest

    Postmessage to VB


    Can a C++ DLL use PostMessage to send a message to a VB application that can
    act on this received message?

  2. #2
    Steve Guest

    Re: Postmessage to VB


    What about using GetMessage or PeekMessage?

    "Eduardo A. Morcillo" <e _ m o r c i l l o @ y a h o o . c o m> wrote:
    >> Can a C++ DLL use PostMessage to send a message to a VB application that

    >can
    >> act on this received message?

    >
    >Yes, it can. Depending on the message you are sending you may need to
    >subclass the form to get it.
    >
    >--
    >Eduardo A. Morcillo (MS MVP VB)
    >http://www.domaindlx.com/e_morcillo
    >
    >



  3. #3
    Eduardo A. Morcillo Guest

    Re: Postmessage to VB

    > Can a C++ DLL use PostMessage to send a message to a VB application that
    can
    > act on this received message?


    Yes, it can. Depending on the message you are sending you may need to
    subclass the form to get it.

    --
    Eduardo A. Morcillo (MS MVP VB)
    http://www.domaindlx.com/e_morcillo



  4. #4
    Mark Alexander Bertenshaw Guest

    Re: Postmessage to VB


    "Steve" <sa1lopez@hotmail.com> wrote:
    >"Eduardo A. Morcillo" <e _ m o r c i l l o @ y a h o o . c o m> wrote:
    >>> Can a C++ DLL use PostMessage to send a message to a VB application that

    >>can
    >>> act on this received message?

    >>
    >>Yes, it can. Depending on the message you are sending you may need to
    >>subclass the form to get it.


    >What about using GetMessage or PeekMessage?


    I thought that one only ever uses these functions in a message loop. And
    since a VB application already has its own message loop, this seems not to
    be a very good idea. Do subclassing - all the VB texts I have read recommend
    that, and it definitely works.

    --
    Mark Alexander Bertenshaw
    Programmer/Analyst
    Chordiant Software, Inc.
    Brentford
    UK

  5. #5
    Steve Guest

    Re: Postmessage to VB


    I need to act on messages at the highest point therefore, I don't think subclassing
    would be effective. Especially since I want to get messages regardless of
    which window is going to get the message. It is my understanding that to
    do this on a global basis, subclassing would be very awkward.

    "Mark Alexander Bertenshaw" <mark.bertenshaw@virgin.net> wrote:
    >
    >"Steve" <sa1lopez@hotmail.com> wrote:
    >>"Eduardo A. Morcillo" <e _ m o r c i l l o @ y a h o o . c o m> wrote:
    >>>> Can a C++ DLL use PostMessage to send a message to a VB application

    that
    >>>can
    >>>> act on this received message?
    >>>
    >>>Yes, it can. Depending on the message you are sending you may need to
    >>>subclass the form to get it.

    >
    >>What about using GetMessage or PeekMessage?

    >
    >I thought that one only ever uses these functions in a message loop. And
    >since a VB application already has its own message loop, this seems not

    to
    >be a very good idea. Do subclassing - all the VB texts I have read recommend
    >that, and it definitely works.
    >
    >--
    >Mark Alexander Bertenshaw
    >Programmer/Analyst
    >Chordiant Software, Inc.
    >Brentford
    >UK



  6. #6
    Juergen Thuemmler Guest

    Re: Postmessage to VB

    > be a very good idea. Do subclassing - all the VB texts I have read recommend
    > that, and it definitely works.


    Another way - without subclassing:
    www.allapi.net -> VB Tools -> CALLBACK

    Juergen.



  7. #7
    Steve Guest

    Re: Postmessage to VB


    I am currently using a callback in a C++ DLL. I need to get the resulting
    message back to my VB application where it can be processed. The utility
    that you recommended, which seems like it would be very useful, wouldn't
    help me (correct me if I'm wrong) since I'm using C++.

    "Juergen Thuemmler" <thue@gmx.de> wrote:
    >> be a very good idea. Do subclassing - all the VB texts I have read recommend
    >> that, and it definitely works.

    >
    >Another way - without subclassing:
    >www.allapi.net -> VB Tools -> CALLBACK
    >
    >Juergen.
    >
    >



  8. #8
    Juergen Thuemmler Guest

    Re: Postmessage to VB

    > I am currently using a callback in a C++ DLL. I need to get the resulting
    > message back to my VB application where it can be processed. The utility
    > that you recommended, which seems like it would be very useful, wouldn't
    > help me (correct me if I'm wrong) since I'm using C++.


    The Callback.dll is written in C and should only serve as a sample.
    Of course you can write a similar DLL in C++.

    Juergen.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center