Hi all,
I am using CTL32 StatusBar in my application and I am getting feedback from my customers that my application is getting slower with time and they sometimes get an 0x8007000e error. After a restart the application works fine again.
When I looked into the problem I could lower it down to the SendMessageN(.Parent.HWnd, SB_SETICON, .Index, .ctl32_oIcon.handle) command. My guess is, that whenever this function is called with a new icon the old handle is not released and the memory is not free'd.
What I basically need to do is to frequently switch between two icons indicating a filter being active/inactive but I do not see any method do achieve that rather then SendMessageN. Also invoking CoTaskMemFree on the handle retrieved by SB_GETICON does not work.
Anybody has any ideas?
Greetings from Germany,
Raphael Stüer
I am using CTL32 StatusBar in my application and I am getting feedback from my customers that my application is getting slower with time and they sometimes get an 0x8007000e error. After a restart the application works fine again.
When I looked into the problem I could lower it down to the SendMessageN(.Parent.HWnd, SB_SETICON, .Index, .ctl32_oIcon.handle) command. My guess is, that whenever this function is called with a new icon the old handle is not released and the memory is not free'd.
What I basically need to do is to frequently switch between two icons indicating a filter being active/inactive but I do not see any method do achieve that rather then SendMessageN. Also invoking CoTaskMemFree on the handle retrieved by SB_GETICON does not work.
Anybody has any ideas?
Greetings from Germany,
Raphael Stüer