Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Начинающим";
Текущий архив: 2009.10.04;
Скачать: [xml.tar.bz2];

Вниз

не компилируется MessageBox   Найти похожие ветки 

 
xyz   (2009-07-30 18:49) [0]

Пишу:
application.MessageBox("This should be on top.", "Look", [smbOK]);
Скопировано, кстати, из справки. Выдает ошибку: undeclared identifier: smbOK
Надо подключить какой-то модуль?


 
Медвежонок Пятачок ©   (2009-07-30 18:56) [1]

надо стереть три символа и добавить один


 
palva ©   (2009-07-30 18:59) [2]


> Надо подключить какой-то модуль?

Ну это не обязательно. Можно самому определить.


 
Медвежонок Пятачок ©   (2009-07-30 19:02) [3]

Скопировано, кстати, из справки.

А ты на третье слово в первой строке этой справки обратил внимание?


 
xyz   (2009-07-30 21:52) [4]

Я вот что читал:


> Displays a specified message to the user.
>
> Delphi syntax:
>
> function MessageBox(const Text: WideString; const Caption:
>  WideString = ""; Buttons: TMessageButtons = [smbOK]; Style:
>  TMessageStyle = smsInformation; Default: TMessageButton
> = smbOK; Escape: TMessageButton = smbCancel): TMessageButton;
>  
>
> C++ syntax:
>
> TMessageButton __fastcall MessageBox(const WideString Text,
>  const WideString Caption, TMessageButtons Buttons = TMessageButtons()
> << smbOK, TMessageStyle Style smsInformation, TMessageButton
> Default = smbOK, TMessageButton Escape = smbCancel);
>
> Description
>
> Use MessageBox to display a generic dialog box a message
> and one or more buttons. Caption is the caption of the dialog
> box and is optional.
>
> The Text parameter is the message that appears in the dialog
> box.
>
> The Caption parameter is the caption that appears in the
> title bar of the dialog box..
>
> The Buttons parameter indicates what buttons appear in the
> message box.
>
> The Style parameter indicates the use of the message box.
>
>
> The Default parameter indicates which of the buttons in
> the Buttons parameter is clicked when the user types the
> space bar.
>
> The Escape parameter indicates which of the buttons in the
> Buttons parameter is clicked when the user types the escape
> key.
>
> MessageBox returns 0 if there isn’t enough memory to create
> the message box. Otherwise it returns the button that the
> user clicked.

и

> The following cross-platform code causes “stay on top” forms
> to allow a MessageBox to appear on top. After the message
> box is closed, the topmost forms are restored so that they
> continue to float to the top.
>
> Begin
>
>   with Application do
>   begin
>     NormalizeTopMosts;
>     MessageBox("This should be on top.", "Look", [smbOK]);
>
>     RestoreTopMosts;
>   end;
> end;


Ну и где тут написано, что надо не smb, а mb писать?


 
Медвежонок Пятачок ©   (2009-07-30 22:44) [5]

The following cross-platform code ......

Этот пример общий, а не для Delphi конкретно.

function TApplication.MessageBox(const Text, Caption: PChar; Flags: Longint): Integer;

последний параметр - скалярный

http://img41.imageshack.us/img41/7233/80279570.jpg


 
sniknik ©   (2009-07-30 23:00) [6]

надо было не просто Application, а CLX Application создавать в начале, чтобы примеры кросплатформенные использовать...
(а после посмотреть на размер и прослезиться... ;)



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

Форум: "Начинающим";
Текущий архив: 2009.10.04;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.46 MB
Время: 0.009 c
1-1218039013
andreil
2008-08-06 20:10
2009.10.04
Быстрое сравнение строк?


2-1248593200
xyz
2009-07-26 11:26
2009.10.04
обновление DBLookupListBox не работает


15-1249325284
oldman
2009-08-03 22:48
2009.10.04
Да ну вас всех два


15-1249294601
Пит
2009-08-03 14:16
2009.10.04
Особенности работы Internet Explorer


15-1249283477
Kerk
2009-08-03 11:11
2009.10.04
Изречения великого руководителя полководца Ким Чен Ира





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский