ls.newbie
June 28th, 1999, 08:42 AM
I use a multiline CEdit-Control in my dialog-based
application, and want to be able to change the text-justification via radio-buttons. The CEdit-Control comes from the dialog-ressource. I tryed the following:
I have a CEdit member variable in my dialog-class,
which is initialized in "OnInitDialog"
mEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
There are 3 functions for left, center, right
that look like
void MyDlg::OnRadioRight()
{
mEdit->ModifyStyle(0, ES_RIGHT, SWP_NOSIZE);
mEdit->UpdateWindow();
mEdit->SetFocus();
}
Actually, this doesn't work.
Has anyone an idea, what's wrong.
Thanks for your help,
Lothar
application, and want to be able to change the text-justification via radio-buttons. The CEdit-Control comes from the dialog-ressource. I tryed the following:
I have a CEdit member variable in my dialog-class,
which is initialized in "OnInitDialog"
mEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
There are 3 functions for left, center, right
that look like
void MyDlg::OnRadioRight()
{
mEdit->ModifyStyle(0, ES_RIGHT, SWP_NOSIZE);
mEdit->UpdateWindow();
mEdit->SetFocus();
}
Actually, this doesn't work.
Has anyone an idea, what's wrong.
Thanks for your help,
Lothar