Programming Microsoft Windows Ce Net 3Rd [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Programming Microsoft Windows Ce Net 3Rd [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Message Boxes

MessageBox, the standard Windows CE function for displaying message boxes, works on the Smartphone with some limitations. Because of the limit of two buttons on the SoftKeyBar, message boxes are limited to one or two buttons. The supported flags are MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, and MB_YESNO. Using the flags MB_ABORTRETRYIGNORE or MB_YESNOCANCEL, which would normally result in message boxes with three buttons, will cause MessageBox to fail. Figure 19-5 shows a typical message box.


Figure 19-5: A message box on the Smartphone

The message box in Figure 19-5 is created with the following line:

MessageBox (hWnd, TEXT("Do you want to delete the file?"), TEXT("Box Title"),
MB_OKCANCEL | MB_ICONEXCLAMATION);

The interesting thing about the message box is the bold text, Alert, that is not part of the text passed to the MessageBox function. The Smartphone places this text on the message box depending on the icon specified in the MessageBox call. The text displayed depends on the language settings of the phone and optionally the customization done by the service provider, but for a U.S. English phone, the text is






















MessageBox Flag


Text


Icon


MB_ICONEXCLAMATION


Alert


Exclamation mark within a circle


MB_ICONHAND


Error


Exclamation mark within a circle


MB_ICONQUESTION


Confirm


Question mark within a circle


MB_ICONASTERISK


Info


Lowercase I within a circle


The message text is displayed in smaller text below the large, bold prompt text. The title text is displayed on the caption bar across the top of the screen.

If the message box has OK as one of the options, the user can press the action button on the phone to return IDOK. For other button settings such as Yes/No or Retry/Cancel, the action button has no effect and the user has to press one of the two buttons associated with the MenuBar. If the user presses the Back button, the message box is dismissed and the function returns the negative response, either No for a Yes/No choice, Cancel for Yes/Cancel, or OK if the message box only has an OK button.

/ 169