ChristianB, you still around? Got to doing the TrayIcon work

Hi Alec, I'm sorry I'm just now getting this. I never look at that top line that says how many private messages I have :). Did you ever figure this out? I can send you a working Delphi 6 tray application. Send me a private message with your...




Topic Options
#142726 - 07/31/04 07:24 AM ChristianB, you still around? Got to doing the TrayIcon work
Christianb Offline
old hand

Registered: 11/10/01
Posts: 759
Hi Alec,
I'm sorry I'm just now getting this. I never look at that top line that says how many private messages I have smile. Did you ever figure this out? I can send you a working Delphi 6 tray application. Send me a private message with your e-mail and I'll fly the source code your way. Hey by the way I learned two obscure languages PowerBASIC and RealBasic, both are very cool offer distinct advantages over VB6 or VB.net. I wrote a PowerBASIC app whose source code is 114KB, artwork another 14KB, and still the standalone executable is only 70KB! RealBasic can compile from windows 4 different exes in succession Win32, Linux, Mac OSX, & Mac OS 7-9. All of the exes are standalone too! It's very similar to VB which is nice, whereas PowerBASIC is very similar to procedural C++.
Cheers,
Christian Blackburn

Top
Advertisement
#142729 - 07/31/04 08:28 AM Re: ChristianB, you still around? Got to doing the TrayIcon work
Christianb Offline
old hand

Registered: 11/10/01
Posts: 759
Hi Alec,
Okay I took a look at your code. This is probably wrong:

lngOriginal_Window_Procedure:=GetWindowLong(Application.Handle,1);

In my example the way you get the handle of the original window procedure should be by usurping it. However if your original window procedure doesn't need to subclassed (overridden) then that is okay.

You may want to re-read my example and make sure that any time I make an API call you do to!

If you can't recognize a command, then it's probably a windows API command. Reference your Win32.hlp file:
"C:\Program Files\Common Files\Borland Shared\MSHelp\WIN32.HLP"
to see whether or not a particular command is an API call.

Once you think you're properly intercepting the Window's Event Handling procedure, you'll want to send a test message to it and process the test message. So from another program send something like
(note lngWindow_Handle is the handle of the Window [not the windows event handler] or your application if it's entirely procedural)

SendMessage lngWindow_Handle, WMUSER + 501, 0, 0

Then from your window handling procedure you'll want to check for a WMUSER+501 message and when you receive it display a messagebox so you know you received it properly. As for the + 501, check the help file and make sure my recommendation is beyond the range of the Common Controls library. This can be found by using the aforementioned help file and looking up WM_USER.

If you don't know how to find the handle of another program, you'll want to use FindWindow a windows api call. If you don't know how to find the classname of a window use Spy++.

Good Luck,
Christian Blackburn

Top


Forums
Windows Support Forums
Everything New Technology
Legacy OS
Hardware
Software
Games
Networking
Customization & Tweaking
Security

Linux Support Forums
Everything Linux
Linux Hardware
Linux Software
Linux Games
Linux Networking
Linux Customization & Tweaking
Linux Security

Apple Support Forums
Everything Apple
Recent Topics
How to convert and edit video among popular video
by chuckbass912
3 minutes 4 seconds ago
LinkSys Router: Internet Access Issue
by Myke
Yesterday at 10:48 PM
BSOD: IRQL_not_less_or_equ
al

by baharkhafan
01/04/10 07:35 PM
8 Bit Palleted Textures
by Pookie_Lestat
01/04/10 04:50 PM
Carmageddon 2 weird
by Kuikie
12/29/09 04:32 PM
Who's Online
1 Registered (chuckbass912), 161 Guests and 47 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
91454 Members
24 Forums
59554 Topics
190096 Posts

Max Online: 1079 @ 03/12/08 01:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22