I am working on Microsoft Foundation Class (c++)chat application in which i want to show client message on right side of the list box,There is a property available "Right align text" but i want to do it by method. because default Left side text is also necessary for me.
Thank You.
Use ModifyStyleEx to add/remove the extended style WS_EX_RIGHT
as required, e.g. to right-align:
GetDlgItem(IDC_LIST1)->ModifyStyleEx(NULL, WS_EX_RIGHT);