Hey,
On Windows I have a program written in Visual Basic that communicates with the gameserver
using the SendMessage () function.
(First finds the server window (this is the console window, so it is ConsoleWindowClass) using FindWindow () and then sends text commands.
Everything works beautifully on windows, but not on wine
This is the command I use:
SendMessage (vHwnd, WM_CHAR, Asc(99), CInt (0 &))
For example, you can use this program:
https://tools.stefankueng.com/SendMessage.html
Message: WM_CHAR
WPARAM: 99 to send to the console, for example, the letter C
Run cmd using the wineconsole cmd command
And try to find them and send a message ... Everything works on windows, but not on Linux.
How can this problem be solved?
SendMessage() and PostMessage()
Re: SendMessage() and PostMessage()
What exactly are the details for what fails? The sample pointed to by your link is a windowed program. You say yours in command line based?
I tried the sample program from the link and it runs but shows a completion code of zero which looks like it means it failed on the sendmessage.
So, is there perhaps a dll or two you need to include? if you use visual studio I think you can check those it is using in merge or some such place (I don't have it running under wine yet and don't currently have a Winodws PC anymore). Look at those then via winetricks see if they show as something you need to install.
I tried the sample program from the link and it runs but shows a completion code of zero which looks like it means it failed on the sendmessage.
So, is there perhaps a dll or two you need to include? if you use visual studio I think you can check those it is using in merge or some such place (I don't have it running under wine yet and don't currently have a Winodws PC anymore). Look at those then via winetricks see if they show as something you need to install.
Re: SendMessage() and PostMessage()
Hey,
I recorded a video to show how it should look.
https://www.youtube.com/watch?v=SByRm_A ... e=youtu.be
https://www.youtube.com/watch?v=SHJ8OOq ... e=youtu.be
On ubuntu it looks like this:
https://www.youtube.com/watch?v=461huP5 ... e=youtu.be
But only in the windows console.
iT works fine in other programs using WINE
https://www.youtube.com/watch?v=wBil8Ku ... e=youtu.be
https://studio.youtube.com/video/R_jE8BSvDcI/edit/basic
I recorded a video to show how it should look.
https://www.youtube.com/watch?v=SByRm_A ... e=youtu.be
https://www.youtube.com/watch?v=SHJ8OOq ... e=youtu.be
On ubuntu it looks like this:
https://www.youtube.com/watch?v=461huP5 ... e=youtu.be
But only in the windows console.
iT works fine in other programs using WINE
https://www.youtube.com/watch?v=wBil8Ku ... e=youtu.be
https://studio.youtube.com/video/R_jE8BSvDcI/edit/basic
Re: SendMessage() and PostMessage()
So, I'm confused. It's obviously a gui'd program. Just Visual Basic would indicate that. It looks to me as your samples in your recorded videos for how it should look is running the GUI I' a little confused when you say "only in windows console". Why not just run it as the GUI as per a normal wine installed program? Paste back a copy of your windows console so we can see what you mean by that.