Remove WS_THICKFRAME style
-
I've read a lot that to make your window non-resizable that you need to remove the WS_THICKFRAME style, but I can't find here on Code Project, or MSDN, really how to do that. Can someone help me out? Danny The stupidity of others amazes me!
CAll GetWindowStyle() to retreive the style for the window. Then mask out the WS_THICKFRAME ( style = style & ~WS_THICKFRAME ); Then set the windows style with the new style mask using SetWindowStyle(). THen call SetWindowPos(hwnd_, NULL,0,0,0,0, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOSIZE); This will cause the window to be updated properly so that the style change is reflected visually. ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF!
-
I've read a lot that to make your window non-resizable that you need to remove the WS_THICKFRAME style, but I can't find here on Code Project, or MSDN, really how to do that. Can someone help me out? Danny The stupidity of others amazes me!
bugDanny wrote:
Can someone help me out?
Try:
BOOL CMainFrame::PreCreateWindow( CREATESTRUCT &cs )
{
if (! CFrameWnd::PreCreateWindow(cs))
return FALSE;cs.style &= ~WS\_THICKFRAME; return TRUE;
}
"Take only what you need and leave the land as you found it." - Native American Proverb
-
bugDanny wrote:
Can someone help me out?
Try:
BOOL CMainFrame::PreCreateWindow( CREATESTRUCT &cs )
{
if (! CFrameWnd::PreCreateWindow(cs))
return FALSE;cs.style &= ~WS\_THICKFRAME; return TRUE;
}
"Take only what you need and leave the land as you found it." - Native American Proverb