[fpc-pascal] Windows API translation - or better way to update system tray?

2011-10-09 Thread Reinier Olislagers
Hi all, (See http://lazarus.freepascal.org/index.php/topic,14847.msg79038.html#msg79038 for initial question) My program starts and stops external programs that have icons. It would be nice to immediately clean up the icons from the system tray once those programs have stopped. I've found this

Re: [fpc-pascal] Windows API translation - or better way to update system tray?

2011-10-09 Thread Sven Barth
On 09.10.2011 13:42, Reinier Olislagers wrote: However compiler errors on the 2nd nil: (nil,nil,'Shell_TrayWnd', ''),nil,'TrayNotifyWnd', Error: Incompatible type for arg no. 2: Got Pointer, expected LongWord Should I just pass 0 to those functions or bogus HWNDs... or do something else?

Re: [fpc-pascal] Windows API translation - or better way to update system tray?

2011-10-09 Thread Reinier Olislagers
On 9-10-2011 14:17, Sven Barth wrote: That's not C++, but C, but in both NULL can be used for both: pointers and ordinals. In Pascal HWND is an ordinal and there the correct equivalent is of course 0. So yes, you should use 0. Maybe you'll need to do this for the first param as well. Just goes