Current location - Plastic Surgery and Aesthetics Network - Jewelry brand - The problem that Tip cannot be assigned variable constants when delphi marks the tray as a module
The problem that Tip cannot be assigned variable constants when delphi marks the tray as a module
Process p _ notifyicon _ add (pwnd: cardinal; PuID: integer; PuCallMsg: cardinal; Picon: cardinal; PTip: char of array [0..63] (see hint that it is such a type);

Change this to:

Process p _ notifyicon _ add (pwnd: cardinal; PuID: integer; PuCallMsg: cardinal; Picon: cardinal; PTip:Pchar);

Then there is the assignment of this sentence:

notifyicon . SZ tip:= PTip; //'gadget set';

Change to:

move(ptip^,notifyicon.sztip,64);

That should do it. When you adjust it, just send a "gadget set".

In addition: it is not good for you to put it in one unit. If you can, you'd better write it as a control. However, the third-party pallet control has existed for a long time, and all versions above Delphi2006 will have their own pallet control. So you can repackage your own learning and use Delphi components directly.