Posts

Showing posts with the label define

I am trying to force the tray icon to always show with Delphi.

I am trying to force the tray icon to always show with Delphi. I found that FASTCOPY dose it in c++. The source is at https://fastcopy.jp/archive/FastCopy351src.zip Now to the point i am trying to translate the code to pascal. The file is tmisc.cpp and in mainwin.cpp line 2885 it uses the function ForceSetTrayIcon Can any one help ? from tmisc.cpp class __declspec(uuid("FB852B2C-6BAD-4605-9551-F15F87830935")) ITrayNotify : public IUnknown { public: virtual HRESULT __stdcall RegisterCallback(INotificationCB *) = 0; virtual HRESULT __stdcall SetPreference(const NOTIFYITEM *) = 0; virtual HRESULT __stdcall EnableAutoTray(BOOL) = 0; }; class __declspec(uuid("D133CE13-3537-48BA-93A7-AFCD5D2053B4")) ITrayNotify8 : public IUnknown { public: virtual HRESULT __stdcall RegisterCallback(INotificationCB *, u_long *) = 0; virtual HRESULT __stdcall UnregisterCallback(u_long) = 0; virtual HRESULT __stdcall SetPreference(const NOTIFYITEM *) = 0; virtual HRESULT __stdcal...

If someone is interested how to use GCC preprocessor on Delphi source files. Too bad we can't do this in memory.

If someone is interested how to use GCC preprocessor on Delphi source files. Too bad we can't do this in memory. gcc -xc -E -P -C -traditional File1 > File2 BEFORE: program Project3; uses   System.SysUtils; #define DEBUG(x) {$IFDEF DEBUG}WriteLn(x);{$ENDIF} #define LOOP(A, B, C) for A := B to C do #define COMPARE(A, B) A B var   I: Integer; begin   LOOP(I,0,3)   begin     WriteLn(I);   end;   DEBUG('DEBUG..');   WriteLn(COMPARE(1,2));   Readln; end. AFTER: program Project3; uses   System.SysUtils; var   I: Integer; begin   for I := 0 to 3 do   begin     WriteLn(I);   end;   {$IFDEF DEBUG}WriteLn('DEBUG..');{$ENDIF};   WriteLn(1 2);   Readln; end.