Главная страница
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.036 c
2-1174602981
magicworld
2007-03-23 01:36
2007.04.15
Проверить


15-1174620432
Slider007
2007-03-23 06:27
2007.04.15
С днем рождения ! 23 марта


2-1173912636
Vulko
2007-03-15 01:50
2007.04.15
Как сохранить всю форму с содержимым в графич. файл?


3-1170058556
abhtr
2007-01-29 11:15
2007.04.15
Как в запросе выявить новые записи


2-1174504496
White Barsik
2007-03-21 22:14
2007.04.15
TFileStream - чтение в динамический массив