Hallo,
ich will den Vista TaskDialog benutzen und nehme als Einstieg den Code von romber
Delphi-Quellcode:
begin
DLLHandle := LoadLibrary('comctl32.dll');
if DLLHandle >= 32 then
begin
@TaskDialogProc := GetProcAddress(DLLHandle,'TaskDialog');
if Assigned(TaskDialogProc) then //<xxxxxxxxx
begin
beep;
StringToWideChar(ATitle, wTitle, sizeof(wTitle));
StringToWideChar(ADescription, wDescription, sizeof(wDescription));
StringToWideChar(AContent, wContent, sizeof(wContent));
TaskDialogProc(AForm.Handle, 0, wTitle, wDescription, wContent, Buttons,Icon,@res);
Result := mrOK;
case res of
DLGRES_CANCEL : Result := mrCancel;
DLGRES_RETRY : Result := mrRetry;
DLGRES_YES : Result := mrYes;
DLGRES_NO : Result := mrNo;
DLGRES_CLOSE : Result := mrAbort;
end;
end;
FreeLibrary(DLLHandle);
end;
end
Ich schreibt, es klappt wunderbar. Bei mir tut sich gar nichts. Comctl32.dll wird geladen aber "TaskDialog" darin wohl nicht gefunden. Siehe dort <xxxxxxxx. Was mache ich falsch?.
MfG Willie