Hi all,
Where can I find good technical srticles about CControlBar and Docking
Windows?
Thanks.
1. Explorer application with CControlBar - VC MFC
2. CControlBar - draw inside the border
Hello, I am using a resizable CControlBar , I would like to know how can I draw inside the border when the ControlBar is Docked. My controlbar is always docked on the left. I would like to draw a triangle inside the border to minimise or maximise the ControlBar when clicking on it. I tried the function "DrawBorders" without any success.
3. CControlBar docking restrictions
4. Enable/Disable Menu item from CMenuBar derived from CControlBar
I hav a problem wrt Disabling Menu items from my menu done form CMenuBar derived from CControlBar /*----------------------------------------------------------------------------------*/ CFrameWnd* pMiniFrame = GetParentFrame(); ASSERT_KINDOF(CMiniFrameWnd, pMiniFrame); CMenu* pSysMenu = pMiniFrame->GetSystemMenu(FALSE); ASSERT_VALID(pSysMenu); pSysMenu->EnableMenuItem(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED) /*----------------------------------------------------------------------------------*/ This piece of code works and disables the CLOSE cross. But when i tried with my menu items, nothing is happening. Thanks in Advance, Please help -- frm Bangalore, India
5. Still Having CControlBar Problems
Env: WindowsXP, VC++6.00
In my app, there are some toolbars and an user can show/hide them freely
just as "docktool" sample in [MSDN]does. I make a pop-up Menu to set
show/hide them toolbars as follows,
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_RBUTTONDOWN)
{
CWnd* pWnd = CWnd::FromHandlePermanent(pMsg->hwnd);
CControlBar* pBar = DYNAMIC_DOWNCAST(CControlBar, pWnd);
if (pBar != NULL)
{
CMenu Menu;
CPoint pt;
pt.x = LOWORD(pMsg->lParam);
pt.y = HIWORD(pMsg->lParam);
pBar->ClientToScreen(&pt);
if (Menu.LoadMenu(IDR_TOOLBAR))
{
CMenu* pSubMenu = Menu.GetSubMenu(0);
if (pSubMenu!=NULL)
{
pSubMenu->TrackPopupMenu(TPM_LEFTALIGN |
TPM_RIGHTBUTTON,pt.x,pt.y,this);
}
}
}
}
return CFrameWnd::PreTranslateMessage(pMsg);
}
I hope the pop-up Menu will be showed only when I right-click their
toolbars. But when I right-click the statusbar of app, the pop-up Menu also
appears. That is, pBar is not equal to NULL.
So, how can I distinguish between CControlBar and CStatusBar?
TIA
William
7. CControlBar How to keep from minimizing when floating
8. Problems with CControlBar::SetSetBarStyle() in Visual Studio .NET