English
Source / code snippets

MessageBoxExA, MessageBoxExW

 

Georg
Teles
enclosed short an example with the MessageBoxExA & MessageBoxExW
Def MessageBoxExA(5)!"USER32","MessageBoxExA"
Def MessageBoxExW(5)!"USER32","MessageBoxExW"
' Parameter: 1: %hWnd       - parents-Window / Übergeordnetes Window
'            2: lpText      - Text        - ! MessageBoxExA = ANSI
'            3: lpCaption   - Headline - ! MessageBoxExW = WIDE
'            4: Type        - = manner the MessageBox How with xProfan (s. Buttons, Icons, ...)
'            5: wLanguageId - if = 0 then becomes automatically System-Language using
Declare wert&,message#,caption#
' mind, that with MessageBoxExW = doppelter Speicherplatz needed because WIDE !
' in the folgendem drop would for ANSI
' Dim message#,16
' Dim caption#,12
' yield and with Wide the double memory, means
' Dim message#,32
' Dim caption#,24
'
' it empfielt itself possible in the Vorfeld The variables big enough To dimensionieren
'
Dim message#,256
Dim caption#,256
Clear wert&,message#,caption#
CLS
'------------------------------# ! MessageBoxExA = ANSI
String message#,0 = "Eine MessageBox"
String caption#,0 = "Überschrift"
wert& = MessageBoxExA(%HWnd,message#,caption#,2,0)
'------------------------------# ! MessageBoxExW = WIDE
'StringW message#,0 = "Eine MessageBox"
'StringW caption#,0 = "Überschrift"
'wert& = MessageBoxExW(%HWnd,message#,caption#,2,0)
Case wert& = 0:print "-"
Case wert& = 1:print "OK"
Case wert& = 2:print "Abbrechen (Calcel)"
Case wert& = 3:print "Abbrechen (miscarriage)"
Case wert& = 4:print "Wiederholen"
Case wert& = 5:print "Ignorieren"
Case wert& = 6:print "Ja"
Case wert& = 7:print "Nein"
WaitInput
DisPose message#
DisPose caption#

with this Unit  [...]  can itself too kyrillischer Text herzaubern
 $u lat2cyr.pcu = l2cPCU.
Def MessageBoxExA(5)!"USER32","MessageBoxExA"
Def MessageBoxExW(5)!"USER32","MessageBoxExW"
' Parameter: 1: %hWnd       - parents-Window / Übergeordnetes Window
'            2: lpText      - Text        - ! MessageBoxExA = ANSI
'            3: lpCaption   - Headline - ! MessageBoxExW = WIDE
'            4: Type        - = manner the MessageBox How with xProfan (s. Buttons, Icons, ...)
'            5: wLanguageId - if = 0 then becomes automatically System-Language using
Declare wert&,message#,caption#
' mind, that with MessageBoxExW = doppelter Speicherplatz needed because WIDE !
' in the folgendem drop would for ANSI
' Dim message#,16
' Dim caption#,12
' yield and with Wide the double memory, means
' Dim message#,32
' Dim caption#,24
'
' it empfielt itself possible in the Vorfeld The variables big enough To dimensionieren
'
Dim message#,256
Dim caption#,256
Clear wert&,message#,caption#
CLS
'------------------------------# ! MessageBoxExA = ANSI
'String message#,0 = "Eine MessageBox"
'String caption#,0 = "Überschrift"
'wert& = MessageBoxExA(%HWnd,message#,caption#,2,0)
'------------------------------# ! MessageBoxExW = WIDE
'StringW message#,0 = "Eine MessageBox"
'StringW caption#,0 = "Überschrift"
'wert& = MessageBoxExW(%HWnd,message#,caption#,2,0)
'------------------------------# ! lat2cyr.pcu
' with Wide went it too with the CPU >lat2cyr.pcu< kyrillische characters To produce
' then but String message#,0 or Char message#,0 using not StringW !
String message#,0 = l2cPCU.l2l("ein Gemischter Text - ")+l2cPCU.l2c("-Eto nebol-m-soj Test <>|\q!§$%&/()=´'?^@")
String caption#,0 = l2cPCU.l2l("Überschrift - ")+l2cPCU.l2c("-Eto test")
wert& = MessageBoxExW(%HWnd,message#,caption#,2,0)
Case wert& = 0:print "-"
Case wert& = 1:print "OK"
Case wert& = 2:print "Abbrechen (Calcel)"
Case wert& = 3:print "Abbrechen (miscarriage)"
Case wert& = 4:print "Wiederholen"
Case wert& = 5:print "Ignorieren"
Case wert& = 6:print "Ja"
Case wert& = 7:print "Nein"
WaitInput
DisPose message#
DisPose caption#

2 kB
Hochgeladen:03/18/18
Downloadcounter125
Download
 
XProfan X3
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

03/18/18  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.755 Views

Untitledvor 0 min.
Gast.0815Gestern (12:42)
Georg Teles08/29/24
Uwe Starke11/17/23
Axel Berse11/08/23
More...

Themeninformationen

this Topic has 1 subscriber:

Georg Teles (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie