BBC BASIC for Windows
« EM_LINEINDEX and EM_LINELENGTH message for the IDE »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:49pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: EM_LINEINDEX and EM_LINELENGTH message for the IDE  (Read 413 times)
Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx EM_LINEINDEX and EM_LINELENGTH message for the IDE
« Thread started on: Jan 12th, 2011, 5:46pm »

Hi Richard,

As you have previously stated:

Quote:
Bear in mind that the BB4W program editor isn't a Windows edit control; it doesn't (in general) respond to EM_ messages, and those few it does respond to often don't work the way you might expect (since BB4W both sends and receives the messages, they are treated as 'private' messages, with custom content, even if they 'borrow' official Windows message numbers).


I notice that the EM_LINEINDEX and EM_LINELENGTH messages also seem not to work in a standard way (else I have completely <insert expletive here> up my code, which I have to agree, is highly likely).

Are there 'simple' replacements for these or should I just use the EM_GETLINE message (which I know works) to get the linelength?

It is not really an issue but I thought I would ask.

Michael
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: EM_LINEINDEX and EM_LINELENGTH message for the
« Reply #1 on: Jan 12th, 2011, 9:29pm »

on Jan 12th, 2011, 5:46pm, Michael Hutton wrote:
I notice that the EM_LINEINDEX and EM_LINELENGTH messages also seem not to work in a standard way

EM_LINELENGTH isn't used at all. EM_LINEINDEX is partially implemented, but the value it returns is not the offset from the start of the program but the absolute memory address. If you know the value of PAGE by other means, you can subtract it from the returned value to get the offset.

Richard.
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: EM_LINEINDEX and EM_LINELENGTH message for the
« Reply #2 on: Jan 13th, 2011, 03:52am »

OK, thank you. I was using some other code pasted into a new program and was confused by the apparent bug. It is easy this end to use a 'work round'.

Michael
User IP Logged

rtr2
Guest
xx Re: EM_LINEINDEX and EM_LINELENGTH message for the
« Reply #3 on: Jan 19th, 2015, 4:35pm »

on Jan 12th, 2011, 9:29pm, admin wrote:
If you know the value of PAGE by other means, you can subtract it from the returned value to get the offset.

BB4W v6.00a provides an 'official' way of obtaining the value of PAGE by means of a new message WMU_GETPAGE which has the value 1047. It takes no parameters (wParam and lParam are ignored).

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls