tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Bug while using SendMessageW winapi


From: Gray Programmerz
Subject: [Tinycc-devel] Bug while using SendMessageW winapi
Date: Tue, 29 Jun 2021 00:29:16 +0500

This is code that is used to append text to RESULTS textbox.

This works fine under VC++.
But in tcc and gcc, it includes unicode characters.
```
void appendText(LPARAM Text)
{
     int Lenght = GetWindowTextLength(RESULTS);
     SendMessageW(RESULTS, EM_SETSEL, Lenght, Lenght);
     SendMessageW(RESULTS, EM_REPLACESEL, TRUE, Text);
}
```

And this code works in all compilers.
```
void appendText(LPARAM Text)
{
     int Lenght = GetWindowTextLength(RESULTS);
     SendMessage(RESULTS, EM_SETSEL, Lenght, Lenght);
     SendMessage(RESULTS, EM_REPLACESEL, TRUE, Text);
}
```

Because, winapi is provided by VC++ team, so I believe their would be low chance of bug from them.
And tcc & tcc are 3rd party softwares. So may be its bug in tcc & gcc.
or may be its in VC++.

Thanks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]