Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: A thread that creates multiple dialogs Pin
Maximilien18-Mar-10 9:29
Maximilien18-Mar-10 9:29 
GeneralRe: A thread that creates multiple dialogs Pin
bu7ch3r18-Mar-10 9:36
bu7ch3r18-Mar-10 9:36 
GeneralRe: A thread that creates multiple dialogs Pin
Maximilien18-Mar-10 9:43
Maximilien18-Mar-10 9:43 
GeneralRe: A thread that creates multiple dialogs Pin
bu7ch3r18-Mar-10 9:50
bu7ch3r18-Mar-10 9:50 
AnswerRe: A thread that creates multiple dialogs Pin
Avi Berger18-Mar-10 9:35
Avi Berger18-Mar-10 9:35 
GeneralRe: A thread that creates multiple dialogs Pin
bu7ch3r18-Mar-10 9:40
bu7ch3r18-Mar-10 9:40 
GeneralRe: A thread that creates multiple dialogs Pin
Maximilien18-Mar-10 9:50
Maximilien18-Mar-10 9:50 
GeneralRe: A thread that creates multiple dialogs Pin
Avi Berger21-Mar-10 11:51
Avi Berger21-Mar-10 11:51 
After doing a little checking, evidently you can do it with child windows on a 2nd UI thread. You do have to be careful about communications between the threads since there is a possibility of creating a deadlock between the threads. I would still tend to favor using OnIdle() instead of a 2nd thread to try and deal with your performance issue.

Apart from some quibbling over precise wording, I don't see the problem with what you are doing. As far as my quibbling goes, in the parent window code you call a setup function passing "this" as a parameter so that the thread class can save its value in a member variable called g_thisParent. g_thisParent is not a pointer to "this", it is a CWnd * to the parent window object. Also, in the second thread, you never, ever use "this" in an attempt to refer to the parent window, you use the variable you have named g_thisParent.

Other than that, my only thought would be some sort of synchronization issue - but I don't see what it would be.
Please do not read this signature.

AnswerRe: A thread that creates multiple dialogs Pin
Eugen Podsypalnikov18-Mar-10 9:45
Eugen Podsypalnikov18-Mar-10 9:45 
GeneralRe: A thread that creates multiple dialogs Pin
bu7ch3r18-Mar-10 9:52
bu7ch3r18-Mar-10 9:52 
GeneralRe: A thread that creates multiple dialogs Pin
Eugen Podsypalnikov18-Mar-10 9:57
Eugen Podsypalnikov18-Mar-10 9:57 
GeneralRe: A thread that creates multiple dialogs Pin
bu7ch3r18-Mar-10 9:59
bu7ch3r18-Mar-10 9:59 
QuestionHow Could I Use a define macro identifier in an other define macro replacement list? Pin
A&Ms18-Mar-10 4:08
A&Ms18-Mar-10 4:08 
AnswerRe: How Could I Use a define macro identifier in an other define macro replacement list? Pin
«_Superman_»18-Mar-10 4:21
professional«_Superman_»18-Mar-10 4:21 
GeneralRe: How Could I Use a define macro identifier in an other define macro replacement list? Pin
A&Ms18-Mar-10 4:39
A&Ms18-Mar-10 4:39 
AnswerRe: How Could I Use a define macro identifier in an other define macro replacement list? [modified] Pin
KarstenK18-Mar-10 5:03
mveKarstenK18-Mar-10 5:03 
General[typo] Re: How Could I Use a define macro identifier in an other define macro replacement list? Pin
Nuri Ismail18-Mar-10 5:52
Nuri Ismail18-Mar-10 5:52 
GeneralRe: [typo] Re: How Could I Use a define macro identifier in an other define macro replacement list? Pin
KingsGambit18-Mar-10 8:28
KingsGambit18-Mar-10 8:28 
QuestionCommunication between PCs over a wireless network Pin
Member 184003918-Mar-10 2:53
Member 184003918-Mar-10 2:53 
AnswerRe: Communication between PCs over a wireless network Pin
Moak18-Mar-10 2:59
Moak18-Mar-10 2:59 
QuestionHow to check if a HWND is static icon ctrl? Pin
sashoalm18-Mar-10 2:46
sashoalm18-Mar-10 2:46 
AnswerRe: How to check if a HWND is static icon ctrl? PinPopular
Chris Losinger18-Mar-10 3:05
professionalChris Losinger18-Mar-10 3:05 
Questionunicode to multibyte Pin
Member 59031018-Mar-10 2:21
Member 59031018-Mar-10 2:21 
AnswerRe: unicode to multibyte PinPopular
Adam Roderick J18-Mar-10 2:37
Adam Roderick J18-Mar-10 2:37 
AnswerRe: unicode to multibyte Pin
Richard MacCutchan18-Mar-10 2:45
mveRichard MacCutchan18-Mar-10 2:45 

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.