I want to fully justify text in rich text box. I have found some code from net but its not working. Code is here

Public Function SetAlignment(lHwnd As Long, ByVal eAlign As ERECParagraphAlignmentConstants)
Dim tP2 As PARAFORMAT2
Dim lR As Long
tP2.dwMask = PFMALIGNMENT
tP2.cbSize = Len(tP2)
tP2.wAlignment = eAlign
lR = SendMessageLong(lHwnd, EMSETTYPOGRAPHYOPTIONS, _ TOADVANCEDTYPOGRAPHY, TOADVANCEDTYPOGRAPHY)
lR = SendMessage(lHwnd, EMSETPARAFORMAT, 0, tP2)
End Function

The Justified text breaks at different lines.

Any ideas.
Regards,
MA Awan