LB Booster
« pressing ESC aborts the program »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:41am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 veryhotthread  Author  Topic: pressing ESC aborts the program  (Read 1532 times)
tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: pressing ESC aborts the program
« Reply #18 on: Sep 16th, 2016, 09:28am »

I would like to remind that problem occurs then single-line edit has focus in ordinary window.
So that problem with multiline edit likely different thing.

Yes I tried trapclose workaround and it worked all few times I tried.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: pressing ESC aborts the program
« Reply #19 on: Sep 16th, 2016, 10:48am »

on Sep 16th, 2016, 09:28am, tsh73 wrote:
I would like to remind that problem occurs then single-line edit has focus in ordinary window. So that problem with multiline edit likely different thing.

No, in both LB 4 and LBB a single-line TEXTBOX is a multiline edit control. You can confirm that using this code:

Code:
    textbox #w.tb, 10, 10, 200, 25
    open "Textbox style test" for window as #w
    htb = hwnd(#w.tb)
    calldll #user32, "GetWindowLongA", htb as ulong, _
      _GWL_STYLE as long, style as long
    print dechex$(style)
    wait 

You will see that in both LB 4 and LBB the following value is printed in the mainwin:

Style Code:
508100C4 

The 4 in the least-significant digit position indicates that it is a multiline edit control (ES_MULTILINE = 4), despite the fact that it has only one line!

It is clearly the case that the Edit Control bug (which I have now found many references to, including at the PowerBASIC forum) is the reason for the observed behavior.

Richard.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: pressing ESC aborts the program
« Reply #20 on: Sep 16th, 2016, 11:00am »

Quote:
No, in both LB 4 and LBB a single-line TEXTBOX is a multiline edit control.

Err... I remember reading something about LB TEXTBOX allows multiline.
I did not expected single line control use "multiline edit control".

I wonder why LBB uses multiline edit for singleline TEXTBOX?
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: pressing ESC aborts the program
« Reply #21 on: Sep 16th, 2016, 11:47am »

on Sep 16th, 2016, 10:48am, Richard Russell wrote:
No, in both LB 4 and LBB a single-line TEXTBOX is a multiline edit control.

Here's an even more direct demonstration. In the program below I explicitly create a single-line edit control by clearing the ES_MULTILINE bit using stylebits; in this case pressing Esc does not close the window:

Code:
    textbox #w.tb, 10, 10, 200, 25
    stylebits #w.tb, 0, _ES_MULTILINE, 0, 0
    open "Textbox style test" for window as #w
    wait 

Quote:
I wonder why LBB uses multiline edit for singleline TEXTBOX?

Because LB 4 does!! It's necessary for compatibility (there are LB programs which depend on it).

Richard.
« Last Edit: Sep 16th, 2016, 11:49am by Richard Russell » User IP Logged

metro
New Member
Image


member is offline

Avatar




PM


Posts: 8
xx Re: pressing ESC aborts the program
« Reply #22 on: Sep 16th, 2016, 2:09pm »

I have tinkered with two of my programs to get them to run in LBB both have Richards work around and am happy to say... "all good."

Each program is used daily and handle the many times I accidentally press ESC twice when closing a dialog to drop back to the main window.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: pressing ESC aborts the program
« Reply #23 on: Sep 19th, 2016, 07:52am »

Hello Richard
If
Quote:
No, in both LB 4 and LBB a single-line TEXTBOX is a multiline edit control.


what is TEXTEDITOR control?

(after all, window closes only then focus is on TEXTBOX)
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: pressing ESC aborts the program
« Reply #24 on: Sep 19th, 2016, 1:50pm »

on Sep 19th, 2016, 07:52am, tsh73 wrote:
what is TEXTEDITOR control?

That's an Edit Control too, but I'm not sure what the stylebits settings are offhand (I'm away from home at the moment).

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: pressing ESC aborts the program
« Reply #25 on: Sep 19th, 2016, 6:45pm »

on Sep 19th, 2016, 1:50pm, Richard Russell wrote:
That's an Edit Control too

I can confirm that it's a superclassed (not subclassed) multiline Edit Control. So it has a different class name (LBBEDIT) and extended functionality - which it needs for compatibility with LB's custom TEXTEDITOR control - but is based on a standard Edit Control.

Richard.
User IP Logged

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

| |

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