我想在Windows Mobile中擴展聯繫人上下文菜單。當用戶用鼠標右鍵點擊撥號和其他功能的聯繫人時,我想擴展並添加自己的項目來執行我的自定義程序等等。在Windows Mobile中擴展上下文菜單Mobile Contact
1
A
回答
1
我發現了另一個example在這裏,我想這應該爲你工作
// Initialize the below code snippet in the beginning of the class
internal struct SHRGINFO
{
public int cbSize;
public IntPtr hwndClient;
public int ptDownX;
public int ptDownY;
public SHRGFLags dwFlags;
}
[Flags]
internal enum SHRGFLags
{
SHRG_RETURNCMD = 0x00000001,
SHRG_NOTIFYPARENT = 0x00000002,
SHRG_LONGDELAY = 0x00000008,
SHRG_NOANIMATION = 0x00000010,
}
[DllImport("aygshell")]
extern private static int SHRecognizeGesture(ref SHRGINFO shr);
[DllImport("coredll.dll", SetLastError = true)]
public static extern IntPtr GetActiveWindow();
//call the showContMenu() method in Mouseup or MouseDown event
public void showContMenu(int x, int y)
{
SHRGINFO shr = new SHRGINFO();
shr.cbSize = Marshal.SizeOf(typeof(SHRGINFO));
shr.dwFlags = SHRGFLags.SHRG_RETURNCMD;
shr.ptDownX = x;
shr.ptDownY = y;
shr.hwndClient = GetActiveWindow();
int ret = SHRecognizeGesture(ref shr);
if (ret == 1000)
contextMenu1.Show(this, new System.Drawing.Point(x, y));
}
3
如果你安裝了Windows Mobile 5 SDK,你會發現一些相關樣品:
C:\ Program Files文件\ Windows Mobile 5.0的SDK \樣本\掌上電腦\ CPP \ Win32的
- Callingcard
- InboxMenuExtensibility
- ReadViewMenuExt
相關問題
- 1. 如何在Windows Mobile中擴展REG_EXPAND_SZ?
- 2. Windows Mobile 6.5圖標菜單
- 3. PHP擴展JQuery Mobile
- 4. C++ Shell上下文菜單擴展
- 5. QT在Windows Mobile上
- 6. jquery mobile左菜單
- 7. 添加到Windows外殼擴展上下文菜單
- 8. getElementsByName在firefox mobile的restartless(bootstrapped)擴展中
- 9. Windows Mobile上的擴展攝像頭控制
- 10. 什麼是在Windows Mobile中保存的擴展名短信?
- 11. 在html上下文文件的上下文菜單中的VS2015擴展
- 12. 上下文菜單外殼擴展不能在Windows 7下工作64位
- 13. Windows Mobile上的Silverlight?
- 14. windows mobile上的Microsoft.WindowsCE.Forms
- 15. 在Outlook 2010/2013主題中擴展上下文菜單
- 16. 在eclipse中擴展Web瀏覽器的上下文菜單
- 17. 如何獲取windows mobile 6.5.3的下層菜單欄的高度
- 18. 在Windows Mobile上編程ActiveSync
- 19. 動態插入擴展在jQuery Mobile的
- 20. 在Windows Mobile上本地文件的URL
- 21. 在windows mobile上運行jar文件
- 22. 在jQuery Mobile中定位彈出菜單
- 23. 在jquery-mobile中選擇菜單樣式
- 24. 在Windows中的上下文菜單項
- 25. 在Windows Mobile中使用PostMessage模擬一個菜單選擇
- 26. Windows Phone上下文菜單
- 27. Chrome擴展程序下載上下文菜單
- 28. 在Chrome擴展的彈出窗口的上下文菜單
- 29. 簡單的Chrome擴展 - 選擇要通過上下文菜單
- 30. C++的上下文菜單外殼擴展中的級聯子菜單