Click here to Skip to main content
15,914,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to find protected/encrypted word documents? Pin
GTS20201-Apr-04 22:54
GTS20201-Apr-04 22:54 
AnswerRe: How to find protected/encrypted word documents? Pin
gUrM33T1-Apr-04 16:39
gUrM33T1-Apr-04 16:39 
GeneralRe: How to find protected/encrypted word documents? Pin
GTS20201-Apr-04 22:56
GTS20201-Apr-04 22:56 
GeneralModem informations Pin
Chernobog11-Apr-04 3:44
Chernobog11-Apr-04 3:44 
GeneralRe: Modem informations Pin
Roger Wright1-Apr-04 4:30
professionalRoger Wright1-Apr-04 4:30 
QuestionWhich message window receives after all when it open? Pin
vgrigor1-Apr-04 3:43
vgrigor1-Apr-04 3:43 
AnswerRe: Which message window receives after all when it open? Pin
Prakash Nadar1-Apr-04 4:42
Prakash Nadar1-Apr-04 4:42 
AnswerRe: Which message window receives after all when it open? Pin
Harold Bamford1-Apr-04 12:33
Harold Bamford1-Apr-04 12:33 
I had a similar problem when starting up a program (Acrobat Reader) and wanted to wait until it had finished convulsing before trying to diddle it. I stumbled upon WaitForInputIdle(). Here is a working example of using it:

STARTUPINFO startupInfo;
PROCESS_INFORMATION processInfo;
::ZeroMemory(&startupInfo, sizeof(startupInfo));
startupInfo.cb = sizeof(startupInfo);
::ZeroMemory(&processInfo, sizeof(processInfo));

char cmd[MAX_PATH + MAX_PATH + 5];
sprintf(cmd,"\"%s\" \"%s\"", szExe, pdfFile);
BOOL startedOK = CreateProcess(
	NULL,
	cmd,	// Complete command line, including quoting
	NULL,	// Process security
	NULL,	// Thread security
	FALSE,	// Inheritance
	0,	// no special startup flags
	NULL,	// no special environment
	NULL,	// no default startup directory
	&startupInfo,
	&processInfo);	// Get hProcess and dwProcessId from this

if(!startedOK)
{
	ShowLastError(cmd);
	return;
}

// Don't attempt to control the Acrobat Reader until it is ready
<big>WaitForInputIdle(processInfo.hProcess,INFINITE);</big>

Of course, this is assuming the windows you're interested in are in another process...
GeneralRe: Which message window receives after all when it open? Pin
vgrigor1-Apr-04 19:33
vgrigor1-Apr-04 19:33 
AnswerRe: Which message window receives after all when it open? Pin
gUrM33T1-Apr-04 16:44
gUrM33T1-Apr-04 16:44 
GeneralDatabases and threads Pin
islheg1-Apr-04 3:09
islheg1-Apr-04 3:09 
GeneralRe: Databases and threads Pin
Prakash Nadar1-Apr-04 4:45
Prakash Nadar1-Apr-04 4:45 
GeneralEntering new lines in edit box Pin
satcat1-Apr-04 3:02
satcat1-Apr-04 3:02 
GeneralRe: Entering new lines in edit box Pin
David Crow1-Apr-04 3:24
David Crow1-Apr-04 3:24 
GeneralRe: Entering new lines in edit box Pin
basementman1-Apr-04 5:02
basementman1-Apr-04 5:02 
GeneralMemory Device context+Createcompatible Bitmap related query Pin
JHAKAS1-Apr-04 1:59
JHAKAS1-Apr-04 1:59 
GeneralRe: Memory Device context+Createcompatible Bitmap related query Pin
John R. Shaw1-Apr-04 9:36
John R. Shaw1-Apr-04 9:36 
QuestionHow to detect that background under child window is changed? Pin
vgrigor1-Apr-04 0:48
vgrigor1-Apr-04 0:48 
QuestionHow to obtain interface ip from destination ip ? Pin
VF1-Apr-04 0:04
VF1-Apr-04 0:04 
AnswerRe: How to obtain interface ip from destination ip ? Pin
Antony M Kancidrowski1-Apr-04 1:17
Antony M Kancidrowski1-Apr-04 1:17 
AnswerRe: How to obtain interface ip from destination ip ? Pin
Mike Dimmick1-Apr-04 1:49
Mike Dimmick1-Apr-04 1:49 
Generalset cursor of SDI Pin
MeWithNoName1-Apr-04 0:04
MeWithNoName1-Apr-04 0:04 
GeneralRe: set cursor of SDI Pin
Milton Karimbekallil1-Apr-04 0:39
Milton Karimbekallil1-Apr-04 0:39 
Generalvector math on different pc processors (amd, intel) Pin
Mediate31-Mar-04 23:33
Mediate31-Mar-04 23:33 
GeneralRe: vector math on different pc processors (amd, intel) Pin
Antony M Kancidrowski1-Apr-04 1:31
Antony M Kancidrowski1-Apr-04 1:31 

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.