how can i check where the toolbar is docked ?
i want to see where the toolbar is docked (top, bottom, right or left) when i am leaving the program for saving/restore purposes...
i loose myself in that MFC sources so i need help...
thanx
Printable View
how can i check where the toolbar is docked ?
i want to see where the toolbar is docked (top, bottom, right or left) when i am leaving the program for saving/restore purposes...
i loose myself in that MFC sources so i need help...
thanx
Get the toolbar's style and check for the CBRS_ALIGN_ bit settings
Hope it will help youCode:if (!this->m_wndToolBar.IsFloating()) {
switch (this->m_wndToolBar.GetBarStyle() & CBRS_ALIGN_ANY) {
case CBRS_ALIGN_TOP:
MessageBox("Docking = Top");
break;
case CBRS_ALIGN_BOTTOM:
MessageBox("Docking = Bottom");
break;
case CBRS_ALIGN_LEFT:
MessageBox("Docking = Left");
break;
case CBRS_ALIGN_RIGHT:
MessageBox("Docking = Right");
break;
default:
MessageBox("Docking = Unknown");
}
}
else MessageBox("Not docked");