V
Victor
Hi everybody!
VS.NET 2003 C++ MFC-SDI-Standard project.
I would like to show some current info in the status bar of the
SDI-Window.
As long as I use the following code
CStatusBar* pStatus =
(CStatusBar*)AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR);
pStatus->SetPaneText(0,"Some info...");
pStatus->UpdateWindow();
in a message handler - everything runs perfectly.
Now I have to make the same output from within a thread running in the
same class. This code compiles OK, but when running the program, I get
some troubles with an unhandled exception during executing the function
SetPaneText(). I tried to find the CStatusBar* pointer before starting
the thread and to use it within the thread: the nature of the problems
with the function SetPaneText() changed slightly, but it does not work
nevertheless...
What goes wrong?
Many thanks in advance
Victor
VS.NET 2003 C++ MFC-SDI-Standard project.
I would like to show some current info in the status bar of the
SDI-Window.
As long as I use the following code
CStatusBar* pStatus =
(CStatusBar*)AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR);
pStatus->SetPaneText(0,"Some info...");
pStatus->UpdateWindow();
in a message handler - everything runs perfectly.
Now I have to make the same output from within a thread running in the
same class. This code compiles OK, but when running the program, I get
some troubles with an unhandled exception during executing the function
SetPaneText(). I tried to find the CStatusBar* pointer before starting
the thread and to use it within the thread: the nature of the problems
with the function SetPaneText() changed slightly, but it does not work
nevertheless...
What goes wrong?
Many thanks in advance
Victor