Code:
case ID_ALIGN_LEFT:
{
HWND Active = (HWND)SendMessage(MDIClient, WM_MDIGETACTIVE, NULL, NULL);
if(Active == NULL)
{
PARAFORMAT pf;
pf.cbSize = sizeof(PARAFORMAT);
pf.dwMask = PFM_ALIGNMENT;
pf.wAlignment = PFA_LEFT;
SendMessage(GetDlgItem(Active, CHILD_EDIT), EM_SETPARAFORMAT, NULL, (LPARAM)&pf);
}
}
break;
is what I have for setting the alignment to left.
This is a MDI program, first I get the active window, then I make a PARAFORMAT structure (this is where i think im doing something wrong). Then i send the message to the Rich Edit control.
Thanks.