Hi,
I've got the same problem. When I type : CToolBar m_wndToolBar; I've got errors,
because he doesn't know CToolBqr. So I tried it on an outher way, but I still haven't a
solution because there are still some errors and I don't know how to solve them.
This is what I wrote :
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.
Do you know what is wrong?