不明白style &= ~(WS_MINIMIZEBOX);是什么意思?
三炮 2004-12-10 11:17:13 "style &= ~(WS_MINIMIZEBOX);"
能解释一下吗? & ~ ??
//使最小化按钮无效
void CMainFrame::OnDisableMinbox()
{
//获得窗口风格
LONG style = ::GetWindowLong(m_hWnd,GWL_STYLE);
MessageBox("%d",m_hWnd);
//设置新的风格
style &= ~(WS_MINIMIZEBOX);
::SetWindowLong(m_hWnd,GWL_STYLE,style);
//重化窗口边框
CRect rc;
GetWindowRect(&rc);
::SetWindowPos(m_hWnd,HWND_NOTOPMOST,rc.left,rc.top,rc.Width(),rc.Height(),SWP_DRAWFRAME);
}