|
-
Jan 16th, 2001, 04:30 AM
#1
Thread Starter
Member
Hi,
I created a menu on design time and when I use the API function GetSubMenu like this:
mSub = GetSubMenu(GetMenu(Me.hwnd), 0)
I get 0 in mSub. What could be the reason? Does it have anything to do with the fact that I use this function in a MDI child form?
Thanks, Lior
-
Jan 23rd, 2001, 10:47 PM
#2
New Member
your solution
Private Sub GraMen()
On Error Resume Next
Dim lngMenu As Long
Dim lngMenuItemId As Long
Dim lngRet As Long
Dim lngSubMenu As Long
lngMenu = GetMenu(Me.hWnd)
lngSubMenu = GetSubMenu(lngMenu, 0)
lngMenuItemId = GetMenuItemID(lngSubMenu, 3)
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemId, MF_BITMAP, Picture2.Picture, Picture2.Picture)
End Sub
Things must be easy, but not easier than they are.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|