if (!m_wndOptionDialogBar.Create(this, IDD_OPTION_BAR,
CBRS_ALIGN_RIGHT | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_HIDE_INPLACE,
ID_OPTION_CHANGE))
{
TRACE0("Failed to create dialog bar m_wndOptionDialogBar\n");
return -1; // fail to create
}
CDialogBar::Create 
BOOL Create( CWnd* pParentWnd, LPCTSTR lpszTemplateName, UINT nStyle, UINT nID );BOOL Create( CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID );Return ValueNonzero if successful; otherwise 0.ParameterspParentWndA pointer to the parent CWnd object.lpszTemplateNameA pointer to the name of the CDialogBar object’s dialog-box resource template.nStyleThe alignment style of the dialog bar. The following styles are supported: CBRS_TOP   Control bar is at the top of the frame window. 
CBRS_BOTTOM   Control bar is at the bottom of the frame window.
CBRS_NOALIGN   Control bar is not repositioned when the parent is resized.
CBRS_LEFT   Control bar is at the left of the frame window.
CBRS_RIGHT   Control bar is at the right of the frame window. 
nIDThe control ID of the dialog bar.nIDTemplateThe resource ID of the CDialogBar object’s dialog-box template.create中的最后一个参数  ID_OPTION_CHANGE 大家给我解释一下?????

解决方案 »

  1.   

    create中的最后一个参数  ID_OPTION_CHANGE 大家给我解释一下????? 
      

  2.   

    ID_OPTION_CHANGE 是 bar 的 ID
    凡是窗口都有ID. 比如按钮 IDC_BUTTON1
    bar是自窗口,要给它一个ID.
    GetDlgItem(什么什么ID) 就是这个ID。
      

  3.   

    bar是自窗口 → bar是子窗口
      

  4.   

    nID The control ID of the dialog bar. nIDTemplate The resource ID of the CDialogBar object’s dialog-box template. 懂的 这两个参数 能给我详细解释一下
      

  5.   

    不同具体的对话框模板生成的bar,其ID就是那个模板的ID