Click here to Skip to main content
16,008,954 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Validating a file path Pin
drjake23-Jul-04 8:21
drjake23-Jul-04 8:21 
GeneralRe: Validating a file path Pin
David Crow23-Jul-04 9:32
David Crow23-Jul-04 9:32 
GeneralRe: Validating a file path Pin
ryuki23-Jul-04 13:23
ryuki23-Jul-04 13:23 
GeneralRe: Validating a file path Pin
ThatsAlok23-Jul-04 21:00
ThatsAlok23-Jul-04 21:00 
GeneralCSocket and connection check Pin
Anonymous22-Jul-04 23:19
Anonymous22-Jul-04 23:19 
GeneralRe: CSocket and connection check Pin
valikac23-Jul-04 5:06
valikac23-Jul-04 5:06 
GeneralRe: CSocket and connection check Pin
palbano23-Jul-04 7:59
palbano23-Jul-04 7:59 
GeneralThread Creation in CMainFrame Pin
RichardS22-Jul-04 23:12
RichardS22-Jul-04 23:12 
Hi,

Is there a rule of MFC that does not allow thread creation from CMainFrame?

The situation is the following:

I have a menu function that wants to create a thread using

::CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) ThreadAnalyse, &m_stThreadArg, 0, &dw);

The ThreadAnalyse Function is a static global function, not a member of CMainFrame. The m_stThreadArg is a member of CMainFrame and contains 4 pointer to the CMainFrame Object and 3 pointers to other data.

However it appears that once the menu handler function has returned the whole computer hangs up and runs very slowly. If I place a break point in the Thread function the function is not called for a very long time. Once the function returns the computer returns to normal operational conditions and timings.

Does anyone know why this is?

regards,
RichardS


"Programming today is a race between software engineers striving to build bigger and
better idiot-proff programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
GeneralRe: Thread Creation in CMainFrame Pin
valikac23-Jul-04 5:10
valikac23-Jul-04 5:10 
GeneralRe: Thread Creation in CMainFrame Pin
RichardS23-Jul-04 5:34
RichardS23-Jul-04 5:34 
GeneralRe: Thread Creation in CMainFrame Pin
palbano23-Jul-04 7:55
palbano23-Jul-04 7:55 
GeneralRe: Thread Creation in CMainFrame Pin
RichardS23-Jul-04 22:00
RichardS23-Jul-04 22:00 
GeneralRe: Thread Creation in CMainFrame Pin
palbano25-Jul-04 19:04
palbano25-Jul-04 19:04 
GeneralRe: Thread Creation in CMainFrame Pin
David Crow23-Jul-04 9:33
David Crow23-Jul-04 9:33 
GeneralRe: Thread Creation in CMainFrame Pin
RichardS23-Jul-04 21:58
RichardS23-Jul-04 21:58 
GeneralDDV/DDX with propertypages Pin
Robberto C.22-Jul-04 22:50
sussRobberto C.22-Jul-04 22:50 
GeneralRe: DDV/DDX with propertypages Pin
PJ Arends23-Jul-04 7:10
professionalPJ Arends23-Jul-04 7:10 
GeneralHow, knowing handler of window, attach other window to him. Pin
Anton Zarubin22-Jul-04 22:45
Anton Zarubin22-Jul-04 22:45 
GeneralRe: How, knowing handler of window, attach other window to him. Pin
Timothy Grabrian23-Jul-04 13:55
professionalTimothy Grabrian23-Jul-04 13:55 
GeneralCListCtrl InsertItem Pin
Atif Mushtaq22-Jul-04 22:20
Atif Mushtaq22-Jul-04 22:20 
GeneralRe: CListCtrl InsertItem Pin
Arjan Schouten23-Jul-04 0:15
Arjan Schouten23-Jul-04 0:15 
GeneralRe: CListCtrl InsertItem Pin
V.23-Jul-04 1:13
professionalV.23-Jul-04 1:13 
GeneralRe: CListCtrl InsertItem Pin
David Crow23-Jul-04 9:34
David Crow23-Jul-04 9:34 
GeneralSetSystemCursor in VC++ Pin
5iveboy22-Jul-04 21:56
5iveboy22-Jul-04 21:56 
GeneralRe: SetSystemCursor in VC++ Pin
erkanina22-Jul-04 22:17
erkanina22-Jul-04 22:17 

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.