This 'answer' doesn't relate directly to the original question, but I came across this page while trying to find a solution for a very similar issue.
Whenever I moved the splitter about it would always ping back to the original position. Turns out that DESKBANDINFO
mode flags are not particularly well named for vertical sidebars. I was using DBIMF_NORMAL
when I should have been using DBIMF_VARIABLEHEIGHT
.
Example code:
STDMETHODIMP CMyExplorerBar::GetBandInfo(DWORD dwBandID,
DWORD dwViewMode,
DESKBANDINFO* pdbi)
{
if(pdbi)
{
m_dwBandID = dwBandID;
m_dwViewMode = dwViewMode;
if(pdbi->dwMask & DBIM_MINSIZE)
{
pdbi->ptMinSize.x = 30;
pdbi->ptMinSize.y = 30;
}
if(pdbi->dwMask & DBIM_MAXSIZE)
{
pdbi->ptMaxSize.x = -1;
pdbi->ptMaxSize.y = -1;
}
if(pdbi->dwMask & DBIM_INTEGRAL)
{
pdbi->ptIntegral.x = 1;
pdbi->ptIntegral.y = 1;
}
if(pdbi->dwMask & DBIM_ACTUAL)
{
pdbi->ptActual.x = 500;
pdbi->ptActual.y = 0;
}
if(pdbi->dwMask & DBIM_TITLE)
{
StringCchCopy(pdbi->wszTitle, 256, L"My Sidebar");
}
if(pdbi->dwMask & DBIM_MODEFLAGS)
{
pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT;
}
if(pdbi->dwMask & DBIM_BKCOLOR)
{
pdbi->dwMask &= ~DBIM_BKCOLOR;
}
return S_OK;
}
return E_INVALIDARG;
}