Ver Mensaje Individual
  #3  
Antiguo 24-10-2014
gonzalovw gonzalovw is offline
Registrado
NULL
 
Registrado: oct 2014
Posts: 2
Reputación: 0
gonzalovw Va por buen camino
Ahi lo solucione!

En donde capturo todos lo eventos le agregue lo siguiente:

Código Delphi [-]
Case Msg.message of
    WM_MBUTTONDOWN:

Ahi capturo el click del boton del medio y luego ejecuto el click del boton!

Código Delphi [-]
procedure TfPrincipal.eventosMessage(var Msg: tagMSG; var Handled: Boolean);
var
  err: EdsError;
  archivo,archivoRaw,extFile,destino: string;
begin
  Handled := false;
  //if (Msg.message = WM_CANCELJOURNAL) and FHookStarted then
  //  JHook := SetWindowsHookEx(WH_JOURNALRECORD, @JournalProc, 0, 0);
  Case Msg.message of
    WM_MBUTTONDOWN:
      begin
        if bCapturar.Enabled then
          bCapturar.Click
      end;
    WM_USER + 1: { Property Event occurred } // Por ahora no manejo los cambios de propiedades
      begin
        if Msg.wParam = kEdsPropertyEvent_PropertyChanged then
        // get property
        begin
          FAppMaster.getProperty(Msg.lParam);
          // UpdateProperty( Msg.lParam );
          Handled := true;
        end;

        if Msg.wParam = kEdsPropertyEvent_PropertyDescChanged then
        // get property desc
        begin
          FAppMaster.getPropertyDesc(Msg.lParam);
          // UpdatePropertyDesc( Msg.lParam );
          Handled := true;
        end;
      end;

    WM_USER + 2: { Object Event occurred }
      begin
        archivo := 'ImgTmp' + IntToStr(camActiva) + '.jpg';
        archivoRaw := 'RawTmp' + IntToStr(camActiva) + '.cr2';
        err := FAppMaster.getImageData(EdsBaseRef(Msg.lParam), pTemp, archivo, archivoRaw, extFile);
        if extFile = '.CR2' then
              procesarImagenRecibidaRaw(archivoRaw, camActiva, nFoto);
        Application.ProcessMessages;
        if err <> EDS_ERR_OK then
          MessageDlg('Error en la recepción de imagen (' + IntToStr(err) + ')',
            mtError, [mbOk], 0)
        else
        begin
          if not enCaptura then
          begin
// no hace nada... esto deberia eliminar los disparos manuales...
          end
          else
          begin
            if not enTest and not enRepeticion then
              nFoto := nFoto + 1;
            procesarImagenRecibida(archivo, camActiva, nFoto);
          end;
        end;
        enCaptura := false;
        Handled := true;
      end;

    WM_USER + 3: { Progress callback event }
      begin
        ajustarProgreso(Msg.wParam);
        Handled := true;
      end;
  end;

end;

Saludos!
Gracias!!

Última edición por roman fecha: 24-10-2014 a las 15:58:04. Razón: Etiquetas [delphi]
Responder Con Cita