BCX_GET_TEXT$ function

Purpose: BCX_GET_TEXT$ will get text from the edit or static text field of a control.


 Syntax:

 RetStr$ = BCX_GET_TEXT$(hWnd)

 Parameters:

  • hWnd is the handle of the edit control from which to get the text.

 Return Value:

  • RetStr$ is the text string returned from the edit field or control.

Example:


 GUI "BCX_Password"
 
 CONST Text_ID = 100
 CONST Butt_ID = 101
 
 GLOBAL Form1  AS HWND
 GLOBAL Input1 AS HWND
 GLOBAL Butt1  AS HWND
 
 SUB FORMLOAD
   Form1  = BCX_FORM  (" Password ", 0, 0, 90, 40)
   Input1 = BCX_INPUT ("BCX IS GREAT!" , Form1, Text_ID, 20, 6, 50, 12)
   Butt1  = BCX_BUTTON(" View Password" , Form1, Butt_ID, 20, 20)
   SendMessage(Input1, EM_SETPASSWORDCHAR, 42, 0)   ' 42 = ASCII code for "*"
   SetFocus(Input1)
   CENTER  (Form1)
   SHOW    (Form1)
 END SUB
 
 BEGIN EVENTS
   LOCAL T$
   IF CBCTL = Butt_ID THEN
     T$ = BCX_GET_TEXT$(Input1)
     MSGBOX T$
   END IF
 END EVENTS

For other examples of the BCX_GET_TEXT$ function see BCX\Gui_Demo\Amort\Amort.bas and BCX\Gui_Demo\Calc\Calc.bas.