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

Вниз

не компилируется 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;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.01 c
15-1249012794
brother
2009-07-31 07:59
2009.10.04
С Днем системного администратора!


2-1249022316
webpauk
2009-07-31 10:38
2009.10.04
Позиция курсора


15-1249058152
tesseract
2009-07-31 20:35
2009.10.04
приложения и потребности


2-1248952921
xyz
2009-07-30 15:22
2009.10.04
вопрос по поводу пути до БД в ADOConnection


1-1218618200
dmitry_12_08_74
2008-08-13 13:03
2009.10.04
Подскажите, как определить, над каким окном находится мышь