当前位置: 代码迷 >> Windows Mobile >> 能够编程设定系统闹钟吗?解决办法
  详细解决方案

能够编程设定系统闹钟吗?解决办法

热度:93   发布时间:2016-04-25 07:49:53.0
能够编程设定系统闹钟吗?
我在做一个闹钟软件,一直不知道怎么开始.能否通过API设定系统闹铃呢?就是通过编程来设定系统自带的闹钟.
如果用timer的话感觉有点麻烦.
或者您建议我该怎么做呢?有没有例子呢?
谢谢大家!给我点思路吧.

------解决方案--------------------
不用Timer的话怎么实现呢?我也想知道。
帮楼主顶了。
------解决方案--------------------
LZ可以试试:CeRunAppAtTime这个函数,在规定的多少时间后执行某路径的程序。不过他不能支持长时间。如果做闹钟的话,TIMER应该是首选。
------解决方案--------------------
可以的,我记得是写入注册表的,更改注册表就可以实现,只是针对Alarms里面的三组. 不过注册表值一时想不起来了,不好意思。你可以查一下。
------解决方案--------------------
This example sets the alarm time on the device and turns the alarm on.
<characteristic type="clock">
<parm name="AlarmOn" value="1"/>
<parm name="AlarmTime" value="06:30:00Z"/>
<!-- Time format is UTC, note the use of Z instead of AM or PM.
For example, 4:25 PM in UTC is 16:25Z -->
</characteristic>
This example turns the alarm off.
<characteristic type="clock">
<parm name="AlarmOn" value="0"/>
</characteristic>

更详细可看 Clock Configuration Service Provider 一节

------解决方案--------------------
HKCU\ControlPanel\Notifications,系统的所有notifications都在这个下面。
------解决方案--------------------
可以通过CeGetUserNotificationHandles,CeGetUserNotification相关函数去除系统的Notification, 然后再通过CeSetUserNotificationEx设置自己的Notification,等时间到时就执行你想要动作.
  相关解决方案