Results 1 to 10 of 10

Thread: Sub Menu?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    154

    Question Sub Menu?

    Hey All,

    I cobbled together a little code which allows me to have colored text with a
    mouseover event (changes color) in a popup menu. It works great in Win98
    but, I had someone look at it in WinXP, and the vertical alignment is off (it is
    indented further than the rest of the items in the menu).

    I believe the problem lies in getting the measurement of the first menu item.
    I can get the .left position (which is 11), but that is the main menu. I need
    to get the submenu item .left position.

    I hard coded that position (21), but apparently XP is different. I don't know
    about Win2000.

    So, anyway, could someone help me get the sub menu...please?


    I don't know if I explained this good enough or not...my mind is fried!
    Attached Files Attached Files

  2. #2
    Addicted Member JensPeder's Avatar
    Join Date
    Sep 2005
    Posts
    249

    Re: Sub Menu?

    How is it suppose to look?

    my view, winxp:

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    154

    Re: Sub Menu?

    Like this...
    Attached Images Attached Images  

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    154

    Re: Sub Menu?

    See how the left edge is all in alignment?

  5. #5
    Addicted Member JensPeder's Avatar
    Join Date
    Sep 2005
    Posts
    249

    Re: Sub Menu?

    Quote Originally Posted by rdcody
    See how the left edge is all in alignment?
    Yeah, but you said "is indented further than the rest of the items in the menu" so I kinda wondered But I'll have a look

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    154

    Re: Sub Menu?

    AAAAhhhhhh...like I said, my minds fried! Thanks

    Do you see what I mean...I need to find the first item (Open) in the menu.
    Once that is found, then I can get the .left position. I think!

  7. #7
    Addicted Member JensPeder's Avatar
    Join Date
    Sep 2005
    Posts
    249

    Re: Sub Menu?

    MyCurrentX = 16 makes it look ok here, but the its off at your's I guess, heh I'll try to take a look further tomorrow, right now its late and I need to study

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    154

    Re: Sub Menu?

    ok thanks

  9. #9
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Sub Menu?

    Not quite sure what your exact problem is, but you use GetSubMenu() to retrieve the handle of the menu item.

    Code:
    GetSubMenu(hMenu, 0)

  10. #10
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Sub Menu?

    He has continued this discussion in another thread
    http://www.vbforums.com/showthread.php?t=364443

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width