Hi fellows,
In the Source Code forum I've renewed my code to create message boxes with buttons in your own language and your own icons. New feature of the code is that buttons and icons are 'parsed' from one parameter (mbFlags) in the same way the Windows API is creating message boxes (I think). So,
will create a message box with a Yes and a No button and the question mark icon, while the No button is the default (i.e. connected with the ENTER key).
The language stuff is, by way of example, fit for use in The Netherlands and the Flemish part of Belgium, but it is very easy to implement button texts in your own language instead.
Is it functional? Partly. On a computer with a local, language specific edition of Windows installed, it is redundant code (button texts are in the local language by default already), but on a computer with an English version of windows in a non English speaking country, it will create 'local' message box buttons.
Another added value of the code is the possibility to illustrate your message boxes with your own icons, additional to the 4 used by Windows. Those icons should have numeric identifiers beginning with &H50, since the 4 standard message box icons are identified as &H10, &H20, &H30 and &H40 respectively.
Implicitely the code contains a nice example of a CDECL-declared procedure with an optional param (add 2 buttons or 3 buttons).
------------------
mailto:[email protected][email protected]</A>
www.basicguru.com/zijlema/
In the Source Code forum I've renewed my code to create message boxes with buttons in your own language and your own icons. New feature of the code is that buttons and icons are 'parsed' from one parameter (mbFlags) in the same way the Windows API is creating message boxes (I think). So,
Code:
MsgDlg message$, _ %MB_YESNO OR %MB_ICONQUESTION OR %MB_DEFBUTTON2, _ caption$
The language stuff is, by way of example, fit for use in The Netherlands and the Flemish part of Belgium, but it is very easy to implement button texts in your own language instead.
Is it functional? Partly. On a computer with a local, language specific edition of Windows installed, it is redundant code (button texts are in the local language by default already), but on a computer with an English version of windows in a non English speaking country, it will create 'local' message box buttons.
Another added value of the code is the possibility to illustrate your message boxes with your own icons, additional to the 4 used by Windows. Those icons should have numeric identifiers beginning with &H50, since the 4 standard message box icons are identified as &H10, &H20, &H30 and &H40 respectively.
Implicitely the code contains a nice example of a CDECL-declared procedure with an optional param (add 2 buttons or 3 buttons).
------------------
mailto:[email protected][email protected]</A>
www.basicguru.com/zijlema/