Thread: Contexual Menu

  1. #1

    Contexual Menu

    im trying to make a context menu, (or pop-up menu) and this code is screwing me over, tell me whats wrong
                    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
    	//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
    Waterloo, Texas
    // get a pointer to the window menu

    >> m_lMenu - GetMenu();, looks more like subtraction to me...typo?
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  3. #3
    thats not a typo

  4. #4
    errrrr, is it? woah, ive never been more confused

  5. #5
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    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
    you might wanna try replacing the '-' with a '='

  7. #7
    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, 10: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