Hi guys,
Looking for some help..
In my current assignment, its needed to hide all the Dockeble panes and to get them back as they where before hiding. during hidden period, they should not be visible/available to the user. it is some how like closing the project and opening a new project in the Visual studio IDE.
However it is working fine with al the panes until they are not in the AutoHide mode. to resolve the issue, i first set Checked the Auto Hide state, if its true, then i set it to false.
Now as on getting back i want to turn the pane back in the Autohide state, i set it by calling the function:
SetAutoHideMode(TRUE, CBRS_ALIGN_ANY);
but then the application crashes
Here is the snap of the code to clear the problem: -
To Save the state, i did this:-
pPane is the pointer of the CDockablePane
m_nState = 0;
if(pPane->m_hWnd)
{
if(pPane->IsDocked() && pPane->IsAutoHideMode())
{
pPane->ToggleAutoHide();
m_nState = 1;
}
else if(pPane->IsVisible())
{
m_nState = 2;
}
pPane->ShowPane(FALSE, FALSE, FALSE);
}
To Set the previous state i did this:-
Here since i have passed the pointer with CPane
if(m_nState == 0)
{
return;
}
pPane->ShowPane(TRUE, FALSE, TRUE);
if((m_nState == 1) && pPane->IsDocked() && !pPane->IsAutoHideMode())
{
pPane->SetAutoHideMode(TRUE, CBRS_ALIGN_ANY);
}
And then It calles crash at BOOL CDockablePane::CheckStopSlideCondition(BOOL bDirection).
Regards
Harsh Shankar
VC++ developer