Loading ...
Sorry, an error occurred while loading the content.
 

Update on my problems :-(

Expand Messages
  • Richard Tivey
    Hi Again, I still have my problem with creating a scroll bar and using itt to controll a counter and the prolbem of disabling a text box (see my previous
    Message 1 of 3 , Sep 1, 2003
      Hi Again,

      I still have my problem with creating a scroll bar and using itt to controll a counter and the prolbem of disabling a text box (see my previous message) but i have sorted out the Text Editor problem by using the text edtior on Alyces web page, but this has created a new problem, does anyone know how to put the contenets of a line into a string, using the text edit api (not on a standerd text edit box)?

      Thanks,



      ---------------------------------
      Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

      [Non-text portions of this message have been removed]
    • Alyce Watson
      ... Complete instructions: http://www.libertybasicuniversity.com/lbnews/nl98/5.htm ... calldll #user32, SendMessageA ,_ hEdit as long,_ handle of edit
      Message 2 of 3 , Sep 1, 2003
        At 11:26 AM 9/1/2003 +0100, you wrote:

        >Hi Again,
        >
        >I still have my problem with creating a scroll bar and using itt to
        >controll a counter


        Complete instructions:
        http://www.libertybasicuniversity.com/lbnews/nl98/5.htm

        >and the prolbem of disabling a text box (see my previous message) but i
        >have sorted out the Text Editor problem by using the text edtior on Alyces
        >web page, but this has created a new problem, does anyone know how to put
        >the contenets of a line into a string, using the text edit api (not on a
        >standerd text edit box)?


        calldll #user32, "SendMessageA",_
        hEdit as long,_ 'handle of edit control created by api
        _EM_LINELENGTH as long,_'message to retrieve length of a line
        lineNum as long,_ 'line number to retrieve
        0 as long,_ 'must be 0
        numChars as long 'number of characters in line

        buffer$ = space$(numChars) + chr$(0)

        calldll #user32, "SendMessageA",_
        hEdit as long,_ 'handle of edit control created by api
        _EM_GETLINE as long,_ 'message to retrieve text from a line
        lineNum as long,_ 'line number to retrieve
        buffer$ as ptr,_ 'buffer to receive txt
        charsCopied as long 'number of characters copied

        txt$ = left$(buffer$, charsCopied)
      • Doyle Whisenant
        ... contenets of a line into a string, using the text edit api (not on a standerd text edit box)? Something like (my syntax may be off, it s been a while) :
        Message 3 of 3 , Sep 1, 2003
          Richard Tivey wrote:
          > Hi Again,
          >
          > but this has created a new problem, does anyone know how to put the
          contenets
          of a line into a string, using the text edit api (not on a standerd text
          edit box)?

          Something like (my syntax may be off, it's been a while) :

          bigenoughforlengthofline = 80
          buffer$ = space$(bigenoughforlengthofline)
          lineno = 20

          calldll #user32, "SendMessageA", _
          EM_GETLINE as long, _
          lineno as long, _
          buffer$ as ptr, _
          ret as void

          This should get the text in line 20 and place in buffer$. Make sure to
          set the line length above to more than you need. You can TRIM$() it later.

          From the Win32 help:

          EM_GETLINE

          An application sends an EM_GETLINE message to copy a line of text from
          an edit control and place it in a specified buffer.

          EM_GETLINE
          wParam = (WPARAM) line; // line number to retrieve
          lParam = (LPARAM) (LPCSTR) lpch; // address of buffer for line


          Parameters

          line

          Value of wParam. Specifies the zero-based index of the line to retrieve
          from a multiline edit control. A value of zero specifies the topmost
          line. This parameter is ignored by a single-line edit control.

          lpch

          Value of lParam. Points to the buffer that receives a copy of the line.
          The first word of the buffer specifies the maximum number of characters
          that can be copied to the buffer.

          Return Values

          The return value is the number of characters copied. The return value is
          zero if the line number specified by the line parameter is greater than
          the number of lines in the edit control.

          Remarks

          The copied line does not contain a terminating null character.

          --
          Doyle Whisenant
          http://www.freewebs.com/mekdesign/
          "mechanic" at "sonet" dot "net"
        Your message has been successfully submitted and would be delivered to recipients shortly.