Smartphone Thoughts - Daily News, Views, Rants and Raves

Be sure to register in our forums! Share your opinions, help others, and enter our contests.





Go Back   Thoughts Media Forums > SMARTPHONE THOUGHTS > Smartphone Developer

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2006, 11:19 AM
Neophyte
Join Date: Jul 2006
Posts: 1
Default Extending Context menu for Windows mobile 5.0 Samrtphone of

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 ??
 
Reply With Quote
  #2 (permalink)  
Old 11-08-2006, 08:55 AM
Neophyte
Join Date: Nov 2006
Posts: 1

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.
 
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 06:19 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 RC7