Click here to Skip to main content
16,003,474 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CScrollView with a lot of flickering Pin
djordj10-Mar-03 21:19
djordj10-Mar-03 21:19 
GeneralRe: CScrollView with a lot of flickering Pin
MAAK10-Mar-03 21:40
MAAK10-Mar-03 21:40 
GeneralRe: CScrollView with a lot of flickering Pin
73Zeppelin12-Mar-03 2:59
73Zeppelin12-Mar-03 2:59 
GeneralRe: CScrollView with a lot of flickering Pin
djordj12-Mar-03 7:59
djordj12-Mar-03 7:59 
GeneralRe: CScrollView with a lot of flickering Pin
73Zeppelin13-Mar-03 4:07
73Zeppelin13-Mar-03 4:07 
GeneralGet User Actions While Background Thread Executes Pin
Robert Palma Jr.10-Mar-03 11:43
Robert Palma Jr.10-Mar-03 11:43 
GeneralRe: Get User Actions While Background Thread Executes Pin
Dave Bryant10-Mar-03 12:42
Dave Bryant10-Mar-03 12:42 
GeneralRe: Get User Actions While Background Thread Executes Pin
Robert Palma Jr.11-Mar-03 8:55
Robert Palma Jr.11-Mar-03 8:55 
Dave,

Thank-you for response. Here is the multi-step approach I use to run a background thread that can update Dialog class variables during it's execution.

=== STEP 1
Use AfxBeginThread to run a function, zdisplay()

CWinThread *pThread = AfxBeginThread( &zdisplay, this->m_hWnd, THREAD_PRIORITY_BELOW_NORMAL );
ASSERT( NULL != pThread );

===STEP 2
Use zdisplay() function to endlessly loop and send a message, WM_APP_UPDATE_DLG.

UINT CCryptoDlg::zdisplay( LPVOID pParam )
{
int xx=1;
do
{
::SendMessage( (HWND)pParam, WM_APP_UPDATE_DLG, (WPARAM)buf, 0 );
if (xx == 1)
{
Sleep(1000);
}
} while(TRUE); /*end do statement*/
return 0;
} /*end zdisplay() function*/


===STEP 3
Define message WM_APP_UPDATE_DLG to run function OnUpdateDialog().

ON_MESSAGE( WM_APP_UPDATE_DLG, OnUpdateDialog )

===STEP 4

The code in OnUpdateDialog () is the intensive background task that seems to be disallowing the main dialog to respond to user I/O.

Much thanks,
Robert
Smile | :)
GeneralRe: Get User Actions While Background Thread Executes Pin
Dave Bryant11-Mar-03 9:01
Dave Bryant11-Mar-03 9:01 
GeneralRe: Get User Actions While Background Thread Executes Pin
Robert Palma Jr.11-Mar-03 9:47
Robert Palma Jr.11-Mar-03 9:47 
GeneralRe: Get User Actions While Background Thread Executes Pin
Dave Bryant11-Mar-03 9:52
Dave Bryant11-Mar-03 9:52 
GeneralRe: Get User Actions While Background Thread Executes Pin
Robert Palma Jr.12-Mar-03 6:15
Robert Palma Jr.12-Mar-03 6:15 
GeneralRe: Get User Actions While Background Thread Executes Pin
Dave Bryant12-Mar-03 8:12
Dave Bryant12-Mar-03 8:12 
GeneralRe: Get User Actions While Background Thread Executes Pin
TomKat14-Mar-03 16:12
TomKat14-Mar-03 16:12 
GeneralRe: Get User Actions While Background Thread Executes Pin
Robert Palma Jr.15-Mar-03 5:38
Robert Palma Jr.15-Mar-03 5:38 
Questionconfirmation please: a char is 8 bits??? Pin
Kuniva10-Mar-03 10:54
Kuniva10-Mar-03 10:54 
AnswerRe: confirmation please: a char is 8 bits??? Pin
valikac10-Mar-03 11:00
valikac10-Mar-03 11:00 
GeneralRe: confirmation please: a char is 8 bits??? Pin
Kuniva10-Mar-03 11:01
Kuniva10-Mar-03 11:01 
AnswerRe: confirmation please: a char is 8 bits??? Pin
Michael Dunn10-Mar-03 11:02
sitebuilderMichael Dunn10-Mar-03 11:02 
AnswerRe: confirmation please: a char is 8 bits??? Pin
Robert Palma Jr.10-Mar-03 11:36
Robert Palma Jr.10-Mar-03 11:36 
AnswerRe: confirmation please: a char is 8 bits??? Pin
RaajaOfSelf10-Mar-03 17:23
RaajaOfSelf10-Mar-03 17:23 
Questionstd::stack iterator ? Pin
Maximilien10-Mar-03 10:46
Maximilien10-Mar-03 10:46 
AnswerRe: std::stack iterator ? Pin
valikac10-Mar-03 11:02
valikac10-Mar-03 11:02 
AnswerRe: std::stack iterator ? Pin
Taka Muraoka10-Mar-03 16:10
Taka Muraoka10-Mar-03 16:10 
QuestionHow do I modify a BSTR type string? Pin
dazinith10-Mar-03 10:27
dazinith10-Mar-03 10:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.