With the help of CWnd::SetWindowText
method, I am able to set the desired caption, to my dailog based application. How can I make it left/right aligned?
To right-align dialog title, you need to set "Right Align Text" for the Dialog in the resource editor (corresponding extended style is WS_EX_RIGHT).
The WS_EX_LAYOUTRT style actually flips the dialog, so all controls are layed out from right-to-left. Title DOES get to the right, but the close button moves to the left. NOT what was asked in the original question.