Recent Posts

Pages: [1] 2 3 ... 10
1
How do i control unicode character colors in richedit? Maybe that would be able todo it a 3rd way ala full zoomed in picture in paint,where the pixels are very big

2
https://www.betaarchive.com/forum/viewtopic.php?f=16&t=15317

Unfortunately I did not achieve success with these betaarchive guys ... and KarlG just banned me on his website .. Although there is a second KarlG, but it seems to me that this is definitely not the one we need.
KarlG 1 - https://cncwerk.de/forum/viewforum.php?f=2
KarlG 2 - https://www.kguttag.com/about-karl-guttag/

I haven’t written to the second Karl!  :biggrin:
3
The Workshop / Challenge: Insert .PNG from resource into Richedit
« Last post by AW on Today at 08:11:00 AM »
This is a demo based in this Murray Sargent article.
It inserts .PNGs into a Richedit control.
Previous Richedit controls support the insertion of .BMP images. Although the procedure for that is much more complicated, .BMPs  do not support as well the alpha channel which  means that images look bad when the background does not match the parent background.



I will provide the source code for this when someone posts something equivalent. If not, I will post the source code in about 1 month time.
4
The Laboratory / Re: Benchmark (for assemblers and compilers)
« Last post by jj2007 on Today at 08:08:13 AM »
Yes, a pointless test.

Because UTF8 behaves exactly like plain ANSI: a sequence of bytes. On my machine, gcc8_64 wins this test (attention, some return "found 0"):
Code: [Select]
TestLoadFileChClang8_64.exe
load: 2ms
process: 7ms, found 76
total: 9ms

TestLoadFileChmsvc.exe
load: 2ms
process: 8ms, found 0
total: 10ms

TestLoadFileChmsvcX64.exe
load: 2ms
process: 7ms, found 0
total: 10ms

TestLoadFileChgcc8X64.exe
load: 2ms
process: 4ms, found 76
total: 7ms

DSVRead_Test1gcc8_64.exe
load: 2ms
process: 4ms, found 76
total: 7ms

TestLoadFileChpocc8.exe
load: 2ms
process: 6ms, found 0
total: 8ms

TestLoadFileChpocc9.exe
load: 2ms
process: 10ms, found 0
total: 13ms

TestLoadFileChpocc864.exe
load: 3ms
process: 6ms, found 0
total: 9ms

TestLoadFileChpocc964.exe
load: 2ms
process: 7ms, found 0
total: 10ms

Which is still over a factor 2 slower than assembly, though ;)
5
The Laboratory / Re: Benchmark (for assemblers and compilers)
« Last post by TimoVJL on Today at 06:51:00 AM »
Yes, a pointless test.
The winner was gcc 8.2 x64
Code: [Select]
load: 5ms
process: 5ms, found 76
total: 11ms
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#ifndef NO_MALLOC
#include <stdlib.h>
#endif

int __cdecl main(int argc, char **argv)
{
LONGLONG freq, t1, t2, t3;
HANDLE hFile;
QueryPerformanceFrequency((LARGE_INTEGER *) & freq);
QueryPerformanceCounter((LARGE_INTEGER*)&t1);
if ((hFile = CreateFile("chinese.txt", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL)) == INVALID_HANDLE_VALUE)
return 1;
DWORD nRead, nMax;
nMax = GetFileSize(hFile, NULL);
#ifndef NO_MALLOC
char *pFile = malloc(nMax + 1); // malloc buffer
*(pFile + nMax) = 0; // EOF marker
#else
HANDLE hHeap = GetProcessHeap();
char *pFile = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, nMax + 1);
#endif
ReadFile(hFile, pFile, nMax, &nRead, NULL);
CloseHandle(hFile);
QueryPerformanceCounter((LARGE_INTEGER*)&t2);
char *pc = pFile;
char *pKey = u8"神 說";
int nFound = 0;
char *pcs = pKey;
while(*pc) {
while(*pc) {
if (*pc++ != *pcs) {
if (!*pcs) // end of search string
nFound++;
pcs = pKey; // reset search
break;
} else pcs++;
}
}
QueryPerformanceCounter((LARGE_INTEGER*)&t3);
printf("load: %dms\n", (int)((t2-t1) * 1000 / freq));
printf("process: %dms, found %d\n", (int)((t3-t2) * 1000 / freq), nFound);
printf("total: %dms\n", (int)((t3-t1) * 1000 / freq));
return 0;
}
6
The Laboratory / Re: Benchmark (for assemblers and compilers)
« Last post by jj2007 on Today at 05:55:00 AM »
Pretty big differences, astonishing.
Code: [Select]
TestLoadFileChClang8_64.exe
load: 7ms
process: 14ms, found 76
total: 24ms

TestLoadFileChmsvcX64.exe
load: 2ms
process: 8ms, found 76
total: 12ms

TestLoadFileChpocc8.exe
load: 2ms
process: 12ms, found 76
total: 16ms

TestLoadFileChpocc9.exe
load: 2ms
process: 10ms, found 76
total: 14ms

TestLoadFileChpocc864.exe
load: 2ms
process: 8ms, found 76
total: 11ms

TestLoadFileChpocc964.exe
load: 2ms
process: 8ms, found 76
total: 12ms
7
The Laboratory / Re: Benchmark (for assemblers and compilers)
« Last post by TimoVJL on Today at 05:10:28 AM »
with chinese.txt
Code: [Select]
TestLoadFileChClang8_64.exe
load: 5ms
process: 10ms, found 76
total: 15ms

TestLoadFileChmsvcX64.exe
load: 5ms
process: 16ms, found 76
total: 21ms
8
The Colosseum / Re: Is this site a Masm32 hi-jack ?
« Last post by Raistlin on Today at 04:27:53 AM »
When in doubt tools like
netcraft dot com - come in
handy. All sorts of intelligence
such as technology used, number
of hits, ISP etc. for any website
accessible via registered dns. 
9
MasmBasic & the RichMasm IDE / Re: GUI programming with events
« Last post by hutch-- on Today at 03:38:38 AM »
No, I did not realise at the time that I should have got the images from the earlier post. The resizing and stretching worked well on my box, very smooth and no flicker.
10
The Laboratory / Re: Benchmark (for assemblers and compilers)
« Last post by jj2007 on Today at 01:35:16 AM »
Good :t

Here is a Utf8 text file for download which I will remove later on. Grab it...
Code: [Select]
  NanoTimer()
  Let esi=FileRead$("Chinese.txt")
  PrintLine NanoTimer$(),  Str$(" for %i occurrences of '神 說'", Count(esi, "神 說", LastFileSize))
Code: [Select]
2944 µs for 76 occurrences of '神 說'
Pages: [1] 2 3 ... 10