tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Bug while using SendMessageW winapi


From: lou
Subject: Re: [Tinycc-devel] Bug while using SendMessageW winapi
Date: Tue, 29 Jun 2021 08:58:03 +0900

On Tue, Jun 29, 2021 at 5:32 AM Gray Programmerz <hackrefisher@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.

 

reply via email to

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