The usual sequence for creating and displaying messages in an overlay window is the following:
Here is the 4D code for this (with no error checking).
| Sample code |
|---|
| C_LONGINT($L_error;$L_overlayRef) |
| C_STRING(255;$license) |
| ` 1] Create a window using ovi_NewWindow |
| $L_error:=ovi_NewWindow (0;50;200;100;koviLEVEL_Utility;$L_overlayRef) |
| ` 2] Set the drawing color parameters: back color, front color, font and size. ` Here is a red window with blue text. |
| $L_error:=ovi_GetSetBackColor (kovi_SET;$L_overlayRef;0x00FF0000;0,5) |
| $L_error:=ovi_GetSetFrontColor (kovi_SET;$L_overlayRef;0x000000FF;0,8 |
| $L_error:=ovi_GetSetFont (kovi_SET;$L_overlayRef;"Lucida Grande";12;2) |
| ` 3] Set the message. |
| $L_error:=ovi_GetSetMessage (kovi_SET;$L_overlayRef;"Doing something"+Char(13)+"Here are the infos ") |
| ` 4] Make the window visible |
| $L_error:=ovi_GetSetVisible (kovi_SET;$L_overlayRef;1) |
| ` 5] Do what you have to do |
| . . . |
| ` 6] Close the window |
| $L_error:=ovi_CloseWindow($L_overlayRef) |
And here is your window:
