Click to See Complete Forum and Search --> : Message Handling
faisalkm
Nov 27th, 2000, 05:10 AM
Hey
I want to add a menu to another application and handle the messages here in vb . can i do it?. I was able to add a menu but not handle it?
Faisal
tumblingdown
Nov 27th, 2000, 08:18 AM
You've found you can AppendMenu, but when you SetWindowLong (with the other apps window hwnd, and your WindowProc) is returning zero - correct?
You will need to use Hooks to respond to the WM_SYSCOMMAND from the other app. You cannot do this in VB, as you need to create a dll (c++) that is injected into a foreign process space. Once you have this dll, it can call your custom window proc (as in normal subclassing). After your processing, your proc uses the dll to pass back to any other Global Hooks knocking around.
td.
faisalkm
Nov 27th, 2000, 08:33 AM
Hey,
Thnks for the information. Could u tell me how can i create this dll or there is a readymade one?
Faisal
tumblingdown
Nov 27th, 2000, 08:48 AM
I can recomend a v.good book.
Win32 API Programming with Visual Basic. (O'Reilly, ISBN 1-56592-631-5).
To start friggin around with this kind of stuff, really does take balls, you will need a reference like this to do it (This is the kind of stuff that can give Dan Appleman a bad day). It is written by a guy called Steven Roman.
It comes with a dll to do what you want to do, and examples.
td.
faisalkm
Nov 28th, 2000, 05:03 AM
Hey,
I'm in a project regarding this. No time to buy a book..I hope u understand my situation. Could u guide me where could i get this dll?
Faisal
tumblingdown
Nov 28th, 2000, 06:02 AM
I can send you the dll. But i really recomend you DON'T try this stuff without reading up on it. It's not just a question of using the DLL, you really have to know stuff that's going on under the hood.
td.
faisalkm
Nov 28th, 2000, 06:56 AM
Nice to hear that you have the dll. I know i may jump into foolishness if i do it without learning it very well. So what to do? The deadline is looking at me...I hope i have good understanding of message subclassing. will this help doing that..please help...now u r the only one who can help me..if u could do some help on how to use this dll then i would be very thankful to u
Faisal
tumblingdown
Nov 28th, 2000, 08:00 AM
i'm facing deadlines myself (already missed one). I know how your position. If you know subclassing, then you should be able to digest the two chapters in an hour. Amazon should be able to deliver within a day...
I can mail you dll if you want, but your on your own (at least till i'm not so busy).
td.
PT Exorcist
Oct 15th, 2003, 08:43 AM
i would like to get it? could you plz send me to port_branco@hotmail.com?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.