Thursday, October 25, 2007

Remove the WS_BORDER style for a CEdit control programmatically?

void CMyEdit::RemoveBorder()

{

DWORD dwStyle = ::GetWindowLong(m_hWnd, GWL_EXSTYLE);

If (dwStyle & WS_EX_CLIENTEDGE)

{

ModifyStyleEx(WS_EX_CLIENTEDGE,0);

SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER );

}

}

No comments: