LoadImage () a standard toolbar bitmap to a menu ?

Hi. Apparently the SDK's information is not very well organized. I grant you I've searched. To a toolbar it's easy, but it seems those standard images(new, save copy etc.) were made to be loaded to a toolbar's list of bitmaps (TB_ADDBITMAP) and then indexed ... Is there a way around that to get a bitmap handle to them and add it as a bitmap to a menu ?

Regs
Jos

Comments

  • : Hi. Apparently the SDK's information is not very well organized. I grant you I've searched. To a toolbar it's easy, but it seems those standard images(new, save copy etc.) were made to be loaded to a toolbar's list of bitmaps (TB_ADDBITMAP) and then indexed ... Is there a way around that to get a bitmap handle to them and add it as a bitmap to a menu ?
    :
    : Regs
    : Jos
    :
    [blue]From here:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/functions_by_category.asp

    click on [b]Menu [/b]...

    and then [b]SetMenuItemBitmaps[/b].

    [/blue]
  • So ? That doesn't tell how to get a handle to the standard toolbar bitmaps.

  • : So ? That doesn't tell how to get a handle to the standard toolbar bitmaps.
    :
    :
    I'm not really sure, but it may be that those icons are stored in some system dll, like user32.dll or similar, then you should use LoadResource to get them.

    Anyway the easiest way around it (well, that's how I would do that) is to do a screenshot of your screen with a window with standard icons opened, then cut out the icons in your favourite software. This way you can also personalise them in the way you like.

    [hr]
    [italic]How beautiful, if Sorrow had not made sorrow more beautiful than Beauty itself.[/italic]
    JOHN KEATS


  • : Hi. Apparently the SDK's information is not very well organized. I grant you I've searched. To a toolbar it's easy, but it seems those standard images(new, save copy etc.) were made to be loaded to a toolbar's list of bitmaps (TB_ADDBITMAP) and then indexed ... Is there a way around that to get a bitmap handle to them and add it as a bitmap to a menu ?
    :
    : Regs
    : Jos
    :


    I'm not sure if it will work, but couldn't you subclass the toolbar, catch the TB_ADDBITMAP and then save the handle to the bitmap?
  • [b][red]This message was edited by JoseD at 2006-9-4 14:5:51[/red][/b][hr]
    Hi. Thanks for the suggestions, I opted for the easier option and do my owdrawings (or capture a screen as Chick80 suggested), standard icons suck anyway...

    Cheers
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories