On Tue, Jun 29, 2021 at 5:32 AM Gray Programmerz <hackrefis...@gmail.com>
wrote:

> 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
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel


It could be that in your vc++ project you defined "UNICODE" (or checked the
'Use Unicode" checkbox) but forgot to define it when you compiled with tcc
& gcc.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to