[WM] supplement to the current plug-in for making window mobile

Source: Internet
Author: User

I didn't have any significant technical accumulation recently, so this article was not intended to be written, but I thought that since I was developing the "World Clock" plug-in, I think it is necessary to write these small details for a significant memo.

I was inspired by other mobile phone interfaces and wanted to develop a world clock plug-in. Initially, I tried to push the clock forward by using the wm_todaycustom_queryrefreshcache message. That is, because the wm_todaycustom_queryrefreshcache message is received every two seconds, I want to use this message for 30th times, add 1 forward to the minute of the clock. However, I found that this is not feasible, because when the mobile phone is off the screen (in standby mode) (the screen isProgramIs not verified in detail when the interface occupies, because the conclusion is not available currently), the message will not be received, so the clock stops walking, resulting in inaccurate timing. Then I thought it was the reason why the wm_todaycustom_queryrefreshcache message was stopped when the screen was turned off. Instead, the wm_timer (timer) message was used to drive the sub-needle, but the result proved to be still invalid. In the end, we will query the hour of the current system time in wm_todaycustom_queryrefreshcache to see if the minute has changed. Then, we will calculate the local time based on the Time Offset Value to force the update time, in this way, the problem of stopping the clock is solved. That is:

 

(1) wm_todaycustom_queryrefreshcache messages cannot be used as drive pulse signals, that is, they cannot be used as clock dependencies, but must be understood as asking the plug-in for updates and display purposes. Therefore, it may stop sending when necessary. In terms of plug-ins, it is worth noting that wm_timer does not continuously send messages when the mobile phone is in standby mode, which overwrites my previous ideas.

 

 

(2) The transparentimage function can be used for transparent transmission of HDC or hbitmap;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.