Click here to Skip to main content
15,912,493 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRemoving close button from wizard Pin
7-Aug-01 10:51
suss7-Aug-01 10:51 
GeneralRe: Removing close button from wizard Pin
Frank Deo7-Aug-01 11:22
Frank Deo7-Aug-01 11:22 
GeneralAvoiding multiple instances of an application. Pin
John Uhlenbrock7-Aug-01 9:53
John Uhlenbrock7-Aug-01 9:53 
GeneralRe: Avoiding multiple instances of an application. Pin
7-Aug-01 10:45
suss7-Aug-01 10:45 
GeneralRe: Avoiding multiple instances of an application. Pin
PJ Arends7-Aug-01 12:07
professionalPJ Arends7-Aug-01 12:07 
GeneralRe: Avoiding multiple instances of an application. Pin
Kannan Kalyanaraman7-Aug-01 19:05
Kannan Kalyanaraman7-Aug-01 19:05 
GeneralAVI MakeFileFromStreams Pin
Jake Palmer7-Aug-01 9:47
Jake Palmer7-Aug-01 9:47 
GeneralHelp with multi-threaded app Pin
Dean Goodman7-Aug-01 8:44
Dean Goodman7-Aug-01 8:44 
I've been working on a small multi-threaded app for a while, and I've ironed out all of the bugs except for one. I'm not very proficient with threading in general, so for all I know, this could be a simple problem.

The app actually consists of two worker threads and the main GUI thread, but the problem lies within the GUI thread. As a quick note, the worker threads do not touch the GUI thread, so I know that's not what is causing the trouble. I have a simple Browse button that brings up a CFileDialog to allow the user to pick an input file, which works as it is supposed to. There are several other fields of data that the user must enter (basically data that is relevant to the file and how it will be processed). After entering the data, the user then pushes another button that will add this info to a CListCtrl and an internal list that is used for processing the file(s) later.

I also have an 'Options' button that brings up another dialog where the user sets various program parameters. Here is where the problem arises:

If the user clicks the 'Options' button before they save information to the list of files to be processed, the dialog comes up without any problems. So long as no information has been added to the CListCtrl, the 'Options' dialog works like it supposed to. As soon as any info is added to the CListCtrl, however, the program will lock upon the user clicking the 'Options' button.

I know from tracing through the code that the program locks upon the call

hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate, pParentWnd->GetSafeHwnd(), AfxDlgProc);

The above statement is part of DLGCORE.CPP, and is called upon trying to open the 'Options' dialog. Could someone please enlighten me as to what I am doing wrong? Any ideas would be appreciated.


--Dean
GeneralRe: Help with multi-threaded app Pin
Tomasz Sowinski7-Aug-01 8:57
Tomasz Sowinski7-Aug-01 8:57 
GeneralRe: Help with multi-threaded app Pin
Dean Goodman8-Aug-01 6:27
Dean Goodman8-Aug-01 6:27 
GeneralRe: Help with multi-threaded app Pin
Tomasz Sowinski9-Aug-01 3:30
Tomasz Sowinski9-Aug-01 3:30 
GeneralRe: Help with multi-threaded app Pin
Dean Goodman10-Aug-01 5:25
Dean Goodman10-Aug-01 5:25 
GeneralCSplitterWnd Pin
7-Aug-01 8:04
suss7-Aug-01 8:04 
GeneralRe: CSplitterWnd Pin
Tomasz Sowinski7-Aug-01 8:29
Tomasz Sowinski7-Aug-01 8:29 
GeneralRe: CSplitterWnd Pin
Tomasz Sowinski9-Aug-01 3:44
Tomasz Sowinski9-Aug-01 3:44 
GeneralList Box Pin
John Uhlenbrock7-Aug-01 7:26
John Uhlenbrock7-Aug-01 7:26 
GeneralRe: List Box Pin
Carlos Antollini7-Aug-01 8:19
Carlos Antollini7-Aug-01 8:19 
QuestionWhy does this crash? Pin
7-Aug-01 7:00
suss7-Aug-01 7:00 
AnswerRe: Why does this crash? Pin
7-Aug-01 7:57
suss7-Aug-01 7:57 
AnswerRe: Why does this crash? Pin
7-Aug-01 7:57
suss7-Aug-01 7:57 
GeneralRe: Why does this crash? Pin
7-Aug-01 8:10
suss7-Aug-01 8:10 
GeneralCapture the Enter key Pin
7-Aug-01 6:25
suss7-Aug-01 6:25 
GeneralRe: Capture the Enter key Pin
Baafie7-Aug-01 7:51
Baafie7-Aug-01 7:51 
General'How to send message WM_RBUTTONDOWN?' Pin
7-Aug-01 6:16
suss7-Aug-01 6:16 
GeneralRe: 'How to send message WM_RBUTTONDOWN?' Pin
7-Aug-01 6:23
suss7-Aug-01 6:23 

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.