(VC++ 6.0)Tray Icon popup menu not showing correctly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dipalihulsure
    New Member
    • Sep 2008
    • 1

    (VC++ 6.0)Tray Icon popup menu not showing correctly

    Hello friends,

    I am trying to get a popup menu on the right button click event. Code is as follows

    //---------------------------------------------------------------------------------------------------------------
    HMODULE mod = GetModuleHandle (NULL);

    POINT point;
    GetCursorPos(&p oint);

    HMENU menu = LoadMenu(mod, MAKEINTRESOURCE (IDM_TRAY));
    HMENU hmenuTrackPopup = GetSubMenu(menu , 0);
    SetForegroundWi ndow( );
    int retval = TrackPopupMenu( menu, TPM_BOTTOMALIGN |TPM_RETURNCMD ,point.x, point.y,0,this->m_hWnd,NULL) ;

    PostMessage(WM_ NULL, 0, 0);
    DestroyMenu(men u);


    //--------------------------------------------------------------------------------------------------------

    my menu functionality is working correct but it is not displaying correct.
    Image of menu is in the attachment


    Anybody can give answer?
    I will be very thankful for answers.
    Attached Files
Working...