Pocket PC Context menu in a dialog and GN_CONTEXTMENU

Posted on 2005-05-02
Last Modified: 2013-11-18
eVC++ 4.0 IDE ClassWizard allows me to add the event handler for OnContextMenu()
However that does not appear to work on the PocketPC as it does in normal Windows.

I found this article with code for adding a context menut to a control  and it works OK.

However I would like to add a Context menu to the main dialog and need some help handling the GN_CONTEXTMENU message.

ON_NOTIFY(GN_CONTEXTMENU, OnContextMenu) produces a compiler error warning C4003: not enough actual parameters for macro 'ON_NOTIFY'

Just how would I handle the GN_CONTEXTMENU message in the main dialog ?
Question by:hansw77041

    Author Comment

    OK GN_CONTEXTMENU is not handled directly, in fact it is handled in OnLButtonDown();

    void CPopupTestDlg::OnLButtonDown(UINT nFlags, CPoint point)
           SHRGINFO shrgi = {0};

            shrgi.cbSize = sizeof(SHRGINFO);
        shrgi.hwndClient = m_hWnd;
          shrgi.ptDown.x = point.x;
          shrgi.ptDown.y = point.y;
           shrgi.dwFlags = SHRG_RETURNCMD;

          if(::SHRecognizeGesture(&shrgi) == GN_CONTEXTMENU)

    Accepted Solution

    Question Closed, 500 points refunded.
    Community Support Moderator

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
    In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now