Is it possible to change the style of a CStatic run-time (for example make sunken)?
I tried to use
ModifyStyleEx(0, WS_EX_CLIENTEDGE)
but it doesn't work
Use ClassWizard to create a class derived from CStatic. Use the wizard to coverload the PreCreateWindow() member function:
class CMyStatic : public CStatic
{
...
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
...
};
BOOL CMyClass:reCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
cs.dwStyle |= WS_EX_CLIENTEDGE;
return baseCEditResponseCode:reCreateWindow(cs);
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.