www.pudn.com > wqgame.zip > UnDlgShell.pas


unit UnDlgShell; 
 
interface 
  function Ask(str :string):Boolean; 
  procedure ShowError(str :string); 
  procedure ShowInfo(str :string); 
 
implementation 
 
uses 
  SysUtils, Windows; 
 
const 
  conCaption = 'ÎÆèÒ'; 
 
function Ask(str :string):Boolean; 
var 
  pszStr :PChar; 
begin 
  pszStr:=StrAlloc(256); 
  pszStr:=StrPCopy( pszStr, str + '£¿' ); 
  Result := MessageBox( 0, pszStr, conCaption, 
              MB_YESNO + MB_ICONQUESTION + MB_TASKMODAL ) = IDYES; 
  StrDispose(pszStr); 
end; 
 
procedure ShowError(str :string); 
var 
  pszStr :PChar; 
begin 
  pszStr:=StrAlloc(256); 
  pszStr:=StrPCopy( pszStr, str + '£¡' ); 
  MessageBox( 0, pszStr, conCaption, 
              MB_OK + MB_ICONSTOP + MB_TASKMODAL ); 
  StrDispose(pszStr); 
end; 
 
procedure ShowInfo(str :string); 
var 
  pszStr :PChar; 
begin 
  pszStr:=StrAlloc(256); 
  pszStr:=StrPCopy( pszStr, str + '¡£' ); 
  MessageBox( 0, pszStr, conCaption, 
              MB_OK + MB_ICONINFORMATION + MB_TASKMODAL ); 
  StrDispose(pszStr); 
end; 
 
end.