[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Pocket PC Context menu in a dialog and GN_CONTEXTMENU

Posted on 2005-05-02
2
Medium Priority
?
385 Views
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  http://www.pocketpcdn.com/articles/contextmenu.html  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 ?
0
Comment
Question by:hansw77041
2 Comments
 

Author Comment

by:hansw77041
ID: 13914252
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)
      {
              DoContextMenu(point);
      }
        else
      {
              Default();
      }
}
0
 

Accepted Solution

by:
PAQ_Man earned 0 total points
ID: 13914773
Question Closed, 500 points refunded.
PAQ_Man
Community Support Moderator
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month20 days, 10 hours left to enroll

868 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