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.




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



Rs_yes-im4real - Clan Aura - jjf28.net84.net

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.




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.



Rs_yes-im4real - Clan Aura - jjf28.net84.net

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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:58 pm]
Pr0nogo -- Suicidal Insanity
Suicidal Insanity shouted: Moose Naw - if that is an option, it should be a global option
agreed
[02:58 pm]
Pr0nogo -- no problem
[11:47 am]
rnDPrc -- Pr0nogo
Pr0nogo shouted: though idk if you can extract them from scr anymore since casc took effect, so you can download them here
Thank you :)
[11:28 am]
Suicidal Insanity -- Pr0nogo
Pr0nogo shouted: though idk if you can extract them from scr anymore since casc took effect, so you can download them here
SC:R still ships with all the old MPQs
[11:26 am]
Suicidal Insanity -- Otherwise it clutters up the UI and you have inconsistent names from location to location
[11:26 am]
Suicidal Insanity -- Moose
Moose shouted: Basically, anywhere that supports custom unit names should have an option to use the originals imo
Naw - if that is an option, it should be a global option
[11:10 am]
Pr0nogo -- though idk if you can extract them from scr anymore since casc took effect, so you can download them here
[11:08 am]
Pr0nogo -- rnDPrc
rnDPrc shouted: Where can I learn more about the default AI Scripts behavior? I'm having some problems here
extract the scripts using pympq and open them in pyai (using the python modding suite) and use nekron's guide as a reference
[10:57 am]
NudeRaider -- http://www.staredit.net/372001/ thou shalt not judge
[10:18 am]
rnDPrc -- I mean the Run AI Script trigger choices
Please log in to shout.


Members Online: Roy