Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Аватара для El Sanchez

Ветеран


Contributor


Сообщения: 1274
Благодарности: 1030

Профиль | Отправить PM | Цитировать


Цитата habib2302:
мне кто нибудь ответит на мое сообщение???? »
habib2302, на основе примера из шапки:
Код: Выделить весь код
const
    WM_CLOSE = $0010;

function SetTimer(hWnd: HWND; nIDEvent: UINT_PTR; uElapse: UINT; lpTimerFunc: Longint): UINT_PTR; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: HWND; uIDEvent: UINT_PTR): BOOL; external 'KillTimer@user32.dll stdcall';

var
    iTimer: UINT_PTR;

//////////////////////////////////////////////////////////////////////////////
procedure TimerProc(hwnd: HWND; uMsg: UINT; idEvent: UINT_PTR; dwTime: DWORD);
var
    hWindow: HWND;
begin
    hWindow := FindWindowByWindowName(FmtMessage(SetupMessage(msgUninstallAppFullTitle), ['{#SetupSetting("AppName")}']));
    if hWindow > 0 then
    begin
        PostMessage(hWindow, WM_CLOSE, 0, 0);
        KillTimer(0, iTimer);
    end;
end;

////////////////////////////////////////////////////////////////////
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
    case CurUninstallStep of
        usPostUninstall: iTimer := SetTimer(0, 0, 50, CallbackAddr('TimerProc'));
    end;
end;
Это сообщение посчитали полезным следующие участники:

Отправлено: 22:12, 04-06-2013 | #573