×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

toolbar

toolbar

toolbar

(OP)
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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources