Simple TrackPopupMenu

I have this problem : When I call TrackPopupMenu , the popup menu is displayed , but it is not "shown" , I mean it shows only something like a simple vertical Bar . I can see that it captures the mouse messages , and when I select a popup menu ( inside the menu ) , it is activated correctly

Any help ? Thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are there items in the menu?  It might be that it is displaying a menu with zero menu items.  Can you use GetMenuItemCount() to confirm that there are menu items?
WxWAuthor Commented:
Sure there are items , because this menu is taken by LoadMenu from a resource , and anyway , I CAN select and execute the menu commands , I just can't see them ! Think that there is a bar , about the half size of a scroll bar .
The menu has to be a popup submenu.

Given that:

    hwnd = the window handle
    hinst = the application instance
    hmenu = LoadMenu(hinst, MAKEINTRESOURCE(IDR_MENU)) or similar

Here's a code that works for me:

    TrackPopupMenuEx(GetSubMenu(hmenu), TPM_HORIZONTAL, pos.x, pos.y, hwnd, NULL);
    PostMessage(hwnd, WM_NULL, 0, 0);

And the menu is:

        POPUP "Menu"
            MENUITEM "About",                       IDM_ABOUT
            MENUITEM "Exit",                        IDM_EXIT

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WxWAuthor Commented:
Yes thanks alexo , that was the problem . I was trying not to use a submenu , but rather a menu from a resource .
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.