Search found 175 matches

by RNBW
Oct 07, 2018 10:29
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

I have posted an example of numeric entry in a grid of textboxes using Lothar Schirm's Simple Windows API Library here https://www.freebasic.net/forum/viewtopic.php?f=8&t=24617&start=45, which followers of this thread may have an interest.
by RNBW
Oct 07, 2018 10:25
Forum: Projects
Topic: Simple WinAPI GUI library
Replies: 53
Views: 9760

Re: Simple WinAPI GUI library

My reason for wanting the simple numeric input routine I previously posted, is so that I can use it to enter numerics into a grid of textboxes for a program I am developing. I have now got this working and the code (again using Lothar Schirm's Simple Windows API Library) is shown below. What remain...
by RNBW
Sep 26, 2018 10:32
Forum: Projects
Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated November 13, 2018)
Replies: 448
Views: 38801

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated September 5, 2018)

I use the WinFBE Editor most of the time now for FreeBASIC programming. I know the following is hotly disputed, but what I miss most is the ability to do a hard printout of all or part of my code to a printer. Is there any chance that this facility could be included? The WinFBE Editor is not alone i...
by RNBW
Sep 01, 2018 10:09
Forum: Beginners
Topic: Simple example: Subclassing of an edit control
Replies: 17
Views: 831

Re: Simple example: Subclassing of an edit control

That's even more interesting, giving an idea how to deal with more than one edit control, including colouring the control. I'm going to be busy for the next week, but as soon as possible I'd like to have a good look at the code. The more examples we see, the more a pattern develops and everything wi...
by RNBW
Aug 31, 2018 8:48
Forum: Beginners
Topic: Simple example: Subclassing of an edit control
Replies: 17
Views: 831

Re: Simple example: Subclassing of an edit control

An interesting start to the subject. Please continue with more examples.
by RNBW
Aug 30, 2018 16:13
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBoxLothar

The following is an example of filtered numeric entry into a StringGadget (textbox) using subclassing and FBGUI Library for Windows Glad to see you start liking the subclassing technique ;-) I think it is probably stretching it a bit to say that I like the subclassing technique, because I still don...
by RNBW
Aug 29, 2018 23:03
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBoxLothar

The following is an example of filtered numeric entry into a StringGadget (textbox) using subclassing and FBGUI Library for Windows 2. It is a replica of that for Lothar Schirm's Simple WinAPI Library in the last post. '================================ ' NUMERIC INPUT INTO A STRINGGADGET ' Uses: FBG...
by RNBW
Aug 29, 2018 22:50
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

I've had a look at the code and I think I understand what has been done. I can't say that I actually understand what is going on but I can see it. I've put some additional notes in the code to help me in the future (I have the memory span of a gnat!) and I've also incorporated Paul Squires' suggest...
by RNBW
Aug 28, 2018 20:31
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

That could be useful to limit the characters in a textbox.
by RNBW
Aug 28, 2018 20:11
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

jj2007 wrote:> txtpos=SendMessage(hWnd, EM_GETSEL, 0, 0) and 127
The and 127 just eliminates the HIWORD of the return value. In non-sloppy code, it would be and 65535 ;-)

Thank you for the explanation. Should I use 65535?
by RNBW
Aug 28, 2018 19:14
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

I've had a look at the code and I think I understand what has been done. I can't say that I actually understand what is going on but I can see it. I've put some additional notes in the code to help me in the future (I have the memory span of a gnat!) and I've also incorporated Paul Squires' suggesti...
by RNBW
Aug 28, 2018 18:42
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

The code is similar to that you posted for me earlier, but I have extended the wparam check. That was pretty close already. I've shortened it a little bit - tell me if it's OK now: REM============================================= ' NUMERIC INPUT IN A TEXTBOX ' NumericInputInTextBox_03.bas ' This do...
by RNBW
Aug 28, 2018 14:13
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

... ASCII 57. I have tried to extend this to check for admissable characters with absolutely no success and because I don't understand the subclassing I don't know what I am doing wrong. If you post your code, I can look at it this evening. It's probably a minor issue. All you have to do is: - read...
by RNBW
Aug 28, 2018 12:04
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

There is not need of a tutorial for something so simple. SetWindowSubclass hCtl, CAST(SUBCLASSPROC, @MySubclassProc), uIdSubclass, dwRefData Where hCtl is the handle of the control to subclass, uIdSubclass and identidier, e.g. 1, and dwRefData a pointer to reference data (can be NULL). ' ==========...
by RNBW
Aug 28, 2018 10:06
Forum: Tips and Tricks
Topic: Numeric Entry in an EditBox
Replies: 111
Views: 4488

Re: Numeric Entry in an EditBox

> The last para of SetWindowLongPtr is definitely a pointer - to the WndProc. Looks like a FB bug. In any case, it works, and you can ignore the warning. It is not a FB bug. In the declare, it is defined as a LONG (32-bit) or LONG_PTR (64-bit), that is an scalar. Therefore, if you want to pass a po...

Go to advanced search