Can anyone advise - I have a class which I want to convert into a DLL.
The class monitors the position, window state/size of another application which is running. Whenever the monitored application is resized, is minimized restored or maximized the class raises an event. I think I know how to map the class's functions in the DLL but I cannot see how I can do the events. I considered using Window messaging but that can only pass a message number whereas I would prefer to pass parameters with the event. I also couldn't figure out how to implement it in the DLL anyway. If I assign the class event to a procedure which posts a windows message I get a compiler error "Method Pointer and Regular procedure" on the line where the assignment is made. I have done the assignments in the DLLMain routine. e.g ideWindowProp := cWinProperties.Create(MONITORPROG,20); wm_notify_WinProp_Num := RegisterWindowMessage('WM_NOTIFY_WINPROP'); with ideWindowProp do begin On_ApplWindowChange := AppWinChange; // get errors on each assign line On_MainFormChange := MainFormWinChange; On_EditWindowChange := EditWinChange; On_ExplWindowChange := ExplWinChange; On_ResultsWindowChange := ResultsWinChange; On_Appl_StateChange := AppStateChange; end; Question I have is am I going about it the right way or is there a better way? If this is a reasonable way what am I doing wrong. John Barrat _______________________________________________ Delphi mailing list Delphi@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi