Author Topic: SetMenuItemBitmaps  (Read 676 times)

clamicun

  • Member
  • **
  • Posts: 203
SetMenuItemBitmaps
« on: January 12, 2017, 03:30:30 AM »
There is no problem to put bitmaps into a popup menu ...

before creating the main window
INVOKE LoadMenu,hInst,600  ; menu ID
mov hMenu, eax

and in WM_CREATE

INVOKE LoadBitmap, hInstance, bmpID
mov hBmp1, eax
INVOKE SetMenuItemBitmaps, hMenu, IDM, MF_BYCOMMAND, hBmp1, hBmp1

Since hours I am trying to put a bitmap into the "headmenu" instead of text "&File  &Edit and so on".
Possible somehow ?

ragdog

  • Member
  • ****
  • Posts: 514
Re: SetMenuItemBitmaps
« Reply #1 on: January 13, 2017, 06:12:08 AM »
Why use you not a Toolbar with a Popup menu?




Greets,

clamicun

  • Member
  • **
  • Posts: 203
Re: SetMenuItemBitmaps
« Reply #2 on: January 13, 2017, 01:24:30 PM »
ragdog  ?

if you look at the sourcecode ...
it is a popup menu

ragdog

  • Member
  • ****
  • Posts: 514
Re: SetMenuItemBitmaps
« Reply #3 on: January 13, 2017, 08:14:18 PM »
I have look in your code and you have say it
Quote
There is no problem to put bitmaps into a popup menu

but i understand your question you want put a bitmap @ the header menu &File etc

Quote
Since hours I am trying to put a bitmap into the "headmenu" instead of text "&File  &Edit and so on".
Possible somehow ?

Correct?

Why you not use a toolbar with a popupmenu expl: my screenshot?

TBN_DROPDOWN .. TrackPopupMenu etc

HSE

  • Member
  • ***
  • Posts: 476
  • <AMD>< 7-32>
Re: SetMenuItemBitmaps
« Reply #4 on: January 14, 2017, 12:13:36 AM »
Hi Clamicun!
In DonkeyStable.com there is some toolbar example that look like your picture.

clamicun

  • Member
  • **
  • Posts: 203
Re: SetMenuItemBitmaps
« Reply #5 on: January 15, 2017, 07:33:37 AM »
HSE,
thank you. That is what I was looking for.

clamicun

  • Member
  • **
  • Posts: 203
Re: SetMenuItemBitmaps
« Reply #6 on: January 15, 2017, 07:57:14 AM »
HSE,
although the example (written in ?) gives me 50 or more errors. I hate that. 

clamicun

  • Member
  • **
  • Posts: 203
Re: SetMenuItemBitmaps
« Reply #7 on: January 15, 2017, 08:04:47 AM »
ragdog,
but i understand your question you want put a bitmap @ the header menu &File etc
Correct?

Correct !

Why you not use a toolbar with a popupmenu expl: my screenshot?
TBN_DROPDOWN .. TrackPopupMenu etc

some example somwhere ?

HSE

  • Member
  • ***
  • Posts: 476
  • <AMD>< 7-32>
Re: SetMenuItemBitmaps
« Reply #8 on: January 15, 2017, 09:35:03 AM »
Hi Clamicun!

It's GoAsm, but doesn't matter, you can read the API calls.

Regards.   

(Just in case: I never could assemble nothing with GoAsm... neither I tried enough).

clamicun

  • Member
  • **
  • Posts: 203
Re: SetMenuItemBitmaps
« Reply #9 on: January 21, 2017, 09:11:01 AM »
Loaded down GoAsm ...

Interesting ... not one example from  donkeystable does it ...

clamicun

  • Member
  • **
  • Posts: 203
Re: SetMenuItemBitmaps
« Reply #10 on: January 24, 2017, 09:16:30 AM »
HSE, good evening,

Quote:
(Just in case: I never could assemble nothing with GoAsm... neither I tried enough).

I am trying to be friends with goasm.
Do you know anyone who ever compiled MenuTB.assm ?

ragdog,
the screeshot you showed  is from what ?

HSE

  • Member
  • ***
  • Posts: 476
  • <AMD>< 7-32>
Re: SetMenuItemBitmaps
« Reply #11 on: January 24, 2017, 11:07:42 AM »
Hi Clamicun!
I don't know, but you can ask in GoAsm subforum.

clamicun

  • Member
  • **
  • Posts: 203
Re: SetMenuItemBitmaps
« Reply #12 on: January 25, 2017, 12:52:22 PM »
Last question on this ...

Does someone know how to translate this goasm syntax

;Start the button IDs at one so we don't use 0 (we'll have to dec in order to get the right menu)
TbBtns TBBUTTON <0,1,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE | TBSTYLE_DROPDOWN,0,0,0>
      TBBUTTON <1,2,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE | BSTYLE_DROPDOWN,0,0,1>
      TBBUTTON <3,3,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE | BSTYLE_DROPDOWN,0,0,2>
       TBBUTTON <4,4,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE | BSTYLE_DROPDOWN,0,0,3>

into something which might work ?