Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.04.15;
Скачать: CL | DM;

Вниз

MessageBox   Найти похожие ветки 

 
DelphiLexx ©   (2007-02-20 16:33) [0]

Можно ли в MessageBox задавать свои названия кнопок?


 
Сергей М. ©   (2007-02-20 16:34) [1]

Можно. Но не нужно.


 
DelphiLexx ©   (2007-02-20 18:11) [2]


> Можно. Но не нужно.

Как можно?


 
Loginov Dmitry ©   (2007-02-20 18:13) [3]

Написать свой MessageBox


 
webpauk   (2007-02-20 18:21) [4]

unit RusDlg;

interface

implementation

uses Classes, Forms, Consts, Dialogs; //, RtpCtrls;

resourcestring
   SMsgDlgRusWarning = "Предупреждение";
   SMsgDlgRusError = "Ошибка";
   SMsgDlgRusInformation = "Информация";
   SMsgDlgRusConfirm = "Подтверждение";
   SMsgDlgRusYes = "&Да";
   SMsgDlgRusNo = "&Нет";
   SMsgDlgRusOK = "OK";
   SMsgDlgRusCancel = "Отмена";
   SMsgDlgRusHelp = "&Помощь";
   SMsgDlgRusHelpNone = "Помощь недоступна";
   SMsgDlgRusHelpHelp = "Помощь";
   SMsgDlgRusAbort = "&Прервать";
   SMsgDlgRusRetry = "По&вторить";
   SMsgDlgRusIgnore = "&Игнорировать";
   SMsgDlgRusAll = "&Все";
   SMsgDlgRusNoToAll = "H&ет для Всех";
   SMsgDlgRusYesToAll = "Д&а для Всех";

const
   Captions: array[TMsgDlgType] of Pointer = (@SMsgDlgRusWarning,
   @SMsgDlgRusError,
   @SMsgDlgRusInformation, @SMsgDlgRusConfirm, nil);

   ButtonCaptions: array[TMsgDlgBtn] of Pointer = (
   @SMsgDlgRusYes, @SMsgDlgRusNo, @SMsgDlgRusOK, @SMsgDlgRusCancel,
   @SMsgDlgRusAbort,
   @SMsgDlgRusRetry, @SMsgDlgRusIgnore, @SMsgDlgRusAll, @SMsgDlgRusNoToAll,
   @SMsgDlgRusYesToAll,
   @SMsgDlgRusHelp);

procedure _ChangeCaptions(List: PPointerList;Last: Pointer);
var  i, Max: Integer;
      IsFind: Boolean;
begin
   Max := (Integer(Last)-Integer(List)) div SizeOf(Pointer);
   IsFind := False;
   for i := 0 to Max - 2 do
   if (List[i] = @SMsgDlgWarning) and (List[i+2] = @SMsgDlgInformation) then
     begin
      IsFind := True;
      break;
     end;
   if IsFind then Move(Captions, List[i], SizeOf(Captions));
   IsFind := False;
   for i := i to Max - 2 do
     if (List[i] = @SMsgDlgYes) and (List[i+2] = @SMsgDlgOK) then
       begin
         IsFind := True;
         break;
       end;
   if IsFind then Move(ButtonCaptions, List[i], SizeOf(ButtonCaptions));
end;

initialization
_ChangeCaptions(@DebugHook, @Application);
end.



Страницы: 1 вся ветка

Текущий архив: 2007.04.15;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.052 c
1-1171532879
MegaVolt
2007-02-15 12:47
2007.04.15
Как красиво отучить TSpeedButton рисовать себя в стиле WinXP


5-1151310743
georgius
2006-06-26 12:32
2007.04.15
Component has no parent window - отчего???


15-1174417424
TUser
2007-03-20 22:03
2007.04.15
Найти хорошую дорогу


15-1174326484
raqy.style
2007-03-19 20:48
2007.04.15
Удаленная MySql и Delphi 7


2-1174382190
Ильин С.
2007-03-20 12:16
2007.04.15
как реализовать vb в Delphi