Showing last person called on Contacts

  • Thread starter Thread starter farseer
  • Start date Start date
F

farseer

I am wondering if there is an simple way to do this.
I'd like to create a little app, then when started, would bring up the
Contacts dialogue and show the last person dialed or the last person
showing on the DialerPad screen.

I can think of the hard way that MIGHT be able to do this..but
wondering if there are any supported functions in WM 2005 and CF2.0 to
facilitate this? i.e. is there an api available to interact with the
Contacts app and to get the last caller's info?

thanks
 
You will need to interrogate the call log APIs first to get the last
incoming/outgoing calls, then do a lookup on the contacts table for a
contact with a matching name/number. On WM5.0 you can use the
Microsoft.WindowsMobile.PocketOutlook.dll functionality to access the
Contacts collection. To access the Call History requires either P/Invoking
the relevant APIs, or using a ready made wrapper - there is one in the SDF
(www.opennetcf.org/sdf/)

Peter
 
Thanks for the response Peter.
What i really want is to simply launch the Contacts selection dialogue,
which has the last callers on there already.
Since i have the last caller name from the Dialer pad screen, I can
then do a lookup of the last caller by either simulating the the
keypress or sending a WM_CHAR to the contacts listview or look up text
box.

Here's a case where again it works when debugging and tracing through
the code, but when i let it run without stepping through, i see the
last caller's name in the lookup text box, but the list is not filtered
down to him/her. It's almost as though the events are not being fired
to allow the look up to happen when you run in non-stepping mode.
Any thoughts on this? Adding some DoEvents liberally does not seem to
solve the problem..

(I've also stried some of the Microsoft.WindowsMobile.Forms and
PocketOutlook packages, but the only thing i found useful there opened
the Contacts dialogue in modal mode it seems and does not bring to the
front.)
 
part of the problem here seems to be that the Contacts form has not
been fully loaded/painted when i am trying to send the key presses or
the WM_CHARs. How can i ensure the form has completely painted an is
in the foreground before attempting to interact with it?
 
Back
Top