The MASM Forum

General => The Workshop => Topic started by: clamicun on January 12, 2017, 03:30:30 AM

Title: SetMenuItemBitmaps
Post by: clamicun 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 ?
Title: Re: SetMenuItemBitmaps
Post by: ragdog on January 13, 2017, 06:12:08 AM
Why use you not a Toolbar with a Popup menu?

(http://fs5.directupload.net/images/170112/5drcxii4.png)


Greets,
Title: Re: SetMenuItemBitmaps
Post by: clamicun on January 13, 2017, 01:24:30 PM
ragdog  ?

if you look at the sourcecode ...
it is a popup menu
Title: Re: SetMenuItemBitmaps
Post by: ragdog on January 13, 2017, 08:14:18 PM
I have look in your code and you have say it
QuoteThere 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

QuoteSince 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
Title: Re: SetMenuItemBitmaps
Post by: HSE on January 14, 2017, 12:13:36 AM
Hi Clamicun!
In DonkeyStable.com there is some toolbar example (http://donkeysstable.com/files/MenuTB.zip) that look like your picture.
Title: Re: SetMenuItemBitmaps
Post by: clamicun on January 15, 2017, 07:33:37 AM
HSE,
thank you. That is what I was looking for.
Title: Re: SetMenuItemBitmaps
Post by: clamicun on January 15, 2017, 07:57:14 AM
HSE,
although the example (written in ?) gives me 50 or more errors. I hate that. 
Title: Re: SetMenuItemBitmaps
Post by: clamicun 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 ?
Title: Re: SetMenuItemBitmaps
Post by: HSE 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).
Title: Re: SetMenuItemBitmaps
Post by: clamicun on January 21, 2017, 09:11:01 AM
Loaded down GoAsm ...

Interesting ... not one example from  donkeystable does it ...
Title: Re: SetMenuItemBitmaps
Post by: clamicun 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 ?
Title: Re: SetMenuItemBitmaps
Post by: HSE on January 24, 2017, 11:07:42 AM
Hi Clamicun!
I don't know, but you can ask in GoAsm subforum.
Title: Re: SetMenuItemBitmaps
Post by: clamicun 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 ?