liyanbe
Computer
- Nov 30, 2000
- 1
Hi,
I've got a win32 API and I want to make a toolbar.
I did it as follows :
LONG WINAPI
WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static PAINTSTRUCT ps;
static GLboolean left = GL_FALSE; /* left button currently down? */
static GLboolean right = GL_FALSE; /* right button currently down? */
TBBUTTON tb[2];
tb[0].iBitmap = 0;
tb[0].idCommand=IDM_STEP;
tb[0].fsState =TBSTATE_ENABLED;
tb[0].fsStyle = TBSTYLE_BUTTON;
tb[0].dwData = tb[0].iString = 0;
tb[1]= tb[0];
tb[1].iBitmap = 1;
tb[1].idCommand = IDM_BACK;
static HWND hwndTb;
static int id;
switch(uMsg) {
case WM_CREATE:
InitCommonControls();
hwndTb = CreateToolbarEx(hWnd,WS_CHILD|WS_VISIBLE|WS_BORDER,
0,1,hInstance,IDR_TOOLBAR1,tb,1,0,0,16,16,sizeof(TBBUTTON));
return 0;
Result :
th25test_11.obj : error LNK2001: unresolved external symbol __imp__CreateToolbarEx@52
th25test_11.obj : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
Debug/t25.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
t25.exe - 3 error(s), 0 warning(s)
What did I do wrong?
I've got a win32 API and I want to make a toolbar.
I did it as follows :
LONG WINAPI
WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static PAINTSTRUCT ps;
static GLboolean left = GL_FALSE; /* left button currently down? */
static GLboolean right = GL_FALSE; /* right button currently down? */
TBBUTTON tb[2];
tb[0].iBitmap = 0;
tb[0].idCommand=IDM_STEP;
tb[0].fsState =TBSTATE_ENABLED;
tb[0].fsStyle = TBSTYLE_BUTTON;
tb[0].dwData = tb[0].iString = 0;
tb[1]= tb[0];
tb[1].iBitmap = 1;
tb[1].idCommand = IDM_BACK;
static HWND hwndTb;
static int id;
switch(uMsg) {
case WM_CREATE:
InitCommonControls();
hwndTb = CreateToolbarEx(hWnd,WS_CHILD|WS_VISIBLE|WS_BORDER,
0,1,hInstance,IDR_TOOLBAR1,tb,1,0,0,16,16,sizeof(TBBUTTON));
return 0;
Result :
th25test_11.obj : error LNK2001: unresolved external symbol __imp__CreateToolbarEx@52
th25test_11.obj : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
Debug/t25.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
t25.exe - 3 error(s), 0 warning(s)
What did I do wrong?