为什么工具栏与状态栏都是平的,没有立体感。
原码如下,不知道还有什么东西没有考虑到??#include <afxwin.h>
#include <afxext.h>
#include <afxcmn.h>
#include <afxdisp.h>        
CRect MyFrameRect(100,100,500,500);class CMyApp:public CWinApp
{
public:
BOOL InitInstance();
};
class CMyFrameWnd:public CFrameWnd
{
public:
CMyFrameWnd();
DECLARE_DYNCREATE(CMyFrameWnd)
public:
CStatusBar m_wndStatusBar; 
CToolBar   m_wndToolBar;
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
};
//----------------------------------------------------------
以上是main.h文件以下是main.cpp文件
//----------------------------------------------------------
#include "Main.h"
#include "resource.h"CMyApp theApp;static UINT indicators[] =
{
ID_SEPARATOR,           // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};
BOOL CMyApp::InitInstance()
{
m_pMainWnd=new CMyFrameWnd();
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}IMPLEMENT_DYNCREATE(CMyFrameWnd, CFrameWnd)BEGIN_MESSAGE_MAP(CMyFrameWnd, CFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()CMyFrameWnd::CMyFrameWnd()
{
  Create(NULL,"hello",WS_OVERLAPPEDWINDOW,MyFrameRect,NULL,MAKEINTRESOURCE(IDR_MENU2));
}
int CMyFrameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;

if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_TOOLBAR1))
{
TRACE0("Failed to create toolbar\n");
return -1;      // fail to create
} if (!m_wndStatusBar.Create(this))

{
TRACE0("Failed to create status bar\n");
return -1;      // fail to create
}
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return 0;
}