Click here to Skip to main content
15,908,909 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strange Code in MFC Source Pin
Gianfranco Lanzetta17-Apr-02 13:18
Gianfranco Lanzetta17-Apr-02 13:18 
GeneralRe: Strange Code in MFC Source Pin
l a u r e n17-Apr-02 21:13
l a u r e n17-Apr-02 21:13 
GeneralRe: Strange Code in MFC Source Pin
Michael Dunn17-Apr-02 13:33
sitebuilderMichael Dunn17-Apr-02 13:33 
GeneralRe: Strange Code in MFC Source Pin
Joel Matthias17-Apr-02 19:57
Joel Matthias17-Apr-02 19:57 
GeneralRe: Strange Code in MFC Source Pin
Stan Shannon17-Apr-02 13:34
Stan Shannon17-Apr-02 13:34 
GeneralRe: Strange Code in MFC Source Pin
Mike Nordell17-Apr-02 13:55
Mike Nordell17-Apr-02 13:55 
GeneralRe: Strange Code in MFC Source Pin
Tim Smith18-Apr-02 2:09
Tim Smith18-Apr-02 2:09 
GeneralMultithreading :: MFC Pin
valikac17-Apr-02 11:23
valikac17-Apr-02 11:23 
Hi.

I am working on my first "real" Windows program. I am at a point in the implementing process where I see a need to multithread one specific job. I will give a good example of something that is very similar to what I am to implement. I will then give my thoughts on a possible solution. I have no prior experience with multithreading, but Jeff Prosise's book does wonders.

I am design a dialog box with a progress bar *very similar* to
the one you see when you download a file using IE. When you download a large file (your download bandwidth is slow), you can see the progress of the download process. The process bar is easy to implement. The part that makes IE progress bar special is you can *still use* IE during the download process. The key is multithread.

Here is my design.

-----
-User activate a feature (via menu)
-View creates a dialogbox w/ progressbar (position 0)
-Dialogbox sends a message to MainFrm.
-MainFrm redirect message to View
-View calls function in Document to begin data processing
-View also passes the function a pointer to dialogbox
-Document starts a new thread (worker thread)
-Thread begin processing data
-Thread sends message back to Document when applicable
-Document calls updated progressbar via pointer to dialog
-----

Again, this is my first experiment with multithread. Is there anything wrong with the design above? I left some small features out. I will include it soon.

Thanks,
Kuphryn
GeneralRe: Multithreading :: MFC Pin
Joaquín M López Muñoz17-Apr-02 11:51
Joaquín M López Muñoz17-Apr-02 11:51 
GeneralRe: Multithreading :: MFC Pin
valikac17-Apr-02 13:33
valikac17-Apr-02 13:33 
GeneralRe: Multithreading :: MFC Pin
Joaquín M López Muñoz17-Apr-02 19:52
Joaquín M López Muñoz17-Apr-02 19:52 
GeneralRe: Multithreading :: MFC Pin
valikac17-Apr-02 20:42
valikac17-Apr-02 20:42 
GeneralChanging Font sizes Pin
17-Apr-02 11:19
suss17-Apr-02 11:19 
GeneralRe: Changing Font sizes Pin
Shog917-Apr-02 11:27
sitebuilderShog917-Apr-02 11:27 
GeneralRe: Changing Font sizes Pin
17-Apr-02 13:15
suss17-Apr-02 13:15 
GeneralVisual Studio .Net - files in workspace aren't alphabetical Pin
Brit17-Apr-02 10:14
Brit17-Apr-02 10:14 
GeneralRe: Visual Studio .Net - files in workspace aren't alphabetical Pin
Mike Nordell17-Apr-02 10:43
Mike Nordell17-Apr-02 10:43 
GeneralRe: Visual Studio .Net - files in workspace aren't alphabetical Pin
Anders Molin17-Apr-02 11:59
professionalAnders Molin17-Apr-02 11:59 
GeneralRe: Visual Studio .Net - files in workspace aren't alphabetical Pin
Mike Nordell17-Apr-02 12:22
Mike Nordell17-Apr-02 12:22 
QuestionVirtual desktops? Pin
generic_user_id17-Apr-02 9:35
generic_user_id17-Apr-02 9:35 
AnswerRe: Virtual desktops? Pin
Mike Nordell17-Apr-02 9:54
Mike Nordell17-Apr-02 9:54 
GeneralRe: Virtual desktops? Pin
generic_user_id17-Apr-02 11:10
generic_user_id17-Apr-02 11:10 
GeneralRe: Virtual desktops? Pin
Mike Nordell17-Apr-02 11:59
Mike Nordell17-Apr-02 11:59 
GeneralRe: Virtual desktops? Pin
generic_user_id18-Apr-02 4:02
generic_user_id18-Apr-02 4:02 
GeneralA CPropertySheet, a CPropertyPage and a thread. Oh dear. Pin
17-Apr-02 9:22
suss17-Apr-02 9:22 

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.