我在尝试用VC创建一个基于对话框的应用程序,然后自己在对话框的初始化函数中创建工具条和状态条。我用了下边的代码,但是什么也看不到。
下边是我的程序,请多多帮忙,谢谢大家
BOOL CDgn2shpDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_sLastDGNFileName = ReadDGNFileName();
// Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;

strAboutMenu.LoadString(IDS_ABOUTBOX); {
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
} // Set the icon for this dialog.  The framework does this automatically
//  when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here
// Add the ToolBar.
if (!m_wndToolBar.CreateEx( this, TBSTYLE_FLAT) ||
!m_wndToolBar.LoadToolBar(IDR_TOOLBAR_MAIN) )
{
TRACE0("Failed to create toolbar\n");
return -1;      // fail to create
} // TODO: Remove this if you don't want tool tips or a resizeable toolbar m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY  ); return TRUE;  // return TRUE  unless you set the focus to a control if (!m_pStatusBar->Create(WS_CHILD | WS_BORDER | WS_VISIBLE ,rect,this,IDC_STATUSBAR))
{
TRACE0("Status Bar not created!");
return -1;
}
m_pStatusBar->SetText("就绪", 0, 0);
m_pStatusBar->SetText(LPCTSTR(m_sLastDGNFileName),1,0); m_pcConvert.SetColor(RGB(0, 0, 255));
m_pcConvert.SetTextForeColor(RGB(0,0,160));
m_pcConvert.SetTextBkColor(RGB(255,255,255));
m_bConverting = FALSE;
m_bCanPause = FALSE;
}