VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Add bitmaps to your menu!

[Mainframe]  (1 Submission)   Custom Controls/Forms/Menus   Visual Basic 5.0   Unknown Difficulty   Fri 20th April 2001   Mon 8th February 2021

Add bitmaps to your menu!

API Declarations


' menu's. Then call the SetMenuBitmap sub to set a bitmap.
' hWnd: Give the HWND of the form wich contains the menu.
' menuIndex: Give the index of the menu, sample: the menu left is index 0, the
' one next to it is 1, and so on...
' SubmenuIndex: Index of the submenu, works the same way.
' Pic: Give the picture, use the LOADPICTURE function or specify a picturepox.picture.
' have any questions/comments? or want more of this, goto
' www.gangstersoft.com

Declare Function GetMenu Lib "user32" _
(ByVal hwnd As Long) As Long

Declare Function GetSubMenu Lib "user32" _
(ByVal hMenu As Long, ByVal nPos As Long) As Long

Declare Function GetMenuItemID Lib "user32" _
(ByVal hMenu As Long, ByVal nPos As Long) As Long

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

Public Const MF_BITMAP = &H4&

Type MENUITEMINFO
cbSize As Long
fMask As Long
fType As Long
fState As Long
wID As Long
hSubMenu As Long
hbmpChecked As Long
hbmpUnchecked As Long
dwItemData As Long
dwTypeData As String
cch As Long
End Type

Declare Function GetMenuItemCount Lib "user32" _
(ByVal hMenu As Long) As Long

Declare Function GetMenuItemInfo Lib "user32" _
Alias "GetMenuItemInfoA" (ByVal hMenu As Long, _
ByVal un As Long, ByVal b As Boolean, _
lpMenuItemInfo As MENUITEMINFO) As Boolean

Public Declare Function SetMenuItemInfo Lib "user32" Alias "SetMenuItemInfoA" (ByVal hMenu As Long, ByVal un As Long, ByVal bool As Boolean, lpcMenuItemInfo As MENUITEMINFO) As Long


Rate Add bitmaps to your menu! (2(2 Vote))
Add bitmaps to your menu!.bas

Add bitmaps to your menu! Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters