[[ header START ]]

Welcome to OS2.GURU site! (eComStation.RU)

Select your language: Russian English Deutch Spanish Italian Portuguese Czech Polish French

Frequently asked questions and answers:
telegram

Форум обсуждение

telegram

Send message

telegram

[ +7-981-8529467 (Санкт-Петербург)

telegram

t.me/os2_guru

eComStation.RU


ru · en · de · es · it · pt · cz · pl · fr
OS/2 is a greatly different operating system for PC (ArcaOS, eComStation, IBM OS/2 Warp)
Applications, news, reviews, support of users, hardware, questions and answers.
 
[What is OS/2?  News  Install  Update  
 
 
Usage  Future  Community  Projects  

How to buy
russian OS/2 apps?

The concept of
OS/2 development

(Map of the site)

 
 
[[ head-3-search ]]

Database of OS/2 compatible hardware

[[ head-3-search END ]]

 
Update

 
Applications

 
Advantages:

 
For developer:

 
(Пайпы программ)

 
Companies:

 
History:

 
(Бонусы)

 
Advice:

 
(Барьеры и решения)

 
Technologies:

 
(Применение в науке, лаборатории, ..)

 

 
Solutions

 
New eComStation:

 
Future:

 
(Ссылки на другие сайты)

 
(Картинка дня)

 
OS/2 artefacts:

 
Gadgets:

eCo Software Developer Connection


About DevCon
Subscription to DevCon
Budget of DevCon
FAQ


Roadmap
eCo Software runtime
eCo Software toolkit
Contacts

  You can sponsor the development of the libraries,
control the expenses

/ Guidelines: Additional control elements / Message box / Message box Usage

Usage of Message box

To use extended message box instead of standard OS/2 PM, use ExMessageBox() functions instead of WinMessageBox() in your application. The parameter list of ExMessageBox() is compatible with WinMessageBox(). All additional parameters are optional:

ULONG APIENTRY ExMessageBox(HWND    hwndParent,    // Parent window
          HWND    hwndOwner,     // Owner window
          PSZ     pszText,       // Message-box window message
          PSZ     pszCaption,    // Message-box title
          ULONG   idWindow,      // Message-box window identity
          ULONG   flStyle,       // Message-box window style
          [PSZ     pszComment,    // Comment text. Significant only if MB_COMMENT flag is specified
          [PSZ     pszButton1,    // Button 1 text. Significant only if MB_OWNCAPTIONS flag is specified
          [PSZ     pszButton2,    // Button 2 text. Significant only if MB_OWNCAPTIONS flag is specified
          [PSZ     pszButton3,    // Button 3 text. Significant only if MB_OWNCAPTIONS flag is specified
          [PSZ     pszButtonHelp, // "Help" button text. Significant only if MB_OWNCAPTIONS flag is specified
          [LANGE   hLange,        // LANGE handle, used to translate button text. Significant only if MB_OWNLANGE flag is specified
          [HMODULE hmodResource,  // Handle of resource DLL. Significant only if MB_OWNICON flag is specified
          [ULONG   ulID]]]]]]]]); // ID of the icon in the resource DLL. Significant only if MB_OWNICON flag is specified

As you can see, the parameter order is significant, so if, for example, pszButton* parameters are not used (MB_OOWNCAPTIONS flag is not specified), but hLange parameter is used (MB_OWNLANGE flag is specified), you cannot just ommit those parameters. Use NULL instead.

Be careful: you MUST specify a parameter if, an appropriate flag is set. If, for example, MB_OWNCAPTIONS flag is set, then:

  • If MB_OK flag is set, the message box contains only one button, so you have to specify only pszButton1 parameter.
  • If MB_YESNO flag is set, the message box contains two buttons, so you have to specify both pszButton1 and pszButton2 parameters.
  • If MB_ABORTRETRYIGNORE flag is set, the message box contains three buttons, so you have to specify pszButton1, pszButton2 and pszButton3 parameters.
  • IF MB_HELP flag is set, the message box contains "Help" button, so you have to specify pszButtonHelp parameter.

Here is the full list of new styles (must be OR'ed in flStyle parameter):

MB_BIGICON      // Use big icons. Otherwise, small icons are used. 
                   Big icons are 64x64 for LoRes (96dpi) screens and 
                   80x80 for HiRes (120dpi) screens. Ignored if MB_OWNICON 
                   flag is set.
                   
MB_ANIMATED     // Use animated icons.

MB_COMMENT      // MessageBoxt contains not only caption, but also comment, 
                   specified by pszComment parameter. Usually caption text 
                   is bold, and comment text is not.
                   
MB_MINBUTTON    // MessageBox contains "minimize" button.

MB_OWNLANGE     // Use your own NLS (specified by hLange parameter) to 
                   translate all the text in the MessageBox. Otherwise, 
                   PROGRESS.NLS is used.
                   
MB_OWNCAPTIONS  // Use own captions on the message box buttons (see above).

MB_OWNICON      // Use your own icon (icon set) instead of internal one (see 
                   below).
                   
MB_NODEFBUTTON	 // None of the buttons in the message box is marked as 
                   default. "ENTER" key will not press any buttons (unless 
                   you have selected one of them with arrow kwys, for example).
                   

Using your own icons:

When MB_OWNICON flag is set, both hmodResource and ulID parameters must be specified. If MB_ANIMATED flag is not set, PNG image stored in hmodResource with resource type = RT_PNG (defined in PROGRESS.H) and ID = ulID is loaded and used as an icon. If MB_ANIMATED flag is set, a set of PNG images stored in hmodResource with resource type = RT_PNG and IDs starting from ulID untill first ID which is not existed used as an icon.

  • If hmodResource = 0, resources are loaded from the executable of the application.
  • If hmodResource = -1, resources are loaded from PROGRESS.DLL.

Otherwise hmodResource is the handle of the DLL, obtained by DosLoadModule() function.

The list of resource IDs of the icons stored in the PROGRESS.DLL (defined in PROGRESS.H):

ID_PROGRESS_PNG_ICON_PERCENT  - A set of 21 images, used to display icon with percentage. Minimum 2 images, maximum 101 image.
D_PROGRESS_PNG_ICON          - A set of 12 images, used to display animated icon looop.

IDP_ICON_ERROR_32             - A set of 14 images: "Error"	- "X" icon 32x32
IDP_ICON_ERROR_40             - A set of 14 images: "Error"	- "X" icon 40x40
IDP_ICON_ERROR_64             - A set of 14 images: "Error"	- "X" icon 64x64
IDP_ICON_ERROR_80             - A set of 14 images: "Error"	- "X" icon 80x80

IDP_ICON_INFO_32              - A set of 14 images: "Information" - "i" icon 32x32
IDP_ICON_INFO_40              - A set of 14 images: "Information" - "i" icon 40x40
IDP_ICON_INFO_64              - A set of 14 images: "Information" - "i" icon 64x64
IDP_ICON_INFO_80              - A set of 14 images: "Information" - "i" icon 80x80

IDP_ICON_QUERY_32             - A set of 14 images: "Query" - "?" icon 32x32
IDP_ICON_QUERY_40             - A set of 14 images: "Query" - "?" icon 40x40
IDP_ICON_QUERY_64             - A set of 14 images: "Query" - "?" icon 64x64
IDP_ICON_QUERY_80             - A set of 14 images: "Query" - "?" icon 80x80

IDP_ICON_WARNING_32           - A set of 14 images: "Warning" - "!" icon 32x32
IDP_ICON_WARNING_40           - A set of 14 images: "Warning" - "!" icon 40x40
IDP_ICON_WARNING_64           - A set of 14 images: "Warning" - "!" icon 64x64
IDP_ICON_WARNING_80           - A set of 14 images: "Warning" - "!" icon 80x80

 

 
For dummies

Database of OS/2 compatible hardware

 
Reviews


     
  Why eComStation?
Features
Advantages
Usage
Clips and screenshots
   eComStation for
for businessmen
for students and engineers
for reselles of computers
community of users
   Developer
Distribute the program
Description of API, libraries
Start new project
Competition
   Applications
On-line catalogue
Select from eCo Market
   Support service
Contact the web-master
Buy eComStation
Frequently asked questions
for Beginners
 
 
© 2001 - 2021 eCo Software, All rights reserved
Сибирский Медведь технологическая компания
eComStation Serenity Systems International • OS/2 Warp IBM Corporation • ArcaOS Arca Noae