Click here to Skip to main content
15,899,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to... Pin
Bravoone_200619-Oct-06 21:01
Bravoone_200619-Oct-06 21:01 
AnswerRe: how to... Pin
Hamid_RT20-Oct-06 0:09
Hamid_RT20-Oct-06 0:09 
AnswerRe: how to... Pin
David Crow20-Oct-06 3:35
David Crow20-Oct-06 3:35 
QuestionWaitForSingleObject Pin
LiYS19-Oct-06 20:20
LiYS19-Oct-06 20:20 
AnswerRe: WaitForSingleObject Pin
Cedric Moonen19-Oct-06 20:38
Cedric Moonen19-Oct-06 20:38 
GeneralRe: WaitForSingleObject Pin
LiYS19-Oct-06 20:52
LiYS19-Oct-06 20:52 
GeneralRe: WaitForSingleObject Pin
Cedric Moonen19-Oct-06 20:59
Cedric Moonen19-Oct-06 20:59 
GeneralRe: WaitForSingleObject Pin
LiYS19-Oct-06 21:17
LiYS19-Oct-06 21:17 
Cedric Moonen wrote:
That is not because the window of the installation package overlap that your main thread window is blank. It is because you block the main thread with the call to WaitForSingleObject (as I explained in my previous post). If your main thread is blocked, that means your window cannot process any messages anymore (which include paint messages also). So, your window stay blank.

I think that way too.
Cedric Moonen wrote:
The way to do it is to start your installation in another thread so that you can safely call WaitForSingleObject and then inform you main thread (by posting a message) when the process is finished.

That's the way I adopted now. But the question is before the main thread informed about the sub thread completion how can the main thread process WM_PAINT message, I provide WaitForSing.. with INFINITE.


Cedric Moonen wrote:
You need to manage that yourself: for example disable the controls on your window or things like that. I don't think there is an easy way to do that (but I might be wrong).

It is a method, but not suitable in my scenario.






GeneralRe: WaitForSingleObject Pin
Cedric Moonen19-Oct-06 22:31
Cedric Moonen19-Oct-06 22:31 
Questionhow to resolve this issue? Pin
gentleguy19-Oct-06 20:13
gentleguy19-Oct-06 20:13 
AnswerRe: how to resolve this issue? Pin
ThatsAlok19-Oct-06 20:19
ThatsAlok19-Oct-06 20:19 
AnswerRe: how to resolve this issue? Pin
Cedric Moonen19-Oct-06 20:29
Cedric Moonen19-Oct-06 20:29 
AnswerRe: how to resolve this issue? Pin
David Crow20-Oct-06 3:40
David Crow20-Oct-06 3:40 
QuestionTwo Joystick and DirectInput Pin
akira3219-Oct-06 18:33
akira3219-Oct-06 18:33 
Questionis this the only way to do OLEDB coonection Pin
With_problem19-Oct-06 16:36
With_problem19-Oct-06 16:36 
AnswerRe: is this the only way to do OLEDB coonection Pin
Mark Salsbery19-Oct-06 17:55
Mark Salsbery19-Oct-06 17:55 
Question[question] Inheritance and access level Pin
w2520n252019-Oct-06 16:24
w2520n252019-Oct-06 16:24 
AnswerRe: [question] Inheritance and access level Pin
Mark Salsbery19-Oct-06 18:05
Mark Salsbery19-Oct-06 18:05 
QuestionDirect3D image scramples when the screensaver comes up Pin
lastgen19-Oct-06 15:39
lastgen19-Oct-06 15:39 
QuestionI need help,who can help me of this project? Pin
alphaxz19-Oct-06 15:32
alphaxz19-Oct-06 15:32 
AnswerRe: I need help,who can help me of this project? Pin
Hamid_RT19-Oct-06 20:55
Hamid_RT19-Oct-06 20:55 
Questionrealtime Redirection Pin
rupert_durans19-Oct-06 15:22
rupert_durans19-Oct-06 15:22 
QuestionRe: realtime Redirection Pin
David Crow20-Oct-06 3:43
David Crow20-Oct-06 3:43 
QuestionA real beginner Q Pin
Ray_mond19-Oct-06 10:00
Ray_mond19-Oct-06 10:00 
AnswerRe: A real beginner Q Pin
Zac Howland19-Oct-06 10:14
Zac Howland19-Oct-06 10:14 

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.