vc中如何隐藏标题栏、显示标题栏?
void CDlg::ShowCaption() //显示标题
{
LONG style = GetWindowLong(m_hWnd,GWL_STYLE);
style |= WS_CAPTION;
SetWindowLong(m_hWnd,GWL_STYLE,style);
RECT r;
GetWindowRect(&r);
r.bottom++;
MoveWindow(&r);
}
void CDlg::HideCaption() //隐藏标题
{
long style = GetWindowLong(m_hWnd,GWL_STYLE);
style &= ~(WS_CAPTION);
SetWindowLong(m_hWnd,GWL_STYLE,style);
RECT r;
GetWindowRect(&r);
r.bottom++;
MoveWindow(&r);
}
{
LONG style = GetWindowLong(m_hWnd,GWL_STYLE);
style |= WS_CAPTION;
SetWindowLong(m_hWnd,GWL_STYLE,style);
RECT r;
GetWindowRect(&r);
r.bottom++;
MoveWindow(&r);
}
void CDlg::HideCaption() //隐藏标题
{
long style = GetWindowLong(m_hWnd,GWL_STYLE);
style &= ~(WS_CAPTION);
SetWindowLong(m_hWnd,GWL_STYLE,style);
RECT r;
GetWindowRect(&r);
r.bottom++;
MoveWindow(&r);
}