怎么实现像任务管理器一样双击属性页该页变大,再双击还原
如何实现像任务管理器一样双击属性页该页变大,再双击还原?
RT
变大我知道.
下面是我的代码,但是还原的时候和原来的不一样
void CPage::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(!flag)
{
flag = true;
myparent = GetParent();
GetClientRect(&myrect);
CRect rect;
CWnd *parentWnd = GetParent()-> GetParent();
parentWnd-> GetWindowRect(&rect);
SetParent(GetDesktopWindow());
MoveWindow(&rect);
parentWnd-> ShowWindow(SW_HIDE);
}
else
{
flag = false;
MoveWindow(&myrect);
SetParent(myparent);
CWnd *parentWnd = myparent-> GetParent();
parentWnd-> ShowWindow(SW_SHOW);
}
CPropertyPage::OnLButtonDblClk(nFlags, point);
}
------解决方案--------------------
ShowWindow(SW_HIDE), SetParent 没必要
------解决方案--------------------
GetWindowRect(&myrect);
以下是又击对话框中任一位置时最大化的代码,
static BOOL flag = FALSE;
// TODO: Add your message handler code here and/or call default
if(!flag)
{
flag = TRUE;
GetWindowRect(&myrect);
CRect rect;
MoveWindow(100,100,800,600);
}
else
{
flag = FALSE;
MoveWindow(&myrect);
}
==========================================
以上意见仅供参考
------解决方案--------------------
以下是双击对话框中任一位置时最大化的代码,
RT
变大我知道.
下面是我的代码,但是还原的时候和原来的不一样
void CPage::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(!flag)
{
flag = true;
myparent = GetParent();
GetClientRect(&myrect);
CRect rect;
CWnd *parentWnd = GetParent()-> GetParent();
parentWnd-> GetWindowRect(&rect);
SetParent(GetDesktopWindow());
MoveWindow(&rect);
parentWnd-> ShowWindow(SW_HIDE);
}
else
{
flag = false;
MoveWindow(&myrect);
SetParent(myparent);
CWnd *parentWnd = myparent-> GetParent();
parentWnd-> ShowWindow(SW_SHOW);
}
CPropertyPage::OnLButtonDblClk(nFlags, point);
}
------解决方案--------------------
ShowWindow(SW_HIDE), SetParent 没必要
------解决方案--------------------
GetWindowRect(&myrect);
以下是又击对话框中任一位置时最大化的代码,
static BOOL flag = FALSE;
// TODO: Add your message handler code here and/or call default
if(!flag)
{
flag = TRUE;
GetWindowRect(&myrect);
CRect rect;
MoveWindow(100,100,800,600);
}
else
{
flag = FALSE;
MoveWindow(&myrect);
}
==========================================
以上意见仅供参考
------解决方案--------------------
以下是双击对话框中任一位置时最大化的代码,