none
請問smartphone 2003如何開發聯絡人選單擴充?? RRS feed

  • 問題

  • hi  各位前輩們好

    使用自帶的sample開發ppc的聯絡人選單擴充成功,但要用在smartphone時失敗,兩種情形 :

    smartphone2003不支援

    smartphone wince5 驗證失敗

    以下是範例中的片段,查了msdn,QueryContextMenu不支援smartphone,請問哪該怎麼作呢?   謝謝!!

    class CContextMenu : public IContextMenu, IObjectWithSite
    {  

    public:
        // constructors
        CContextMenu();

        // destructor
        ~CContextMenu();

        // IUnknown methods
        STDMETHOD (QueryInterface) (REFIID riid, LPVOID *ppv);
        STDMETHOD_(ULONG, AddRef)  (void);
        STDMETHOD_(ULONG, Release) (void);

        // IContextMenu methods
        STDMETHOD (GetCommandString) (UINT idCmd, UINT uFlags, UINT *pwReserved,
            LPSTR pszName, UINT cchMax);
        STDMETHOD (InvokeCommand)  (LPCMINVOKECOMMANDINFO pici);
        STDMETHOD (QueryContextMenu) (HMENU hmenu, UINT indexMenu, UINT idCmdFirst,
            UINT idCmdLast, UINT uFlags);

        // IObjectWithSite methods
        STDMETHOD (GetSite) (REFIID riid, void **ppvSite);
        STDMETHOD (SetSite) (IUnknown *pUnkSite);

        // CContextMenu methods
        // None
    public:
     STDMETHOD_(BOOL, GetContactsOidFromSelection)(IDataObject *pdo, CEOID *poidOut);
    protected:
        ULONG    m_cRef;            // reference count
        IUnknown *m_punkSite;       // site (owner) pointer

    };

    2007年11月21日 上午 10:11