Search found 1431 matches

by jj2007
Apr 11, 2018 12:42
Forum: Beginners
Topic: How to change the back color of a control at runtime ?
Replies: 26
Views: 1896

Re: How to change the back color of a control at runtime ?

How can i use your idea in this setup ? No idea. I might get an idea, though, if you post complete working code where I could insert the missing bits. As it is now, your code is spread all over the place, and I won't have the time to put the pieces together. And btw, there is no need for a separate...
by jj2007
Apr 11, 2018 11:32
Forum: Beginners
Topic: How to change the back color of a control at runtime ?
Replies: 26
Views: 1896

Re: How to change the back color of a control at runtime ?

dodicat wrote:(I use fbide)
That could be the cause: The string in wcls is Unicode, but the compiler uses RegisterClassA and CreateWindowExA.
by jj2007
Apr 11, 2018 3:31
Forum: Linux
Topic: Sleep command issue
Replies: 40
Views: 3197

Re: Sleep command issue

What's wrong with GetKey, too simple...? It seems to work on all platforms, right?
jj2007 wrote:Sleep waits on Windows for FB32 and FB64. Same behaviour for Getkey:

Code: Select all

?"one"
getkey
?"two"
getkey
?"three"
getkey
?"four"
getkey
by jj2007
Apr 11, 2018 3:16
Forum: Beginners
Topic: How to change the back color of a control at runtime ?
Replies: 26
Views: 1896

Re: How to change the back color of a control at runtime ?

In your WndProc, add a handler for the WM_CTLCOLORxxx message (pseudo code, but tested and it works): Switch uMsg Case WM_CREATE SetBkMode(wParam, TRANSPARENT) ' the dc is in wParam hBrush=CreateSolidBrush, RgbCol(255, 255, 0) Case WM_CTLCOLOREDIT return hBrush @dodicat: Can't make your code work. W...
by jj2007
Apr 10, 2018 11:40
Forum: General
Topic: Curious from a performance perspective
Replies: 26
Views: 1408

Re: Curious from a performance perspective

Python it's a modern well written language and used C++ code under the hood today. My point was that even a language considered "slow" can produce fast applications, simply because the routines that do a lot of legwork, like sorting, can be written in C or assembler. So if FB is "slo...
by jj2007
Apr 10, 2018 2:45
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1281

Re: DOUBLE's fractional digits to ULONGINT ?

The constant must be the correct value in relation to the length of the number of digits in the double's fractional component - or else the resulting ulongint will either have too few or too many digits. Apparently you didn't read my post of Apr 09, 2018 2:16 above: There is no "correct" ...
by jj2007
Apr 09, 2018 20:46
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1281

Re: DOUBLE's fractional digits to ULONGINT ?

OK, it works: dim shared dest as double, dfu as ulongint, factor as ulongint=1000000000000000000ull asm push 3967 fclex fldcw word ptr [esp] pop edx end asm For ct as long=0 To 19 dest=Rnd Print dest, asm fld qword ptr [dest] fld st(0) frndint fsubp st(1) fild qword ptr [factor] fmulp st(1) fistp qw...
by jj2007
Apr 09, 2018 17:09
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1281

Re: DOUBLE's fractional digits to ULONGINT ?

Thanks, no more build errors. But the results do not convince me. Is ulongint = QWORD?
by jj2007
Apr 09, 2018 12:26
Forum: General
Topic: Curious from a performance perspective
Replies: 26
Views: 1408

Re: Curious from a performance perspective

When searching the Masm32 "Laboratory" for the string crt cycles , nineteen dedicated threads are found in the new forum, fifty or so in the old forum. For example, this one compares seven memcopy algos for a dozen alignment situations. For an assembler programmer, the ultimate satisfactio...
by jj2007
Apr 09, 2018 0:16
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1281

Re: DOUBLE's fractional digits to ULONGINT ?

The fpu has instructions that can isolate the fraction, but I can't get it to work in FB (Error: invalid use of register): d = RND() asm fld d asm fld st asm frndint asm fsubp asm fistp dfu It works fine in another Basic dialect, but is this the output you want? 0.6017979375239967265 601797937523996...
by jj2007
Apr 08, 2018 12:38
Forum: Beginners
Topic: how to set the dates?
Replies: 28
Views: 1883

Re: how to set the dates?

Looks strange, I know. But the purpose was to demonstrate how to do the 24-hourly "update". And let's leave some work for the OP, too ;-)
by jj2007
Apr 08, 2018 11:12
Forum: Linux
Topic: Sleep command issue
Replies: 40
Views: 3197

Re: Sleep command issue

Sleep waits on Windows for FB32 and FB64. Same behaviour for Getkey:

Code: Select all

?"one"
getkey
?"two"
getkey
?"three"
getkey
?"four"
getkey
by jj2007
Apr 08, 2018 11:03
Forum: Beginners
Topic: how to set the dates?
Replies: 28
Views: 1883

Re: how to set the dates?

your solution works, but it isn't updated, e.g. date change, while program is running. Of course, ptitjoz could restart the program every 24 hours, but if that is not an acceptable workaround, here is the solution for updating (hit Ctrl C to exit): 'Pgm testdate 'Mettre la date dans un autre format...
by jj2007
Apr 04, 2018 13:58
Forum: Tips and Tricks
Topic: Playing around with cards
Replies: 22
Views: 1679

Re: Playing around with cards

Did you get inspiration from the Masm32 thread started 5 days ago?

On Windows, you can use Cards.dll - code here.
Image
by jj2007
Mar 30, 2018 19:03
Forum: Windows
Topic: SetWindowSubclass
Replies: 23
Views: 2424

Re: SetWindowSubclass

PaulSquires wrote:The stricter type checking...
MASM is also very strict. If it's not a DWORD, you get warnings and sometimes even errors. Fortunately, in 99.9% of all cases it's indeed a DWORD ;-)

Go to advanced search