|
在PDA中用MFC写的一个工具栏,为什么不能显示出来?
[复制链接]
写了这样的
DWORD dwStyle = WS_VISIBLE | WS_CHILD | TBSTYLE_TOOLTIPS | CCS_NOPARENTALIGN;
HandTB = CreateToolbarEx(m_hWnd,
dwStyle,
(UINT) IDR_TOOLBAR1,
5,
::AfxGetInstanceHandle(),
IDR_TOOLBAR1,//IDB_BITMAP3
tbButton,
sizeof (tbButton) / sizeof (TBBUTTON),
0,
0,
16,
15,
sizeof (TBBUTTON));
SHMENUBARINFO mbi;
memset(&mbi, 0, sizeof(SHMENUBARINFO));
mbi.cbSize = sizeof(SHMENUBARINFO);
mbi.dwFlags = SHCMBF_HMENU;//;SHCMBF_HIDESIPBUTTON SHCMBF_HMENU SHCMBF_COLORBK SHCMBF_EMPTYBAR
mbi.hwndParent = m_hWnd;
mbi.nToolBarId = IDR_MENU2;
mbi.hInstRes = ::AfxGetInstanceHandle();
mbi.nBmpId = 0;
mbi.cBmpImages = 0;
SHCreateMenuBar(&mbi);
老是显示不出来,不知道是哪里有问题
|
|