Menu

Showing Standard Toolbar Images

2001-10-22
2012-09-26
  • Nobody/Anonymous

    Can U Dig It, SUKKAAAAAAAAAAAAAAAAAAAAAAAAAAA?

    Anway, I would like to know how to use the standard buttons. Here is the source code i use to create the toolbar:

    hwndToolBar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | WS_BORDER |  TBSTYLE_TOOLTIPS,0, IDB_STD_SMALL_COLOR, 0, 0,
    hwnd, (HMENU)ID_TOOLBAR, hToolBarInst, NULL);

    And here is the code to define the buttons:

                  tbb[0].iBitmap = 0;
                  tbb[0].fsState = TBSTATE_ENABLED;
                  tbb[0].fsStyle = TBSTYLE_BUTTON;
                  tbb[0].idCommand = STD_FILENEW;

    Now, when I compile and run, this normal FILENEW button does not show. How do I make this work? I have tried doing this:

    SendMessage(hwndToolBar, TB_LOADIMAGES, 4,(LPARAM)(HINSTANCE)HINST_COMMCTRL);

    But it reports : SendMessage(hwndToolBar, TB_LOADIMAGES, 4, (LPARAM)(HINSTANCE)HINST_COMMCTRL);

    How can I make this work?
    Thanks for your help,
    Booker T
    ---
    CAN U DIG It, SUKKKKKAAAAAAAAAAAAAAAAAAAAAAAAAA?

     
    • Nobody/Anonymous

      try this site:

      http://www.winprog.org/tutorial-old/#2.8.
      I tried it and it works.

      h#1

       
      • Nobody/Anonymous

        Hey,

        Thanks for your reply.

        I will check it out as soon as possible.

        Thank you

        Goodbye

        Amal

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.