Staredit Network > Forums > General StarCraft > Topic: Function to send message
Function to send message
Dec 19 2016, 1:48 am
By: iCCup.xboi209  

Dec 19 2016, 1:48 am iCCup.xboi209 Post #1



Does anyone know which WinAPI function StarCraft uses to send messages to the chat channel listbox? I'm interested in figuring out how to enable unicode chat.


Screenshot above shows me sending unicode messages via SendMessageW with success.



None.

Dec 19 2016, 3:24 am jjf28 Post #2

Cartography Artisan

listbox? If you mean the chatbox you could try SetWindowTextW(hWnd, str), WM_SETTEXT, WM_UNICHAR, or WM_KEYDOWN



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Dec 19 2016, 5:54 am iCCup.xboi209 Post #3



I know how to send messages myself, I just want to know which function StarCraft uses to send it. The chat channel uses what's called a List Box.



None.

Dec 19 2016, 11:23 pm jjf28 Post #4

Cartography Artisan

Ah to the message history listbox; that's a much more involved task...

I'd pull up a windowed StarCraft then hook it with Visual Studio's Spy++, find the listbox in the window tree and check its styles...

If it has LBS_HASSTRINGS... then it's a simple matter of LB_ADDSTRING or LB_INSERTSTRING with LPARAM as a pointer to the string (noteworthy that the strings passed could be inside a managed array inside of StarCraft rather than just something done in WinAPI).

If it doesn't have the LBS_HASSTRINGS style then the listbox contains pointers to something for which StarCraft's structs/code might have to be decompiled.

Post has been edited 1 time(s), last time on Dec 19 2016, 11:28 pm by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Dec 21 2016, 3:17 am iCCup.xboi209 Post #5



It does have LBS_HASSTRINGS, I'm just trying to figure out how SC passes strings to the listbox so that I could hook the function.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:54 pm]
Symmetry -- rigged
[09:44 pm]
l)ark_ssj9kevin -- Wing 140 box 2 days in a row o_o
[06:39 pm]
Vrael -- 6000 apm near perfect focus fire is yikes
[06:38 pm]
Vrael -- paralyze was metaphorically speaking, paralyzed
[06:38 pm]
Vrael -- wasnt even that really, they 6000 apm just made the terran army so much more value/$ that the extra economy didnt matter
[01:58 pm]
NudeRaider -- NudeRaider
NudeRaider shouted: Oh_Man nothing too special tbh. the human player wasn't ready to combat the push that stretched almost the whole map. So this game means nothing. We'll have to see how it goes once the humans have adjusted for its unorthodox strategies.
they basically lost most of their army in one big battle and didn't have the time and production to leverage the economic advantage and come back from that blow.
[01:55 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: https://youtu.be/1vsTqNwHquE omg guys it's happening. ITS HAPPENING. EVERONY STAY CALM. STAY F:wob::wob:CKING CALM!
not sure why you are so hyped, when basically the same happened 7 years ago with AlphaStar on SC2.
[01:53 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: 6000 apm XD, i dont even understand how it culd came back wen it was 5 base vs 2
nothing too special tbh. the human player wasn't ready to combat the push that stretched almost the whole map. So this game means nothing. We'll have to see how it goes once the humans have adjusted for its unorthodox strategies.
[10:59 am]
NimoStar -- "Sick" is the appropriate word for the disease that AI is foisting upon our society. Repent, ye sinners!
[06:32 am]
Ultraviolet -- that was pretty sick lol
Please log in to shout.


Members Online: NimoStar, Symmetry