Click here to Skip to main content
15,911,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DrawFocusRect Pin
Tomasz Sowinski8-Jun-01 4:39
Tomasz Sowinski8-Jun-01 4:39 
GeneralI've got it ... Pin
8-Jun-01 5:06
suss8-Jun-01 5:06 
GeneralRe: Changing a dialogs size Pin
Tomasz Sowinski8-Jun-01 2:12
Tomasz Sowinski8-Jun-01 2:12 
GeneralRe: Changing a dialogs size Pin
Ben Burnett8-Jun-01 2:48
Ben Burnett8-Jun-01 2:48 
GeneralUpdateData ( FALSE ) don`t work in a FOR loop Pin
P. S Thakur8-Jun-01 1:43
P. S Thakur8-Jun-01 1:43 
GeneralRe: UpdateData ( FALSE ) don`t work in a FOR loop Pin
Ben Burnett8-Jun-01 2:08
Ben Burnett8-Jun-01 2:08 
GeneralRe: UpdateData ( FALSE ) don`t work in a FOR loop Pin
Stan Shannon8-Jun-01 2:26
Stan Shannon8-Jun-01 2:26 
GeneralThe concept is the problem Pin
skfnmuislædmufaæoi8-Jun-01 6:32
skfnmuislædmufaæoi8-Jun-01 6:32 
Hi.

Your code would be right for a console (or DOS) app, which is run as a sequence.
As mentioned above, you block the message pump, because you do your work in thread which runs the GUI of your app. So you block the whole app!

There are some ways to avoid this problem:
1. Use threads
Count in a thread and send the changes as a (User-)message to the main window.
2. Use a timer
Create a timer when clicked on "Start" and kill it when clicked on "Stop"
In the timer routine you can do your UpdateData().

A propos: Never forget to call UpdateData(TRUE) before UpdateData(FALSE) !!

Learning to make a good desing will save you a lot of trouble!

Bye, Karl
GeneralVC6 and ClassWizard Pin
jerry0davis8-Jun-01 1:33
jerry0davis8-Jun-01 1:33 
GeneralStack overflow Pin
7-Jun-01 22:13
suss7-Jun-01 22:13 
GeneralRe: Stack overflow Pin
Deepak Khajuria7-Jun-01 22:40
Deepak Khajuria7-Jun-01 22:40 
GeneralRe: Stack overflow Pin
Tomasz Sowinski8-Jun-01 0:32
Tomasz Sowinski8-Jun-01 0:32 
GeneralC++ to view Tiff Images Pin
7-Jun-01 21:28
suss7-Jun-01 21:28 
GeneralRe: C++ to view Tiff Images Pin
Deepak Khajuria7-Jun-01 22:45
Deepak Khajuria7-Jun-01 22:45 
Generalgetting fileversion /build from version resource Pin
7-Jun-01 20:49
suss7-Jun-01 20:49 
GeneralRe: getting fileversion /build from version resource Pin
Tomasz Sowinski8-Jun-01 0:27
Tomasz Sowinski8-Jun-01 0:27 
GeneralGetting a WM_LBUTTONUP in a listview Pin
Jim Crafton7-Jun-01 18:08
Jim Crafton7-Jun-01 18:08 
GeneralRe: Getting a WM_LBUTTONUP in a listview Pin
7-Jun-01 19:35
suss7-Jun-01 19:35 
GeneralRe: Getting a WM_LBUTTONUP in a listview Pin
Tomasz Sowinski8-Jun-01 0:31
Tomasz Sowinski8-Jun-01 0:31 
GeneralRe: Getting a WM_LBUTTONUP in a listview Pin
Jim Crafton8-Jun-01 7:19
Jim Crafton8-Jun-01 7:19 
GeneralRe: Getting a WM_LBUTTONUP in a listview Pin
Tomasz Sowinski9-Jun-01 2:21
Tomasz Sowinski9-Jun-01 2:21 
GeneralCSplitterWnd without AppWizard Pin
Nathan Hoffman7-Jun-01 12:14
Nathan Hoffman7-Jun-01 12:14 
GeneralRe: CSplitterWnd without AppWizard Pin
Christian Graus7-Jun-01 12:51
protectorChristian Graus7-Jun-01 12:51 
GeneralRe: CSplitterWnd without AppWizard Pin
Vivek Rajan7-Jun-01 19:56
Vivek Rajan7-Jun-01 19:56 
GeneralRe: CSplitterWnd without AppWizard Pin
Nathan Hoffman8-Jun-01 16:09
Nathan Hoffman8-Jun-01 16:09 

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.