Tema: MessageBox
Ver Mensaje Individual
  #3  
Antiguo 19-08-2003
Avatar de delphi.com.ar
delphi.com.ar delphi.com.ar is offline
Federico Firenze
 
Registrado: may 2003
Ubicación: Buenos Aires, Argentina *
Posts: 5.932
Reputación: 27
delphi.com.ar Va por buen camino
Particularmente yo me he hecho mi propia versión de la función que no hace mas que llamar a MessageBox, y recibe strings en sus parámetros... Sinceramente la hice porque yo era un programador de VB, y estaba muy acostumbrado a MsgBox....
Código:
function MsgBox(AMessage: String; AType: Integer = MB_OK; ACaption: String = ''): Integer;
begin
  if ACaption = '' Then
     ACaption := Application.Title ;

  Result := MessageBox(GetActiveWindow, PChar(AMessage), PChar(ACaption), AType);
end;

function MsgBoxFmt(AMessage : String; Params: array of const; AType : Integer = MB_OK; ACaption : String = #0): Integer;
begin
  Result := MsgBox(Format(AMessage, Params), AType, ACaption);
end;
Saludos!
__________________
delphi.com.ar

Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla.
Responder Con Cita