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.
[2021-12-04. : 10:11 pm]
Ultraviolet -- DarkenedFantasies
DarkenedFantasies shouted: sraw531 It's misleading or incorrect by saying it's a brood war trigger. It's a "1.04 feature", only making it incompatible with the retail game version but it still works with both original and brood war 1.04+. If the trigger doesn't work for you, you messed something up.
ohh I see, still can have scm file, but it changes the format to SC hybrid map instead of just SC map
[2021-12-04. : 7:53 pm]
DarkenedFantasies -- sraw531
sraw531 shouted: anyone here know why alliance triggers seem to be broodwar specific according to scmdraft2?
It's misleading or incorrect by saying it's a brood war trigger. It's a "1.04 feature", only making it incompatible with the retail game version but it still works with both original and brood war 1.04+. If the trigger doesn't work for you, you messed something up.
[2021-12-04. : 4:34 am]
Slyence -- Ohh. Sneaky emote. Hmmmm
[2021-12-04. : 4:01 am]
lil-Inferno -- Slyence
Slyence shouted: Does anyone know if Voyager is still around?
he is but you'll have way better lucc finding him on SEN discord
[2021-12-04. : 3:04 am]
Ultraviolet -- Slyence
Slyence shouted: Sorry about all the reminiscing. Just brings back the good Ole days.
we don't do that here :shifty:
[2021-12-04. : 3:03 am]
Ultraviolet -- sraw531
sraw531 shouted: anyone here know why alliance triggers seem to be broodwar specific according to scmdraft2?
no idea why, but just confirmed through a small test that you're correct
[2021-12-04. : 3:01 am]
Ultraviolet -- NudeRaider
NudeRaider shouted: NudeRaider *sigh* n
oh I didn't know wtf you were going for lol
[2021-12-04. : 2:43 am]
sraw531 -- literally just copied the trigger from the original map and changed the location name and it breaks...
[2021-12-04. : 2:33 am]
sraw531 -- trying to make a remake of Terran9, which has zerg and protoss who hate each other
[2021-12-04. : 2:32 am]
sraw531 -- anyone here know why alliance triggers seem to be broodwar specific according to scmdraft2?
Please log in to shout.


Members Online: Roy, jjf28, Hoangquan123