Click here to Skip to main content
15,923,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Single Document many views Pin
valikac15-Jan-03 9:07
valikac15-Jan-03 9:07 
GeneralRe: Single Document many views Pin
ns15-Jan-03 9:07
ns15-Jan-03 9:07 
GeneralProblems w/ saving Pin
brianwelsch15-Jan-03 8:26
brianwelsch15-Jan-03 8:26 
Generalreplacing main() Pin
Anonymous15-Jan-03 8:24
Anonymous15-Jan-03 8:24 
GeneralRe: replacing main() Pin
Dave Bryant15-Jan-03 8:43
Dave Bryant15-Jan-03 8:43 
GeneralRe: replacing main() Pin
Anonymous15-Jan-03 8:49
Anonymous15-Jan-03 8:49 
GeneralRe: replacing main() Pin
jhwurmbach15-Jan-03 22:14
jhwurmbach15-Jan-03 22:14 
GeneralCListCtrl and multi-threading Pin
Inor15-Jan-03 8:22
Inor15-Jan-03 8:22 
Hello,

I am fairly new to MFC, so please do not beat me up too badly for asking a dumb question. Smile | :)

I am writing an application that consists of a UI and a series of command-line applications to perform compilations on text input through the UI. The general flow of the application is similar to the process that MSVC follows when a project is compiled. I.E. The UI runs a compiler as a separate process and collects output from the process to display on the screen.

I have the "compiler" written (as a command line application) and it works fine. I have the UI executing the "compiler" using the ::CreateProcess() method/function. Input/output from the process is managed using Named Pipes to replace the stdin, stdout, and stderr streams. (I have started a separate thread to monitor and parse the stdout and stderr pipes and send messages back to the application based on the information received.) So far, so good.

I am using a CListCtrl to display the messages to the user, that are received from the "compiler" via the named pipes. However, it appears that the CListCtrl will not actually update the display until the thread with named pipes completes (this is the thread that the CListCtrl display methods are being called from). I have called the Invalidate() method and even sent a WM_PAINT message after each message is added to the CListCtrl. However, it appears that these messages block until named pipes thread completes.

So, my question is:

1. - Can I make the CListCtrl update the display immediately from a seperate worker thread?

2. - Should I be using some control other than a CListCtrl for displaying messages from the separate thread? (The only reason I selected the CListCtrl was to be able to easily store additional infomation with each display message - source code line where the error/warning/message occured and possibly an icon to allow the user to easily distinguish between Errors, Warnings, and Messages.)

Thanks!
GeneralRe: CListCtrl and multi-threading Pin
valikac15-Jan-03 9:10
valikac15-Jan-03 9:10 
GeneralRe: CListCtrl and multi-threading Pin
Nitron15-Jan-03 14:26
Nitron15-Jan-03 14:26 
Generaltimeout recv on tcp socket Pin
orcun colak15-Jan-03 8:04
orcun colak15-Jan-03 8:04 
GeneralRe: timeout recv on tcp socket Pin
geo_m15-Jan-03 8:09
geo_m15-Jan-03 8:09 
GeneralRe: timeout recv on tcp socket Pin
Anonymous15-Jan-03 8:55
Anonymous15-Jan-03 8:55 
GeneralCSizingControlBar help needed Pin
Stefan Dahlin15-Jan-03 7:46
Stefan Dahlin15-Jan-03 7:46 
QuestionHow to know if the app is running from a server ?? Pin
Cris15-Jan-03 7:27
Cris15-Jan-03 7:27 
AnswerRe: How to know if the app is running from a server ?? Pin
Erik Juhl15-Jan-03 9:18
Erik Juhl15-Jan-03 9:18 
GeneralRe: How to know if the app is running from a server ?? Pin
Cris15-Jan-03 23:45
Cris15-Jan-03 23:45 
GeneralRe: How to know if the app is running from a server ?? Pin
Erik Juhl16-Jan-03 4:55
Erik Juhl16-Jan-03 4:55 
GeneralCHtmlView Pin
Brian Delahunty15-Jan-03 5:49
Brian Delahunty15-Jan-03 5:49 
GeneralRe: CHtmlView Pin
Stephane Rodriguez.15-Jan-03 6:36
Stephane Rodriguez.15-Jan-03 6:36 
GeneralRe: CHtmlView Pin
Brian Delahunty15-Jan-03 7:23
Brian Delahunty15-Jan-03 7:23 
GeneralRe: CHtmlView Pin
HENDRIK R17-Jan-03 2:22
HENDRIK R17-Jan-03 2:22 
GeneralRe: CHtmlView Pin
Brian Delahunty17-Jan-03 2:49
Brian Delahunty17-Jan-03 2:49 
GeneralDestroyWindow Pin
georgiek5015-Jan-03 5:27
georgiek5015-Jan-03 5:27 
GeneralRe: DestroyWindow Pin
Nitron15-Jan-03 14:29
Nitron15-Jan-03 14:29 

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.