I have tried using ModifyStyleEx() (and ModifyStyle()) to change the style
but they seem to have no effect. By checking and unchecking the Border
check box in the resource editor and then using GetStyleEx, I can tell the
the border corresponds to extended window style WS_EX_CLIENTEDGE =
0x00000200. I can reset it with ModifyStyleEx and use GetStyleEx() to tell
that it was changed, but the edit control displayed never changes it's
border. I have tried both ModifyStyleEx(WS_EX_CLIENTEDGE,0) and
ModifyStyleEx(WS_EX_CLIENTEDGE,SWP_NOSIZE) and also invalidating the window.
How the add and remove the border???????
Thanks for any help.
Ken
BOOL CSystemConfig::OnInitDialog()
{
CPropertyPage::OnInitDialog();
BOOL b = false;
m_pEdit = (CEdit*)GetDlgItem(IDC_EDIT);
//remove border
b = m_pEdit->ModifyStyle(WS_BORDER,0);
b = m_pEdit->ModifyStyleEx(WS_EX_CLIENTEDGE,0);
DWORD style = m_pEdit->GetStyle( );
DWORD Exstyle = m_pEdit->GetExStyle( );
}
Many controls do not reinitialize when the style bits are changed. You can make one edit in each style and make only the one you want visible.