Contexual Menu

This is a discussion on Contexual Menu within the Windows Programming forums, part of the Platform Specific Boards category; im trying to make a context menu, (or pop-up menu) and this code is screwing me over, tell me whats ...

  1. #1
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405

    Contexual Menu

    im trying to make a context menu, (or pop-up menu) and this code is screwing me over, tell me whats wrong
    Code:
                    CMenu *m_lMenu;  //pointer to the menu
    	CPoint m_pPoint; //mouse position
    
    	//copy the mouse position to a local var
    	m_pPoint = point;
    	//convert the position to a local var
    	ClientToScreen(&m_pPoint);
    	//get a pointer to the window menu
    	m_lMenu - GetMenu();
    	//get a pointer to the first submenu
    	m_lMenu = m_lMenu->GetSubMenu(0);
    	//show the popup menu
    	m_lMenu->TrackPopupMenu(TPM_CENTERALIGN + TPM_LEFTBUTTON, m_pPoint.x, m_pPoint.y, this, NULL);

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,643
    // get a pointer to the window menu

    >> m_lMenu - GetMenu();

    ...er, looks more like subtraction to me...typo?
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  3. #3
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405
    thats not a typo

  4. #4
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405
    errrrr, is it? woah, ive never been more confused

  5. #5
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    where do you define/assing point?
    PHP and XML
    Let's talk about SAX

  6. #6
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    you might wanna try replacing the '-' with a '='

  7. #7
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405
    thanx face, but now my positioning is way off


    edit << nevermind, fixed

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. Replies: 2
    Last Post: 03-05-2009, 09:25 AM
  3. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  4. Constructive Feed Back (Java Program)
    By xddxogm3 in forum Tech Board
    Replies: 12
    Last Post: 10-10-2004, 03:41 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21