* * *

Author Topic: [solved] Shell_NotifyIcon which overloaded function do I have to take  (Read 249 times)

HobbyDev

  • New member
  • *
  • Posts: 6
Hi all,

I am switching from an old Delphi Version to Lazarus. While compiling my app I get an error message saying Can't determine which overloaded function to call at this line
Code: Pascal  [Select]
  1. Shell_NotifyIcon(NIM_ADD, @TrayIconData);
The TrayIconData is defined in the private area of the Form as
Code: Pascal  [Select]
  1. TrayIconData     : TNotifyIconData;

I just don't know what to do in this case.

Any help would be helpful!
Regards HobbyDev
« Last Edit: March 21, 2017, 08:53:14 pm by HobbyDev »

GetMem

  • Hero Member
  • *****
  • Posts: 1956
Re: Shell_NotifyIcon which overloaded function do I have to take
« Reply #1 on: March 21, 2017, 06:19:14 am »
Hi HobbyDev,

Welcome to the forum. Add shellapi to the interface section, declare TrayIconData as
Code: Pascal  [Select]
  1. TrayIconData: TNotifyIconDataW;
then call it like this:
Code: Pascal  [Select]
  1. Shell_NotifyIconW(NIM_ADD, @TrayIconData);

regards,
GetMem

HobbyDev

  • New member
  • *
  • Posts: 6
Re: Shell_NotifyIcon which overloaded function do I have to take
« Reply #2 on: March 21, 2017, 08:52:43 pm »
 :) Many Thanks for the quick response! Will see, how it works if I got rid of all the compiler errors, this error message is gone!

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus