Restored from previous forum. Originally posted by PB.
> this help file won't give the specific syntax needed in PureBasic
> for API calls ...

I disagree. Take
MessageBox, for example. The Win32.hlp file says:
Code: Select all
HWND hWnd, // handle of owner window
LPCTSTR lpText, // address of text in message box
LPCTSTR lpCaption, // address of title of message box
UINT uType // style of message box
From this, we can see that MessageBox takes 4 parameters:
The first is the handle of the calling window (just set to 0).
The second is the text for the box (a PureBasic string).
The third is the title for the box (a PureBasic string).
The fourth is the style of the box, with the permitted values listed.
So, to prompt the user with a Yes/No box, you do it like this:
r=MessageBox_(0,"Yes or no?","Question",#MB_ICONQUESTION|#MB_YESNO)
Thus, "r" holds the value of the button clicked by the user.
This is just a quick example, but as you can see, all the required
parameters are listed, along with the type (string, long, etc) and
the flags required. Not too hard once you get the hang of it.
