DLL中如下:
WM_MYMESSAGE=WM_USER+124;
hHandle:HWND;
hHandle:=FindWindow('TForm1','Form1')
//你的主窗体类名和窗体名
isOk:=PostMessage(hHandle,WM_MYMESSAGE,aValue,0);
主窗体中如下:
WM_MYMESSAGE=WM_USER+124;
private:
procedure WMCOMMNOTIFY(var MyMsg :TMessage);message WM_MYMESSAGE ;
procedure WMCOMMNOTIFY(var MyMsg :TMessage);message WM_MYMESSAGE ;
begin
if MyMsg=WM_MYMESSAGE then begin
value:=Message.WParam;
//Value为你需要的值
end
end;
随手写的,没有思路,见谅。