Home PB Geschiedenis PB for DOS PB-CC PB-DLL Versie 5 -> 6 Code omzetten Het WIN32.HLP helpbestand

Omhoog

Email me

 

De verschillen tussen PB/DLL 6.0 en 5.0

 

Een versimpelde uitvoering van de MAIN fucntie onder de alternatieve naam PBMain(), hierbij zijn geen parameters of AS LONG optie nodig.
Function PBMAIN
End Function
Labels en lijnummers zijn nu lokaal bij procedures, zodat een label naam in meerdere functions mag worden gebruikt. Echter, vanwege syntactische eenduidigheid mag een labelnaam nergens als een variabele worden gebruikt.
Metastatements mogen nu ook worden aangegeven door een pound teken (#), oftewel het hekje. Programmeurs wordt aangeraden om het nieuwe teken te gebruiken in plaats van het dollarteken ($) vanwege mogelijke veranderingen in toekomstige compiler uitvoeringen.
String vergelijkingen mogen nu ook worden gedefinieerd door een dollarteken gevolgd door een identiefier naam. Deze strings zijn dan altijd globaal geldig en mogen alleen buiten SUBS en FUNCTIONS  worden gedefinieerd. Elke stringvergelijking mag nu een literal string waarde hebben van maximaal 255 karakters in lengte (=dit maximale variabele naam?). We raden sterk aan ook alle numerieke waardetoewijzingen buiten Subs en Functions te houden vanwege duidelijkheid voor programmeurs.
Example: $ABC = "Alphabet".
Het is mogelijk dat in een toekomstige versie van PowerBASIC ook lokale waardetoewijzingen zullen worden ondersteund.
Met name voor printerbesturing zijn de volgende ascii codes op deze maniet reeds voorgedefinieerd, zodat ze in de code eenvoudig kunnen worden aangehaald:
$NUL=CHR$(0), $BEL=CHR$(7), $BS=CHR$(8), $TAB=CHR$(9), $LF=CHR$(10),
$VT=CHR$(11), $FF=CHR$(12), $CR=CHR$(13), $CRLF=CHR$(13,10),
$EOF=CHR$(26), $ESC=CHR$(27), $DQ=CHR$(34).
Alle operaties die verwijzen naar een positie in een bestand, zoals Seek, Get, LOF etc, mogen nu 64-bit wijd zijn. BVestanden zijn niet langer beperkt tot een grootte van 2 Gigabyte (!).
#OPTION Version5 mogen worden gespecificeerd om alleen iets uit te voeren onder Windows NT 5.0 of later.
#REGISTER kan globale standaardinstellingen als ALL/NONE/DEFAULT instellen door opname van deze instelling vr de eerste Sub/Function aanroep. De instelling kan ook binnen z'on routine staan om de standaard instelling voor die ene routine lokaal te veranderen.
Array Sort en Scan handelingen met drijvende komma data (floating point data) wordt circa 35% procent sneller dan voorheen uitgevoerd.
* BIN$(x[,y]) zet een long integer om in een binaire string die de waarde van X weergeeft. Als de optionele  Format parameter wordt meegegeven, dan zal een string van Y characters  (maximaal 32) worden aangemaakt, gevuld met voorloopnullen. Als Y nul is of niet aanwezig is, wordt het aantal benodigde characters voor nauwkeurige weergave van het getal opgegeven.
* COMM Statement biedt serile communicatie ondersteuning:
COMM OPEN "COMn" AS fnum
COMM CLOSE fnum [,fnum...]
COMM SEND #fnum, $exp
COMM RECV #fnum, count, $var
COMM PRINT #fnum, $exp [;]
COMM LINE [INPUT] #fnum, $var
COMM RESET #fnum, FLOW ' geen flow-control gebruiken
COMM SET #fnum, comfunc = value ' zet een parameter

x& = COMM(#fnum, comfunc) ' haalt een parameter op
comfunc (comm function) gekozen met de volgende woorden:
BAUD -> poort baud rate
BREAK -> t/f: break is toegestaan
BYTE -> aantal bits per byte (4 tot 8)
CD -> r/o: carrier detect - synoniem voor RLSD
CTSFLOW -> t/f: enable CTS output flow control
DSRFLOW -> t/f: enable DSR output flow control
DSRSENS -> t/f: enable DSR sensitivity
DTRFLOW -> t/f: enable DTR handshaking flow control
DTRLINE -> t/f: enable DTR line
NULL -> t/f: null bytes weggooien bij lezen
PARITY -> t/f: enable parity controle
PARITYCHAR -> weergegeven character bij parity fouten
PARITYREPL -> t/f: enable character vervanging bij een parity fout
PARITYTYPE -> 0-4 = no,odd,even,mark,space
RING -> r/o: ring indicator is aan
RLSD -> r/o: receive-line-signal-detect is aan (CD)
RTSFLOW -> 0-3: RTS control identificatie
RXBUFFER -> grootte van de ontvangstbuffer
RXQUE -> bytes op het moment gebufferd in de ontvangst buffer
STOP -> stop bits: 0, 1, 2 = 1, 1.5, 2
TXBUFFER -> grootte van de verzend buffer
TXQUE -> bytes op het moment gebufferd in de verzend buffer
XINPFLOW -> t/f: enable Xon/Xoff input flow control
XOUTFLOW -> t/f: enable Xon/Xoff output flow control

COMM Print  stuurt een regel tekst, afgesloten met Cr/Lf (voorkoombaar door afsluiting met een ;)
COMM Line Input leest een regel afgesloten met Cr/Lf.
COMM Send and Recv leest/schrijft ongeformatteerde binaire data.
COMM is invalid with Open Handle.
COMM bestanden kunnen worden afgesloten met zowel het commando COMM CLOSE , of met het standaard CLOSE commando.
* DISKFREE("C:") geeft de vrije ruimte op de drive op. De drive mag worden aangeduid met een driveletter plus dubbele punt, of een netwerk naam. Zonder   parameter wordt uitgegaan van de standaard schijf.
* DISKSIZE("C:") geeft de totale grootte van de opgegeven schijf op.
* ERRAPI functie geeft het Windows Error Code nummer (indien beschikbaar), als een Uitzondering (Exception error) optreedt. Het nummer is niet altijd beschikbaar.
* EXTRACT$([n,] main$, [ANY] match$)  biedt nu een optionele start positie voor de bewerking, zonder opgave wordt van de eerste positie uitgegaan.
* FILEATTR(fnum,-3) geeft het apparaat type:  (1=schijf bestand, 2=char apaaraat)
FILEATTR(fnum, 1) geeft 16 voor COMM bestanden en 64 voor TCP bestanden.
* FILECOPY source$, dest$ copieert een schijfbestand, overschrijven is toegestaan.
* FILENAME$(fnum) functie geeft de naam van een open bestand. Deze functie is niet geldig bij bestanden geopend met het commando OPEN HANDLE.
* GET commando voegt een optionele ABS functie toe. When GET is used to read a random file to a dynamic string, it normally expects the first two bytes of the record to contain a length word to define the length of the valid data in the record. If you precede the variable name with ABS (GET #1,,ABS x$), it is presumed that no length word exists, and the number of bytes to read is defined by the current length of the dynamic string variable. If the variable length is greater than the file record length, the remainder of the string variable is filled with nulls: chr$(0). This offers greater compatibility with the actual operation of other versions of Basic, such as PowerBASIC for DOS.

* HEX$(x[,y]) function converts a long integer to a hexadecimal string representation of the value of x. If the optional format parameter y is included, then a string of y digits (up to a maximum of eight) is returned, filled with leading zeros. If y is zero or missing, the returned string has the number of digits necessary to accurately represent the number.

* HOST ADDR [host$] TO ip& tranlates a host name into the corresponding ip address. If the host$ is null, or not given, then the ip address of the local computer is assigned to ip&.

* HOST NAME [ip&] TO host$ tranlates an ip address into the corresponding host name. If the ip address is zero, or not given, then the name of the local computer is assigned to host$.

* INSTR() Function allows the first parameter (the optional starting position) to be a negative number. If negative, the target string is searched from right to left for the first occurrence of the sub-string. If -1, the search begins at the last position. If -2, the search begins at the second to last position, and so forth. If the position evaluates outside the string on either side, then zero is returned. The function INSTR(-2,"efcdef",any "ef") returns the value 5.

* LSET ABS x$ = y$ left justifies y$ within x$, but leaves the the balance of the string unchanged, not space-filled.

* MCASE$($exp) function forces the string contents to mixed case. The first letter of each word is upper case, and the remaining characters are forced to lower case.

* MID$ Function allows the second parameter (the starting position) to be a negative number. If negative, the starting position is assumed to be n characters from the end of the string. MID$("abcde",-3,2) returns "cd" the function MID$("abcde",-3) returns "cde". If that parameter evaluates to a position outside of the string on either side, a null string is returned.

* MID$ Statement allows the second parameter (the starting position) to be a negative number. If negative, the starting position is assumed to be n characters from the end of the string. MID$("abcde",-3,2) = "123" yields "ab12e", while the statement MID$("abcde",-3) = "123" yields "ab123". If that parameter evaluates to a position outside of the string on either side, no operation is performed.

* OCT$(x[,y]) function converts a long integer to an octal string representation of the value of x. If the optional format parameter y is included, then a string of y digits (up to a maximum of eleven) is returned, filled with leading zeros. If y is zero or missing, the returned string has the number of digits necessary to accurately represent the number.

* PARSE$(x$ [,[ANY]delim$], field&) returns the delimited field, specified by field&, found in x$. If field& if negative, the string is parsed from right to left, so that -1 returns the last sub-string, -2 returns the second to last, and so on. If field& evaluates to zero, or outside of the actual field count, a nul string is returned. The field delimiter is defined by delim$, which may be one or more characters long. To be valid, the entire delimiter must match exactly, but the delimiter itself is never returned as a part of the delimited field. If the ANY option is chosen, then each appearance of any single character comprising delim$ is considered a valid delimiter.

If delim$ is not specified or nul, then standard comma-delimited (optionally quoted) fields are presumed. In this case only, the following parsing rules apply. If a standard field is enclosed in optional quotes, they are removed. If any characters appear between a quoted field and the next comma delimiter, they are discarded. If no leading quote is found, then any leading or trailing blank spaces are trimmed before the field is returned.

* PARSECOUNT(x$ [,[ANY]delim$]) returns a count of the number of delimited fields found in x$. The field delimiter is defined by delim$. If delim$ is not specified or nul, then standard comma-delimited (optionally quoted) fields are presumed.

* PUT statement adds an optional ABS option. When PUT is used to write a dynamic string to a random file, it normally precedes the actual data with a two-byte binary length word to define the number of valid bytes in the record. If you precede the variable name with ABS (PUT #1,,ABS x$), no length word is written, only the actual data, subject to the defined random record length. This offers greater compatibility with the actual operation of other versions of Basic, such as PowerBASIC for DOS.

* REDIM may be used to alter the size of Static and Global arrays.

* REDIM xyz&(), used without dimensions, erases the array contents and deallocates its memory, even if the array is Static or Global.

* REGEXPR mask$ IN main$ [AT start&] TO posvar&, lenvar& evaluates a regular expression to determine whether the "wild card" string specified by mask$ can be found within target$. The search begins at the position stated by the optional parameter start&, or else defaults to position one. If found, the variable posvar& contains the position of the match (indexed to one), and the variable lenvar& contains the length of the match. If no match is found, both variables are set to zero. The regular expression specified by mask$ may contain any combination of standard text characters and/or any of the listed special operators.

* REGREPL mask$ IN main$ WITH new$ [AT start&] TO posvar&, newmain$ evaluates a regular expression, just as with REGEXPR, but the matched text in main$ is replaced by new$ and the entire text is assigned to newmain$. Main$ remains unchanged and posvar& reflects the position immediately after the replaced text, so the operation can be repeated, if desired. If no text is replaced, then posvar& returns zero. The expression new$ may contain any text, as well as the tags specified by \##. Each tag from \01 through \99 is replaced by the text actually matched for that tag. \00 is replaced by the entire matched text. The only way to specify a literal backslash is with \\.

* REMAIN$([pos,] main$, [ANY] match$) function returns the portion of main$ which follows the first occurrence of a specified character or string. REMAIN$() is the natural complement to the EXTRACT$() function.

* RESET var sets a scalar variable or user-defined type to zero/nul.

* RESET array() sets all elements of the array to zero or nul, but does not deallocate the memory, leaving it available for re-use.

* RSET ABS x$ = y$ right justifies y$ within x$, but leaves the the balance of the string unchanged, not space-filled.

* SLEEP ms& pauses the application for the specified number of milliseconds, while allowing other processes to execute.

* STRDELETE$(x$,y,z) returns the string expression x$, with z characters deleted starting at position y.

* STRINSERT$(x$,y$,z) returns a string consisting of the string expression x$, with the string expression y$ inserted at position z. STRINSERT$("1234567890","ab",3) returns "12ab34567890". If z > len(x$), y$ is appended to x$.

* STRREVERSE$($exp) returns a string with the character sequence reversed from that of the original.

* TCP Statement offers TCP/IP Support:
TCP OPEN [PORT pnum | "srvc"] AT "host" as fnum [TIMEOUT seconds&]
TCP OPEN SERVER [PORT pnum | "srvc"] as fnum
TCP CLOSE fnum [,fnum...]
TCP SEND #fnum, $exp
TCP RECV #fnum, count, $var
TCP PRINT #fnum, $exp [;]
TCP LINE [INPUT] #fnum, $var
TCP ACCEPT fnum as newfnum
TCP NOTIFY fnum, send|recv|accept|connect|close TO hwnd as wmsg

pnum is a long integer expression to specify the host port. "srvc" is a string expr specifying smtp,pop,nntp... "host" is a string expr specifying site (powerbasic.com...) TCP Print sends a text line, followed by a cr/lf (which can be suppressed with a trailing semi-colon). TCP Line Input reads a text line, delimited by a cr/lf. TCP Send and Recv read/write undelimited binary data. TCP is invalid with Open Handle. TCP files can be terminated either with the TCP CLOSE statement, or the standard file CLOSE statement. TCP OPEN SERVER creates a socket on the local server at the specified port and listens for connection requests. TCP NOTIFY specifies which requests should send a message to your WndProc callback. TCP ACCEPT accepts a connection request and creates a new socket to handle communication. The timeout option must be specified in whole seconds -- if zero, the function will wait indefinitely -- if not specified, the default is 60.

* UDP Statement offers UDP Communications support:
UDP OPEN [PORT pnum&] as fnum [TIMEOUT seconds&]
UDP CLOSE fnum [,fnum...]
UDP SEND #fnum, AT ip&, pnum&, $exp
UDP RECV #fnum, FROM ipvar&, pnumvar&, $var
UDP NOTIFY #fnum, send|recv|accept|connect|close TO hwnd as wmsg

** DDT Overview **

* CALLBACK FUNCTION cbname() defines a special, simplified form of user function which is used exclusively for your callback procedures. Callback Functions are automatically executed in response to certain events which occur in your program. When a Callback Function is listed in a DIALOG SHOW statement, it is executed whenever any message related to any part of the dialog is received by PowerBASIC. When a Callback function is listed in a CONTROL ADD statement, it is executed whenever a wm_CallBack message for that specific control is received by PowerBASIC. These procedures are loosely defined as Dialog Callbacks and Control Callbacks elsewhere in this documentation.

When a Callback Function is executed, Windows passes four long integer parameters to define the nature of the event which has occurred. These four parameters are known as hWnd (the handle of the Window or Dialog involved), wMsg (the message number which defines the event), wParam and lParam (additional message dependent data). These four parameters are retrieved from within your Callback Functions by using the PowerBASIC Functions CBHndl, CBMsg, CBLParam, and CBWParam. Two additional functions, CBCtl and CBCtlMsg, return the low and high halves of wParam automatically. Since callback params are easily referenced with built-in functions, your Callback Functions will never declare any parameters, nor will they include options like EXPORT or STATIC. They imply a function return type of Long Integer, even if you do not include the "&" type identifier, or the "As Long" specifier. A typical Callback Function will simply look like...

Callback Function ClickYes()
{statements}
Function = 1
End Function

If your Callback Function processes a Callback Event fully, then the function must return logical true (non-zero). If not, it must return logical false (zero), so that PowerBASIC or Windows will process it in the default manner for that message. Callback Functions are only executed by PowerBASIC internals or Windows. You should never execute a Callback Function from your application code.

* CBCTL function returns the LoWrd of wParam. It is only valid within a callback function.

* CBCTLMSG function returns the HiWrd of wParam in a dialog callback function. It is only valid within a callback function.

* CBHNDL function returns the hWnd param in a callback function. It is only valid within a callback function.

* CBLPARAM function returns the lParam parameter in a callback
function. It is only valid within a callback function.

* CBMSG function returns the wMsg parameter in a callback function. It is only valid within a callback function.

* CBWPARAM function returns the wParam parameter in a callback function. It is only valid within a callback function.

* COMBOBOX ADD hDlg&, id&, text$ Add a string to a combobox specified by hDlg& and id&.

* COMBOBOX GET TEXT hDlg&, id& TO textvar$ Get the text of the currently selected item in a combobox specified by hDlg& and id&.

* COMBOBOX DELETE hDlg&, id&, pos& Delete the string at position pos& within a combobox specified by hDlg& and id&.

* COMBOBOX RESET hDlg&, id& Remove all of the contents of a combobox box specified by hDlg& and id&.

* COMBOBOX SELECT hDlg&, id&, pos& Copy the specified listbox item at pos& into the editbox portion of a combobox specified by hDlg& and id&.

* CONTROL ADD {ctrl},hDlg&,id&,txt$,x&,y&,wide&,high&[,style&,stylex& [CALL callbackfunction]
{ctrl} = BUTTON, CHECK3STATE, CHECKBOX, FRAME, IMAGE, IMAGEX, IMGBUTTON, IMGBUTTONX, LABEL, LINE, OPTION, SCROLLBAR, TEXTBOX. A control of the type requested is added to the dialog specified by hDlg&. If a callback function is included, it is executed each time a wm_command message is received for this control. If the given style value is zero, then a system default style is presumed. In the case of a Button Control, an ampersand (&) in the text field causes the letter that follows to be displayed underlined, adding a keyboard interface "Accelerator" or "Hot-Key" to direct focus to the control. In the case of a Static Image or ImgButton Control, the bitmap or icon image embedded in the executable under the resource name in txt$ is displayed at position x&, y& at the natural size of the image. In the case of a Static Imagex or ImgButtonx control, the image is stretched/expanded to fit the dimensions specified by wide&, high&.

* CONTROL ADD COMBOBOX|LISTBOX,hDlg&,id&,[txt$()],x&,y&,wide&,high&[,style,stylex&] [CALL CallBack]
A combobox or listbox control is added to the dialog specified by hDlg&. If a callback function is included, it is executed each time a wm_command message is received for this control. If a dynamic string array is included, then the control is populated with the string data contained in the array. If not, it is left empty to be populated later. If the given style value is zero, then a system default style is presumed.

* CONTROL ADD "Name",hDlg&,id&,txt$,x&,y&,wide&,high&[,style&,stylex& [CALL callback]
A custom control of the class "name" is added to the dialog specified by Windows handle hDlg&. If a callback function is included, it is executed each time a wm_command message is received for this control. With a custom control, no default style is ever presumed. You must always include an explicit style value appropriate for the control. If not, a value of zero is presumed, which will typically fail.

* CONTROL DISABLE hDlg&, id& disables mouse and keyboard input from reaching the specified control. Most standard controls are automatically "grayed" to give the user a visual indication that it is not available for interaction.

* CONTROL ENABLE hDlg&, id& enables mouse and keyboard input to the specified control. This is the default condition upon initial "show" of a dialog.

* CONTROL GET CHECK hDlg&, id& TO retvar& the "check state" of an option button, checkbox, or check3state is assigned to the long integer variable designated in "TO retvar&". 0=unchecked, 1=checked, 2=grayed (only if a 3state).

* CONTROL GET LOC hDlg&, id& TO x&, y& retrieves the location of the specified control (in dialog units, relative to the client area of the dialog), and assigns it to the long integer variables.

* CONTROL GET SIZE hDlg&, id& TO x&, y& retrieves the size of the specified control (in dialog units), and assigns it to the long integer variables.

* CONTROL GET TEXT hDlg&, id& TO textvar$ the text of the control (or dialog/window title) specified & is copied to the string variable designated in "TO textvar$".

* CONTROL HANDLE hDlg&, id& TO hndl& retrieves the windows handle of a control, given the handle of the parent dialog and the id used to create it, and assigns it to the long integer variable specified by hndl&. If the requested control cannot be found, a value of zero is returned. This control handle may be needed to successfully execute certain PowerBASIC statements, as well as some Windows API functions.

* CONTROL KILL hDlg&, id& destroys the specified control.

* CONTROL SEND hDlg&, id&, msg&, wparam&, lparam& [TO result&] sends a windows message to the specified control, which is identified by the parent dialog handle and control id combination. It optionally assigns the result to the long integer variable indicated by TO result&.

* CONTROL SET CHECK hDlg&, id&, check& the "check state" of an option button, checkbox, or check3state is set based upon the value of check&. 0=unchecked, 1=checked, 2=grayed (only if a 3state).

* CONTROL SET FOCUS hDlg&, id& the specified control receives the focus -- keyboard entry is directed to it.

* CONTROL SET IMAGE|X|IMGBUTTON|X hDlg&, id&, $exp a new bitmap or icon image is displayed on the specified control. However, bitmaps and icons cannot be interchanged. A bitmap can only be changed to another bitmap, likewise with icons.

* CONTROL SET LOC hDlg&, id&, x&, y& moves the specified control to the location (in dialog units, relative to the client area of the dialog) indicated by x&, y&.

* CONTROL SET SIZE hDlg&, id&, x&, y& changes the size of the specified control (in dialog units), to the values indicated by x&, y&.

* CONTROL SET TEXT hDlg&, id&, $exp the text of the control (or dialog/window title) specified by hndl& is changed to that specified by the string expression $exp.

* DECLARE CALLBACK FUNCTION cbname() declares a special Callback Function prior to its full definition. It must be declared as returning a long integer value, or if ambiguous, it defaults to long integer. It must include no parameters.

* DIALOG DISABLE hDlg& disables mouse and keyboard input from reaching any control in the specified dialog. Controls within the dialog are not automatically "grayed", so it is necessary to use CONTROL DISABLE with each, if you wish to provide a visual indication they are not available for interaction.

* DIALOG DOEVENTS [TO countvar&] statement processes a pending window or dialog message and releases the remainder of the timeslice to Windows if there are no active dialogs. If the optional TO clause is included, then a value equal to the number of currently active dialogs is assigned to the variable countvar&. It should only be utilized in conjunction with the D.D.T. Dialog SubSystem.

* DIALOG ENABLE hDlg& enables mouse and keyboard input to the specified control. This is the default condition upon initial "show" of a dialog.

* DIALOG END hDlg& [, retvalue&] The dialog specified by hDlg& is destroyed. If ",retvalue&" is included, that value is immediately assigned to the long integer variable specified in the associated DIALOG SHOW statement.

* DIALOG GET CLIENT hDlg& TO x&, y& retrieves the size of the client area of the specified dialog (in dialog units), and assigns it to the long integer variables.

* DIALOG GET LOC hDlg& TO x&, y& retrieves the location of the specified dialog (in dialog units, relative to the client area of the parent dialog or if none, the screen), and assigns it to the long integer variables.

* DIALOG GET SIZE hDlg& TO x&, y& retrieves the total size of the specified dialog (in dialog units), and assigns it to the long integer variables.

* DIALOG NEW prnt&,title$,[xpos&],[ypos&],wide&,high&[,style&,stylex&]TO hDlg&
A new dialog is defined, but not yet displayed. If xpos&/ypos& are not given, the dialog is centered. If xpos&/ypos& are &H80000000, the default Windows position is used (cascading from the upper-left screen corner). The Windows dialog handle is assigned to the long integer variable specified by hDlg&, so that it can be used in subsequent statements which affect this dialog box. If the style& and stylex& parameters are omitted or zero, then a default style is utilized.

* DIALOG PIXELS hDlg&, x&, y& TO UNITS xx&, yy& converts pixels to dialog units, based upon the appropriate ratios for the specified dialog.

* DIALOG SEND hndl&, msg&, wparam&, lparam& [TO result&] sends a windows message to the specified control/window/dialog, and optionally assigns the result to the long integer variable indicated by TO result&.

* DIALOG SET LOC hDlg&, x&, y& moves the specified dialog to the location (in dialog units, relative to the client area of the parent dialog or if none, the screen), indicated by x&, y&.

* DIALOG SET SIZE hDlg&, x&, y& changes the size of the specified dialog (in dialog units), to the values specified by x&, y&.

* DIALOG SHOW MODAL hDlg& [,CALL CallBack] [TO retvar&] The modal dialog specified by hDlg& is made visible. The Callback function is executed each time any message for this dialog occurs.

* DIALOG SHOW MODELESS hDlg& [,CALL CallBack] [TO retvar&] The modeless dialog specified by hDlg& is made visible. The Callback function is executed each time any message for this dialog occurs.

* DIALOG SHOW STATE hDlg&, showbits& [TO retvar&] is used to change the state/appearance of the dialog specified by hDlg&. The showbits& parameter is a value from 0 to 10, defined in the win32 API as %sw_hide, %sw_shownormal, %sw_showminimized, %sw_showmaximized... If the optional TO clause is included, the retvar& variable is assigned the value zero if the dialog was previously not visible, or non-zero if it was previously visible.

* DIALOG UNITS hDlg&, x&, y& TO PIXELS xx&, yy& converts dialog units to pixels, based upon the appropriate ratios for the specified dialog.

* LISTBOX ADD hDlg&, id&, text$ Add a string to the listbox specified by hDlg& and id&.

* LISTBOX GET TEXT hDlg&, id& TO textvar$ Get the text of the currently selected item in a listbox specified by hDlg& and id&.

* LISTBOX DELETE hDlg&, id&, pos& Delete the string at position pos& in the listbox specified by hDlg& and id&.

* LISTBOX RESET hDlg&, id& Remove all contents of the listbox specified by hDlg& and id&.

* LISTBOX SELECT hDlg&, id&, pos& Select the item at position pos& in the listbox specified by hDlg& and id&.

* MENU NEW BAR|POPUP TO hMenu& creates a new blank menu.

* MENU ADD STRING, hMenu&, text$, id&, state& [,AT [BYCMD] pos&] [,CALL callback]
A new menu string is added to the menu specified by Windows handle hMenu&. If a callback function is included, it is executed each time a wm_command message is received for this menu selection. An optional position may be specified in the AT clause, using a numeric value indexed to one. If the position is not given, the string is appended as the last item. If the BYCMD option is used, the string is added at the position immediately preceding the item whose ID& is given by pos&. If the item text string in a popup menu is a single character hyphen (-), then that item is displayed as a horizontal line. It acts as a separator, or grouping device, which cannot be selected by the user. In the menu string, an ampersand (&) in the text causes the letter that follows to be underlined, adding a keyboard interface "Hot-Key" to direct focus to that item.

* MENU ADD POPUP, hMenu&, text$, pop&, state& [, AT [BYCMD] pos&] A popup menu, previously defined, is added to the menu specified by Windows handle hMenu&. The popup menu to use is specified by including its Windows handle as the parameter pop&. An optional position may be specified in the AT clause, using a numeric value indexed to one. If the position is not given, the popup is appended as the last item. If the BYCMD option is used, the string is added at the position immediately preceding the item whose ID& is given by pos&. If the item text string in a popup menu is a single character hyphen (-), then that item is displayed as a horizontal line. It acts as a separator, or grouping device, which cannot be selected by the user. In the menu string, an ampersand (&) in the text causes the letter that follows to be underlined, adding a keyboard interface "Hot-Key" to direct focus to that item.

* MENU ATTACH hMenu&, hDlg& the menu previously defined as handle hMenu& is attached to the dialog defined as handle hDlg&. The menu is displayed immediately, or when the Dialog is made visible with DIALOG Show.

* MENU DELETE hMenu&, [BYCMD] pos& deletes an item from the menu specified by the handle hMenu&. If the BYCMD option is used, the item to be deleted is specified by its user-assigned identifier. Otherwise, pos& specifies its position in the menu, indexed to one.

* MENU DRAW BAR hDlg& causes the main menu bar in the Dialog specified to be redrawn. This statement must be executed any time the menu bar changes after the dialog has been created/displayed with DIALOG SHOW.

* MENU GET STATE hMenu&, [BYCMD] pos& TO statevar& the state of the menu item specified is copied to the long integer variable statevar&.

* MENU GET TEXT hMenu&, [BYCMD] pos& TO text$ the text of the menu item specified is copied to the string variable text$.

* MENU SET STATE hMenu&, [BYCMD] pos&, newstate& the state of the menu item specified changed to the new long integer value.

* MENU SET TEXT hMenu&, [BYCMD] pos&, newtext$ the text of the the menu item specified is changed to the new string expression.

* MOUSEPTR style& changes the mouse pointer to a new shape. 0=default, 1=arrow, 2=cross, 3=ibeam, 4=arrow, 5=sizeall, 6=sizenesw, 7=sizens, 8=sizenwse, 9=sizewe, 10=uparrow, 11=wait 12=no, 13=appstarting.

Bezoek het PB forum in het Nederlands en/of teken mijn gastenboek.

Datum laatste aanpassing:
29 december 2003 03:42:30

Email mij voor reacties,
aanvullingen en correcties