Click here to Skip to main content
15,893,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmemory leaks using pdh library Pin
m.dietz19-Oct-06 21:48
m.dietz19-Oct-06 21:48 
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 
LiYS wrote:
but this way the portion taken by the package window overlapped with main thread widow, when main thread windows removed that area appears blank. I don't want that blank.


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.

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.


LiYS wrote:
What I'm trying to do is to prevent the user from doing anything with main thread's windows while the package is installing


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).


Cédric Moonen
Software developer

Charting control [Updated - v1.1]

GeneralRe: WaitForSingleObject Pin
LiYS19-Oct-06 21:17
LiYS19-Oct-06 21:17 
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 

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.