FAQ Profile Memberlist Usergroups Register
Log in to check your private messagesLog in to check your private messages -> Log in  
Extending Context menu for Windows mobile 5.0 Samrtphone of Contacts

 
Post new topic   Reply to topic    Smartphone Thoughts Forum Index -> DEVELOPER Printable version
View previous topic :: View next topic  
Author Message
kamii47
Smartphone Neophyte


Joined: 29 Jul 2006
Posts: 1

PostPosted: Sat Jul 29, 2006 4:19 am    Post subject: Extending Context menu for Windows mobile 5.0 Samrtphone of Reply with quote

Could any body give me a smaple for Extending Context menu for Windows mobile 5.0 Samrtphone Contacts Menu.

I have coverted an application from windows mobile 5.0 pocket pc to windows mobile 5.0 smartphone

I Have use CePimCommand.

void CePimCommand (HWND hWnd, PIMTYPE ptData, UINT uDataCount,

HANDLE *rghData, void *pReserved)

{
if (uDataCount > 0)
{

WNDCLASS wc;

memset(&wc, 0, sizeof(wc));


wc.style = 0;

wc.lpfnWndProc = (WNDPROC) WndProc;

wc.hInstance = g_hInst;

wc.hIcon = 0;

wc.hCursor = 0;

wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);

wc.lpszClassName = DummyWindow1;


RegisterClass(&wc);


if(!CreateWindow(DummyWindow1, DummyWindow1, 0,

CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,

NULL, NULL, g_hInst, NULL))

{

}

else

{

HWND wnd = FindWindow(DummyWindow, DummyWindow);

SendMessage(wnd, WM_TEST, 0, 0);

PostMessage(hNetClient, WM_EDIT_CONTACT_EXT, (CEOID) *rghData, 0);

}

}

}


and this is my class

class CContextMenuSample : public IContextMenu, IObjectWithSite
{

public:
// constructors
CContextMenuSample();

// destructor
~CContextMenuSample();

// 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);

// CContextMenuSample methods
// None

protected:
ULONG m_cRef; // reference count
IUnknown *m_punkSite; // site (owner) pointer

};


What Can I do ??
Back to top
View user's profile Send private message
thedinplug
Smartphone Neophyte


Joined: 08 Nov 2006
Posts: 1

PostPosted: Wed Nov 08, 2006 1:55 am    Post subject: Reply with quote

Hello kamii47,

Sorry I cannot help you but I would infact like to do the exact same thing so would be interested to see how you get on. If I find out more information I will let you know.

Thanks.

Ian.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smartphone Thoughts Forum Index -> DEVELOPER All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You can vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Copyright 2004 Jason Dunn | Web design & development by Fabrizio Fiandanese