jlilley
asked on
How to make resizable PropertySheet?
I'm using MFC, and trying to make a subclass of CPropertySheet that is resizable. I've tried to override CWnd::PreCreateWindow(), but it isn't called. I can catch WM_NCCREATE using the message map and OR in WS_THICKFRAME to the window style, but that seems to be ignored. Does anyone know how to do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
int CNSFlexPropertySheet::OnCr
{
if (CPropertySheet::OnCreate(
return -1;
LONG lSTYLE = GetWindowLong(m_hWnd,GWL_S
LONG lEXSTYLE = GetWindowLong(m_hWnd,GWL_E
if ((lSTYLE & DS_MODALFRAME) == DS_MODALFRAME)
{
lSTYLE &= ~(LONG)DS_MODALFRAME;
lSTYLE |= WS_THICKFRAME;
SetWindowLong(m_hWnd,GWL_S
}
if ((lEXSTYLE & WS_EX_DLGMODALFRAME) == WS_EX_DLGMODALFRAME)
{
lEXSTYLE &= ~(DWORD)WS_EX_DLGMODALFRAM
SetWindowLong(m_hWnd,GWL_E
}
else
{
lEXSTYLE |= (DWORD)WS_EX_CLIENTEDGE;
SetWindowLong(m_hWnd,GWL_E
}
return 0;
}