Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Swapping items in ListBox? Pin
PJ Arends21-Dec-05 10:21
professionalPJ Arends21-Dec-05 10:21 
GeneralRe: Swapping items in ListBox? Pin
Maximilien21-Dec-05 16:17
Maximilien21-Dec-05 16:17 
GeneralRe: Swapping items in ListBox? Pin
Lord Kixdemp21-Dec-05 10:42
Lord Kixdemp21-Dec-05 10:42 
GeneralRe: Swapping items in ListBox? Pin
cgb14321-Dec-05 12:19
cgb14321-Dec-05 12:19 
GeneralRe: Swapping items in ListBox? Pin
Lord Kixdemp24-Dec-05 16:13
Lord Kixdemp24-Dec-05 16:13 
GeneralRe: Swapping items in ListBox? Pin
cgb1433-Jan-06 4:05
cgb1433-Jan-06 4:05 
GeneralRe: Swapping items in ListBox? Pin
Lord Kixdemp5-Jan-06 7:31
Lord Kixdemp5-Jan-06 7:31 
QuestionPerformance - Thread vs. Message Pump Pin
Office Lineman21-Dec-05 7:13
Office Lineman21-Dec-05 7:13 
I'm making a simple VC6 MFC dialog application that, when you push a button, pops up a small dialog that has a progress control and an action button. When you press the button, it performs a lengthy iterative task and reports its progress via the progress control; the action button changes from "Go" to "Stop", such that a second press will cancel the lengthy task. If the task completes, it simply dismisses the dialog; if the user cancels the task, the button returns to "Go" and the dialog stays.

Not being a guru in multithreaded applications, I used my old standby peek-and-pump message dispatcher in the loop to handle the Cancel activity. I also tried for the first time to use a worker thread to perform the same task. They both worked, but the threaded version took almost 3 times as long to complete.

To distill the problem, I wrote another pair of applications that just write 1,000,000 numbers sequentially to a text file (print the for-loop iterator). I get the same result. The peek-and-pump version takes 5.2 seconds, while the thread version takes 12.5 seconds. Granted this isn't a big difference, but the original application updates a very large database and runs on the order of 2 minutes vs. 5½ minutes. Is this difference in performance to be expected?

Thanks,
[gb]


--
I've killed again, haven't I?
AnswerRe: Performance - Thread vs. Message Pump Pin
Michael Dunn21-Dec-05 7:39
sitebuilderMichael Dunn21-Dec-05 7:39 
GeneralRe: Performance - Thread vs. Message Pump Pin
Office Lineman21-Dec-05 9:03
Office Lineman21-Dec-05 9:03 
AnswerRe: Performance - Thread vs. Message Pump Pin
David Crow21-Dec-05 8:06
David Crow21-Dec-05 8:06 
GeneralRe: Performance - Thread vs. Message Pump Pin
Office Lineman21-Dec-05 9:28
Office Lineman21-Dec-05 9:28 
QuestionResize a window in runtime Pin
sam117321-Dec-05 6:10
sam117321-Dec-05 6:10 
AnswerRe: Resize a window in runtime Pin
Rage21-Dec-05 6:18
professionalRage21-Dec-05 6:18 
Questionproblem retrieiving wmiClass info Pin
WetRivrRat21-Dec-05 3:16
WetRivrRat21-Dec-05 3:16 
Questionstack corrupted Pin
iiscodered21-Dec-05 2:29
iiscodered21-Dec-05 2:29 
AnswerRe: stack corrupted Pin
JCO66321-Dec-05 2:41
JCO66321-Dec-05 2:41 
AnswerRe: stack corrupted Pin
toxcct21-Dec-05 2:55
toxcct21-Dec-05 2:55 
GeneralRe: stack corrupted Pin
iiscodered21-Dec-05 3:47
iiscodered21-Dec-05 3:47 
GeneralRe: stack corrupted [edited] Pin
toxcct21-Dec-05 3:49
toxcct21-Dec-05 3:49 
QuestionGetPixel: How to include cursor icon? Pin
Matrim Cauthon21-Dec-05 1:30
Matrim Cauthon21-Dec-05 1:30 
AnswerRe: GetPixel: How to include cursor icon? Pin
Rage21-Dec-05 3:51
professionalRage21-Dec-05 3:51 
GeneralRe: GetPixel: How to include cursor icon? Pin
Matrim Cauthon21-Dec-05 6:53
Matrim Cauthon21-Dec-05 6:53 
GeneralRe: GetPixel: How to include cursor icon? Pin
basementman21-Dec-05 8:57
basementman21-Dec-05 8:57 
Generalu use the Getpixel for picture dc Pin
Member 22716555-Jan-06 22:27
Member 22716555-Jan-06 22: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.