• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

CControlBar/CToolBar : which side are they Docked to ?

I want to know which side (top, left etc.) are my CControlBars and Toolbars
are docked to ?
0
hasmet
Asked:
hasmet
1 Solution
 
jfhuangCommented:
It is easy. Assume that you know the pointer of a toolbar, say pMyBar, do as follows:

  UINT nDockBarID = (pMyBar.GetParent())->GetDlgCtrlID();

then you can check the value of nDockBarID, it can be one of four values:
switch(nDockBarID ){
   case AFX_IDW_DOCKBAR_TOP:
     
   case AFX_IDW_DOCKBAR_BOTTOM:

   case AFX_IDW_DOCKBAR_LEFT:

   case AFX_IDW_DOCKBAR_RIGHT:
}
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now