Well this one loads a DLL
user32=1
load dll "user32.dll",user32
The user32=1 is just so it's easy to keep track of the dll and what number it is assigned. So dll 1 is the user32 - I can see that just by looking at the variable name. If I had 100s of dlls, I wouldn't know what dll 1 was from dll 95, so I make the variable reflective of the actual dll name.
This command from inside the Function messagebox
button=call dll(user32,"MessageBoxA",hwnd,lptext$,lpcaption$,utype)
is thactual call to the Windows messagebox function. The hwnd identifies the DBC window, the lptext$ is a string that contains the message we want displayed, lpcaption$ is the title that will show on the message box, and utype is the type of buttons to display on the message box.
title$="EXIT APPLICATION"
msg$="Do you really want to quit?"
MB_YESNO = 4
bt=MB_YESNO
result=messagebox(user32,msg$,title$,bt)
I send the parameters to my function. bt has a value that means add a yes and a no button to the message box. I had to look this value up. Once the values are sent to the parameters, I call the dll function and it makes the message box. When a button is clicked, a numeric value is returned to the result variable.
That's how it works. Make any sense?
Enjoy your day.