I always wanted to write something about Custom form And Transport But on the one hand, there are a lot of things, and I can't finish writing one or two articles. On the other hand, I feel that there are not many people who are using it, and I have never started writing it. Recently, many users have passed Mail Or Csdn The Forum mentioned Custom form (Mainly to implement your own class, such MMS And so on), here I will briefly introduce Custom form To be helpful to anyone in need.
In fact 2005 SDK sample There is a more detailed example called Customform , You can SDK Installation Directory /Wce500/Windows Mobile 5.0 Pocket pc sdk/samples/CPP/Win32 The following is an example.CodeI skipped it. Custom form .
1. User click New Or an existing Message Edit again, Tmail View the corresponding Message type, For example IPM. smstext (SMS) Or IPM. Note (Outlook Email) Or another, and then query the registry. Message Type Registration location (HKEY_CURRENT_USER/software/Microsoft/inbox/msgtypes/IPM) Find the correct Form DLL.
2. Each Form DLL Required Formfactoryex Output function, Tmail Call Formfactoryex Obtain Iformproviderex Object.
3. Call Iformproviderex Different functions, such as creating a new function or editing another function Message , Will call Iformproviderex: createcomposeform In the case of playing, call Iformproviderex: createreadform . Message icon , Call Iformproviderex: getmsgstatusiconindex ( For more information, see 《 Pocket PC & smartphone Text message icons for easy change ) .
You must implement your own editing client.MessageWhat about it? MicrosoftSampleThis is not involved in it. The process is as follows:
1. Pass Imailruleclient Interception EMS Message, put its Message Type Change IPM. smstext. sdkems .
2.During editing or playing, because the type isIPM. smstext. sdkems,Therefore, you can callEMS custom form.
it skipped creation IPM. smstext. sdkems type message details, how to create such a message? One convenient method is to SMS Add EMS , such:
In this way, once the user clicks EMS Is created as a custom EMS The message is actually very easy to implement. Customform Based on the example, we create Message Type For example IPM. EMS, Replace Customform All IPM. smstext. sdkems, Next, we only need to make a few changes to the registry:
Below isIPM. EMSType registration:
[HKEY_CURRENT_USER/software/Microsoft/inbox/msgtypes/IPM/EMS]
"Glyphinfo" = HEX :/
, 02 ,/
, 00, 00
"DLL" = "emsviewerform. dll"
"Name" =" EMS "
In[HKEY_LOCAL_MACHINE/software/Microsoft/inbox/svc/SMS/msgclasses]Add the following key values:
"IPM. EMS" = DWORD: 00000001
OK, We separateEMSThe editor is successful. Let's briefly introduce it here and continue later. Thank you!
Bored customers(Blog.csdn.net/yzx0023)
2006-9-18
Yzx0023@gmail.com