Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
function DlgFunc(hwnd: HWND; umsg: UINT; wparam: WPARAM; lparam: LPARAM): BOOL;
stdcall;
begin
Result := True;
case umsg
of
WM_INITDIALOG:
begin
SetDlgItemText(hwnd, 1001, '
Here the text will be received')
end;
WM_CLOSE:
begin
end;
WM_COMMAND:
else
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
DialogBoxParam(hInstance, MakeIntResource(1001), 0, @dlgfunc, 0);
end;
end.
IMHO müsste es so aussehen damit überhaupt etwas aufgerufen wird, aber wo ruftst du die Funktion DlgFunc auf?
wird die in DialogBoxParam aufgerufen?