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?
- Load a few icons.
- Start up a timer to get called every so often.
- Send STM_SETICON message to the picture control (which is in fact static control).
- Kill the timer when no longer needed.
- Release the icons handles.
Other points of interest:
if load other types of image objects (as opposed to icons) you need to send respective messages. See STM_SETICON in msdn for details.
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
精彩评论