在CMainFrame定义:
CCoolDialogBar m_wndDialogBar;
CTestDlg3 *pDlg;
/////////////////////
pDlg=new CTestDlg;
if (!m_wndDialogBar.Create(this, pDlg1, CString("CoolBar Demo1"), IDD_DIALOG1))
{
TRACE0("Failed to create dialogbar\n");
return 0; // fail to create
}
m_wndDialogBar.SetBarStyle(m_wndDialogBar.GetBarStyle()|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC); CTestDlg中定义一个字符串变量 m_str。
我想点击CTestDlg中的按钮,让m_str在应用程序的客户区中显示出来
单文档的应用程序。
谢谢大家了。
[email protected]
CCoolDialogBar m_wndDialogBar;
CTestDlg3 *pDlg;
/////////////////////
pDlg=new CTestDlg;
if (!m_wndDialogBar.Create(this, pDlg1, CString("CoolBar Demo1"), IDD_DIALOG1))
{
TRACE0("Failed to create dialogbar\n");
return 0; // fail to create
}
m_wndDialogBar.SetBarStyle(m_wndDialogBar.GetBarStyle()|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC); CTestDlg中定义一个字符串变量 m_str。
我想点击CTestDlg中的按钮,让m_str在应用程序的客户区中显示出来
单文档的应用程序。
谢谢大家了。
[email protected]
CWnd* pParentWnd,
LPCTSTR lpszTemplateName,
UINT nStyle,
UINT nID
);
显然你想用CTestDlg3作为一个模板来创建m_wndDialogBar。
lpszTemplateName
A pointer to the name of the CDialogBar object's dialog-box resource template.
注意:1) 模板是资源模板,ID或字符串资源名,而不是现成的对话框;
2) CDigalogBar的基类并非CDialog,而是CControlBar。
但是我想点击CTestDlg3中按纽,在客户区中绘制图形,曲线的。
我应该怎么作呢?告诉我好么!