I am re-posting this because I am still having this problem and I am desperate to figure it out. I am trying to create a tray icon. I downloaded Chris Maunder's project and it works for me in my test dialog which is modal. Now I am trying to get it to work in a modeless dialog that ultimately I want to be hidden. I cannot get the tray icon create logic to work. The call to ::Shell_NotifyIcon() fails but I have no idea why. The NOTIFYICONDATA struct seems to be filled in correctly and GetLastError() returns 0. I have tried it with and without a visible modeless dialog. I need the tray icon only to let my user know that my service is running. My code is below.
I call the logic to create the icon below:
m_iconTray.Create( this, <br />
WM_ICON_NOTIFY, // Icon notify message to use<br />
_T("AutoFileHandler is running"), // tooltip to use<br />
::LoadIcon( NULL, IDI_ASTERISK ), // Icon to use<br />
IDR_TRAYICON ); // ID of tray icon
i have a hughe problem in my company. i have a quite complex application (distributed, corba, mulithreaded, Boost, QT 3.3)
and after closing the program (int closeevent() pApp->exit())
the program closes but after ca 5 sec. there comes an ASSERTION
attached_thread_count == 0
the code in boost looks like that:
attached_threadcount == 0 in tss_hooks.cpp. the code there looks like this:
even with the help of some c++ gurus and DevPartnerStudio we could not find the problem.
actually it isnt that annoying because only at exit it happens. but we cant deliver it to the customer like that.
does enyone has an idea what to do against it, even a trick to just dont show the assertion?
unfortunately i cant make a release-version for different reasons.
thanx for any input!!
p.s. someone gave me the following input in an other board:
Anyway, the assertion comes from the thread_specific_ptr machinery. It means that something registered a thread-exit handler but it wasn't called. This might happen if, for example, you use a thread_specific_ptr from a thread that wasn't created with boost::threads.
I am trying to play a AVI file on status bar indicating the progress for the lengthy operation.
I am doing this in a button click event. it is working fine if no statements are there below the call and, if there are statements below the avi start.. the avi is not playing on status bar.
I tryed with thread, but of no use.
Its hard to give you advice without seeing what type of 'processing' you are doing. You should avoid drawing on a window from a separate thread if at all possible. You may be able to simply pump the message que and move the AVI-frame painting into OnPaint.
In the while loop you can probably add:
while(::PeekMessage(&oMSG, NULL, 0, 0, PM_NOREMOVE))
if(::GetMessage(&oMSG, NULL, 0, 0))
//Your processing code goes here//Hopefully the work is done in chunks and continues to the top of the loop.
This will allow the dialog to process WM_PAINT messages normally.
Thanks you very much, for your help, what I am trying to do is extrading 1000's of records from database. since it takes quite some time I want play the avi file on the status bar of main frame,
but the call will be made from the dialg. say on button click event we are extracting records form DB and need progress on the status bar, but does not work...
//Get 1000's records from DB ..verytime consumming process...