Tuesday, February 6, 2007

明天开始写轮盘赌了


明天开始写轮盘赌,看看目前的三天打鱼两天晒网的状态下,俺要多少天写完它?

日后再去 Las Vegas ,能用它赚个几万美元回来?哈哈哈。。

我看只要统计出 红、黑,奇、偶,6 个 12 的历史概率就可以了,至于 1-18,19-36 俺反正不常压,就拉倒了。

Monday, February 5, 2007

CeSetUserNotificationEx 工作不正常

真郁闷啊!N天过去了,这个问题居然还是没有解决。看来只能先放一放了。我的要求很简单啊,只是在指定的时间发出声音或振动来提醒。

 

总结一下,这个小程序,其实有两几个问题都悬而未决。

1.       CeGetUserNotificationPreferences 不显示对话框不能实现
下面是MSDN CE_USER_NOTIFICATION 中的 pwszDialogTitle 的说明:
pwszDialogTitle
Pointer to the string that contains the title of the user notification dialog box. If this member is NULL, no dialog is displayed. The CeGetUserNotificationPreferences function ignores this member.
可事与愿违,Dialog 总是显示。仔细看了整个 CE_USER_NOTIFICATION 的说明,在 Windows Mobile Remarks 一节中有如下这段:
Setting the ActionFlags value PUN_DIALOG on a Windows Mobile-based Pocket PC will cause sounds to be played based on the user settings in the Sounds and Notifications Control Panel Application (CPL). In addition, sounds that result from other ActionFlags flags being set are also played. This will result in multiple sounds on the Windows Mobile-based Pocket PC. To avoid multiple sounds, you should not set any other ActionFlags flags on a Windows Mobile-based Pocket PC except PUN_DIALOG.
唉!辜妄听之吧。

2.       CeSetNotificationEx 不能在指定的时间产生通知。
这是最让人抓狂的事了,当然实现这个功能还有很多方法,比如 SHNotficationAdd 应该也能实现(说"应该"是我还没试过). 曾经一度堕落到调 CeRunAppAtTime 来试验,结过还是不能在指定的时间run app.网上查了一些东西,帮助不大,不过记下来,日后看看,今天的我还是流了很多血汗的。


Windows Mobile Pocket PC Smartphone Programming: Pocket PC Power Management Series 6: Request the Device to Run: a Gentle Way

http://www.tech-archive.net/Archive/PocketPC/microsoft.public.pocketpc.developer/2004-04/0621.html

CeRunAppAtTime does not work   CeRunAppAtTime 在很多机型上就是不能正常工作?小比同志工作没做好?

Search This Blog