Главная страница
    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.46 MB
Время: 0.029 c
2-1174805889
GeLLeR
2007-03-25 10:58
2007.04.15
Drag and Drop


1-1171628997
iXT
2007-02-16 15:29
2007.04.15
TService + TThread + TXMLDocuent


15-1174402974
kohandr
2007-03-20 18:02
2007.04.15
Юридическая сторона написания программ


15-1174214156
PARUS
2007-03-18 13:35
2007.04.15
Пятничные задачки.


2-1175127004
Lavrenty
2007-03-29 04:10
2007.04.15
Курсор в TMemo





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский