rollocool
asked on
Having Problems with AnimateWindow
hi
I want to hide my application on certain conditions when the
application is minimized. Till now i was using ShowWindow to achieve
this and it worked fine. Now when I am using the AnimateWindow API the
window gets hidden but the window's entry in the taskbar remains. I am
posting the code that i have written.
void CMainFrame::OnSysCommand(U INT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == SC_MINIMIZE)
{
if(bMinimizeToTray)
{
this->AnimateWindow(200,AW _HIDE |AW_SLIDE | AW_VER_POSITIVE);
// this->ShowWindow(SW_HIDE);
return;
}
}
CFrameWnd::OnSysCommand(nI D, lParam);
rollocool
I want to hide my application on certain conditions when the
application is minimized. Till now i was using ShowWindow to achieve
this and it worked fine. Now when I am using the AnimateWindow API the
window gets hidden but the window's entry in the taskbar remains. I am
posting the code that i have written.
void CMainFrame::OnSysCommand(U
{
if ((nID & 0xFFF0) == SC_MINIMIZE)
{
if(bMinimizeToTray)
{
this->AnimateWindow(200,AW
// this->ShowWindow(SW_HIDE);
return;
}
}
CFrameWnd::OnSysCommand(nI
rollocool
What happens if you uncomment line ShowWindow(SW_HIDE) ?
ASKER
hi
Doesn't make any difference whether i comment or uncomment the ShowWindow(SW_HIDE) line.
Doesn't make any difference whether i comment or uncomment the ShowWindow(SW_HIDE) line.
ASKER
i solved the problem myself
void CMainFrame::OnSysCommand(U INT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == SC_MINIMIZE)
{
if(bMinimizeToTray)
{
this->AnimateWindow(200,AW _HIDE |AW_SLIDE | AW_VER_POSITIVE);
// added these 2 lines
this->ShowWindow(SW_MINIMI ZE);
this->ShowWindow(SW_HIDE);
return;
}
}
CFrameWnd::OnSysCommand(nI D, lParam);
rollocool
void CMainFrame::OnSysCommand(U
{
if ((nID & 0xFFF0) == SC_MINIMIZE)
{
if(bMinimizeToTray)
{
this->AnimateWindow(200,AW
// added these 2 lines
this->ShowWindow(SW_MINIMI
this->ShowWindow(SW_HIDE);
return;
}
}
CFrameWnd::OnSysCommand(nI
rollocool
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.