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?
(If you haven't figured it out by now, I understand C++ even less than
Pascal ;)
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.
As a sidenote: It's always good to inform oneself about the used
functions using MSDN. There you'd see what the meaning of "0" or "NULL"
in this function is. Here it is btw:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633500%28v=vs.85%29.aspx
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal