Add icon to menu 
Author Message
 Add icon to menu

Hello,

Id like to add some icons to the application menu (like MS Word, VB, etc)

Ive tried to use 2 different methods

1)
Declare Function ModifyMenu Lib "user32" Alias     "ModifyMenuA" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
     ByVal wFlags As Long, ByVal wIDNewItem As Long, _
     ByVal lpString As Long) As Long


call ModifyMenu (hSubMenu, 1 MF_BITMAP or MF_BYPOSITION, 1, hImage)

.
This function puts icon in menu caption place instead putting picture to the
left of text

2)

 Declare Function SetMenuItemBitmaps Lib "user32" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, _
ByVal hBitmapChecked As Long) As Long

  ..

call SetMenuItemBitmaps ( hMenu1, MF_BITMAP,             hImage,  hImage

.

This function indeed puts image to the left of the text, but the picture
looks very strange (If  I select this menu Item, picture changes color also,
etc)

Are there any other solutions?

Sincerely ,

Alex



Sun, 16 Jan 2005 22:26:01 GMT  
 Add icon to menu
You need to either find a control or library to do this, or learn about
subclassing and doing owner-drawn menus (not for the lighthearted).


Quote:
> Id like to add some icons to the application menu (like MS Word, VB, etc)



Mon, 17 Jan 2005 00:02:24 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can I add icon to menu.

2. Add Icon in menu

3. Add icon to menu

4. add icons to menu

5. Adding Icons to Menus?

6. How to add Icon to menu item

7. Adding icons to Menus????

8. Adding Icons to Menus and Listboxes

9. add icons to menu items

10. Adding Icons to Menus

11. Adding icons to menus

12. Adding icons to menu using SetMenuItemBitmaps

 

 
Powered by phpBB® Forum Software