Windows编程中创建工具条的问题(着急&&郁闷)
xlccf 2002-05-17 09:06:48 过程:
HWND m_hToolBar;// This is in voicepad.h
//in which the VoicePad class is declared.
//The code segment below is in VoicePad.cpp
m_hToolBar=NULL;//initialize
m_hToolBar=::CreateToolbarEx(hWnd,WS_CHILD|WS_BORDER|WS_VISIBLE|TBSTYLE_TOOLTIPS,
IDR_TOOLBAR,5,m_hInst,NULL,0,0,0,0,0,sizeof(TBBUTTON));
if(!m_hToolBar)
{
return FALSE;
}
TBBUTTON tbButtons[5];
tbButton[0].iBitmap=0;
tbButton[0].idCommand=IDM_DICTATION_MODE;
... ...
tbButton[4].iString=0;
::SendMessage(m_hToolBar,TB_ADDBUTTONS,5,(LONG)tbButtons);
::SendMessage(m_hToolBar,TB_AUTOSIZE,0,0);
... ...
错误信息:
Linking...
VoicePad.obj : error LNK2001:unresolved external symbol __imp__CreateToolbarEx@52
debug/voicepad.exe :fatal error LNK 1120: 1 unresolved externals
error executing link.exe.