- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The documentation for em_getlline shows the syntax for the line as
i = SendMessage(hwnd, em_getline, wParam,lParam )
in which wParam is the zero based index of the line to retrieve and lParam is the buffer to load the line to. It also specifies that before making the call that the first word of the buffer must be set to the size of the buffer.
For the code section below, retrieve second line from edit box hedit, how would the length of the buffer (c) be added to the character string?
integer hedit
character*80 c
i = SendMessage(hedit, em_getline, 1,loc(c) )
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep, that requiresa C-ish thick. TRANSFER Fortran intrinsic does a bit-by-bit copy, so you can use it:
c(1:2) = TRANSFER(int2(len(c)), 'a')
this copies2 bytes containing LEN(c) into first two characters of c "as-is". (MSDNsaysthat the length should be aWORD = integer(2))
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jugoslav! That did the trick.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page