开发者

Changing icons in picture control

What do i need to change i开发者_如何学运维cons at runtime every 5 seconds in picture control to give the user a notification that the work is in progress?


  1. Load a few icons.
  2. Start up a timer to get called every so often.
  3. Send STM_SETICON message to the picture control (which is in fact static control).
  4. Kill the timer when no longer needed.
  5. Release the icons handles.

Other points of interest:

  1. if load other types of image objects (as opposed to icons) you need to send respective messages. See STM_SETICON in msdn for details.

  2. The timer is an interrupt, in difference for any other windows message, hence might be thread unsafe if you are not careful. Leave the timer subroutine as soon as possible.

Hope this helps. Miro

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜