Click here to Skip to main content
15,906,947 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IXMLDOMNode as an idl parameter Pin
Stephane Rodriguez.2-Oct-02 9:42
Stephane Rodriguez.2-Oct-02 9:42 
GeneralProblem automating Excel Pin
Anonymous2-Oct-02 7:43
Anonymous2-Oct-02 7:43 
GeneralSmart Pointer question Pin
User 98852-Oct-02 7:40
User 98852-Oct-02 7:40 
Generalmap object in STL Pin
ns2-Oct-02 7:33
ns2-Oct-02 7:33 
GeneralRe: map object in STL Pin
Marc Britten2-Oct-02 7:38
Marc Britten2-Oct-02 7:38 
GeneralRe: map object in STL Pin
ns2-Oct-02 7:47
ns2-Oct-02 7:47 
GeneralRe: map object in STL Pin
Chris Losinger2-Oct-02 7:41
professionalChris Losinger2-Oct-02 7:41 
GeneralRe: map object in STL Pin
ns2-Oct-02 7:48
ns2-Oct-02 7:48 
QuestionIs there a way to send a script file to a server and run it there in VC++ code? Pin
Anonymous2-Oct-02 7:21
Anonymous2-Oct-02 7:21 
AnswerRe: Is there a way to send a script file to a server and run it there in VC++ code? Pin
TyMatthews2-Oct-02 10:54
TyMatthews2-Oct-02 10:54 
GeneralCatch image bar under the mouse Pin
progman2-Oct-02 6:59
progman2-Oct-02 6:59 
Generalmakeing VC project with MINGW Pin
sagmam2-Oct-02 6:49
sagmam2-Oct-02 6:49 
GeneralRe: makeing VC project with MINGW Pin
Mike Eriksson2-Oct-02 21:18
Mike Eriksson2-Oct-02 21:18 
GeneralSTL queue Pin
JohnnyG2-Oct-02 6:32
JohnnyG2-Oct-02 6:32 
GeneralRe: STL queue Pin
TyMatthews2-Oct-02 9:04
TyMatthews2-Oct-02 9:04 
GeneralRe: STL queue Pin
JohnnyG2-Oct-02 10:16
JohnnyG2-Oct-02 10:16 
GeneralRe: STL queue Pin
TyMatthews2-Oct-02 10:34
TyMatthews2-Oct-02 10:34 
GeneralGetting an HWND from an HINSTANCE Pin
Harold Bamford2-Oct-02 6:21
Harold Bamford2-Oct-02 6:21 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Phil J Pearson2-Oct-02 7:14
Phil J Pearson2-Oct-02 7:14 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Chris Richardson2-Oct-02 9:58
Chris Richardson2-Oct-02 9:58 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Harold Bamford2-Oct-02 11:46
Harold Bamford2-Oct-02 11:46 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Chris Richardson2-Oct-02 11:59
Chris Richardson2-Oct-02 11:59 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Phil J Pearson2-Oct-02 12:10
Phil J Pearson2-Oct-02 12:10 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Chris Richardson2-Oct-02 12:19
Chris Richardson2-Oct-02 12:19 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Harold Bamford2-Oct-02 12:20
Harold Bamford2-Oct-02 12:20 
Chris,

I suspected I was mixing apples and oranges. But it still doesn't seem to work.
BOOL CIOGuidesView::enumwndfn(CWnd * wnd)
{
	WININFO wininfo(wnd);
		

	wnd->GetWindowText(wininfo.title);
		

	DWORD ProcessId; 
	GetWindowThreadProcessId (wnd->GetSafeHwnd(), &ProcessId ); 
		

	// We open a handle to the process, which can be compared with the handle
	// returned by ShellExecuteEx.
	HANDLE a_hProcess = OpenProcess( PROCESS_QUERY_INFORMATION, FALSE, ProcessId );
	wininfo.hInst = (HINSTANCE)a_hProcess;
	CloseHandle(a_hProcess);  // only need it for comparison purposes
		
	//wininfo.hInst = (HINSTANCE)ProcessId;  // the wrong way...

	m_WinInfoArray.Add(wininfo);

	return TRUE;
}

This still yields no exact matches on hProcess (from ShellExecuteEx) and a_hProcess (from OpenProcess).

I am beginning to wonder if AcroRd32.exe does something especially weird. I'll try something with another type of file...

I appreciate you looking at this. It has me bamboozled!

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.