Einzelnen Beitrag anzeigen

MathiasSimmack
(Gast)

n/a Beiträge
 
#2
  Alt 8. Jun 2002, 10:20
Machen wir nur noch die Erweiterung für NonVCL, denn mein Setup ist ein solches:
Delphi-Quellcode:
function cDownloadStatusCallback.OnProgress(ulProgress, ulProgressMax,
  ulStatusCode: ULONG; szStatusText: LPCWSTR): HResult;
var
  szST : string;
begin
  case ulStatusCode of
    BINDSTATUS_BEGINDOWNLOADDATA:
      begin
        // reset progressbar
        SendMessage(GetDlgItem(hDlg,IDC_PROGRESS),PBM_SETPOS,0,0);

        // show current action
        szST := szStatusText;
        SendMessage(GetDlgItem(hDlg,IDC_ACTIONTEXT),WM_SETTEXT,0,integer(szST));

        // download exit by the user?
        if(m_fUserCancel) then
          begin
            Result := E_ABORT; exit;
          end;
      end;
    BINDSTATUS_DOWNLOADINGDATA:
      begin
        // update progress
        SendMessage(GetDlgItem(hDlg,IDC_PROGRESS),PBM_SETPOS,MulDiv(ulProgress,100,ulProgressMax),0);

        // download exit by the user?
        if(m_fUserCancel) then
          begin
            Result := E_ABORT; exit;
          end;
      end;
    BINDSTATUS_ENDDOWNLOADDATA:
      SendMessage(hDlg,WM_CLOSE,0,0); // close Download dialog
  end;

  // message pump
  if(PeekMessage(msg,hDlg,0,0,PM_REMOVE)) then IsDialogMessage(hDlg,msg);

  Result := S_OK; // default result
end;
[edit=Chakotay1308]Auf das Wesentliche gekürzt. Mfg, Chakotay1308[/edit]
  Mit Zitat antworten Zitat