Hello. I am outputting text to a textbox, how can i make it look centered in the box instead of left justified?

heres what i have so far....


invoke SetWindowText,hwndEdit,eax



I did a search for centering text but didnt get any revelant hits.

thanks in advance. SD
Posted on 2003-05-03 10:59:16 by SirDan
Create the edit box with the ES_CENTER style. Pay attention that if you are using Win95 it only works if the edit box is multiline.

From MSDN:
ES_CENTER
Windows 98/Me, Windows 2000/XP: Centers text in a single-line or multiline edit control.
Windows 95, Windows NT 4.0 and earlier: Centers text in a multiline edit control.
Posted on 2003-05-03 11:36:49 by LuHa