Click here to Skip to main content
15,891,888 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Port forwarding Pin
sunit531-May-06 4:56
sunit531-May-06 4:56 
QuestionHow to place an edit box and dialog box on a window(SDI,MFC based application))in VC++ dot Net-2003 version Pin
Ashutosh Bagaria31-May-06 2:39
Ashutosh Bagaria31-May-06 2:39 
AnswerRe: How to place an edit box and dialog box on a window(SDI,MFC based application))in VC++ dot Net-2003 version Pin
Sebastian Schneider31-May-06 4:14
Sebastian Schneider31-May-06 4:14 
QuestionHi Pin
Hadi Dayvary31-May-06 2:20
professionalHadi Dayvary31-May-06 2:20 
AnswerRe: Hi Pin
ThatsAlok31-May-06 2:28
ThatsAlok31-May-06 2:28 
GeneralRe: Hi Pin
Hadi Dayvary31-May-06 2:37
professionalHadi Dayvary31-May-06 2:37 
QuestionRe: Hi Pin
David Crow31-May-06 5:18
David Crow31-May-06 5:18 
AnswerRe: Hi Pin
NiceNaidu31-May-06 2:35
NiceNaidu31-May-06 2:35 
Use the following code

BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)<br />
{<br />
EnumInfo info;<br />
DWORD pid;<br />
EnumWin * enumWin =<br />
reinterpret_cast(lParam);<br />
GetWindowThreadProcessId(hWnd, &pid);<br />
<br />
if (pid == enumWin->m_pid)<br />
{<br />
if(GetParent( hWnd ) == 0)<br />
{<br />
enumWin->m_found = TRUE;<br />
enumWin->m_hwnd = hWnd;<br />
AfxMessageBox("handle found!");<br />
return FALSE; <br />
// once found a matching HWND stop enum<br />
}<br />
}<br />
return TRUE; //keep on it<br />
}


you can use WaitForInputIdle(...) for the process to finish initializing before you try to find its HWND. this will not work with apps that start with a process and switch to another while excuting (e.g. mozilla fire fox).

Appu..
"If you judge people, you have no time to love them."
QuestionRotating entire application Pin
Andrew JM Hall31-May-06 2:20
Andrew JM Hall31-May-06 2:20 
AnswerRe: Rotating entire application Pin
Andre xxxxxxx31-May-06 2:58
Andre xxxxxxx31-May-06 2:58 
GeneralRe: Rotating entire application Pin
Andrew JM Hall31-May-06 3:42
Andrew JM Hall31-May-06 3:42 
QuestionIcon problem [modified] Pin
Anu_Bala31-May-06 1:53
Anu_Bala31-May-06 1:53 
AnswerRe: Icon problem [modified] Pin
Hamid_RT31-May-06 1:57
Hamid_RT31-May-06 1:57 
GeneralRe: Icon problem [modified] Pin
Anu_Bala31-May-06 2:01
Anu_Bala31-May-06 2:01 
GeneralRe: Icon problem [modified] Pin
Hamid_RT31-May-06 2:06
Hamid_RT31-May-06 2:06 
GeneralRe: Icon problem [modified] Pin
_anil_31-May-06 2:11
_anil_31-May-06 2:11 
AnswerRe: Icon problem Pin
Michael Dunn31-May-06 2:00
sitebuilderMichael Dunn31-May-06 2:00 
AnswerRe: Icon problem [modified] Pin
Sarath C31-May-06 2:05
Sarath C31-May-06 2:05 
GeneralRe: Icon problem [modified] Pin
Anu_Bala31-May-06 2:30
Anu_Bala31-May-06 2:30 
AnswerRe: Icon problem [modified] Pin
NiceNaidu31-May-06 2:10
NiceNaidu31-May-06 2:10 
AnswerRe: Icon problem [modified] Pin
echozeng31-May-06 5:14
echozeng31-May-06 5:14 
QuestionDisable warning [modified] Pin
big_denny_20031-May-06 1:47
big_denny_20031-May-06 1:47 
AnswerRe: Disable warning [modified] Pin
NiceNaidu31-May-06 1:56
NiceNaidu31-May-06 1:56 
AnswerRe: Disable warning [modified] Pin
Cedric Moonen31-May-06 1:56
Cedric Moonen31-May-06 1:56 
AnswerRe: Disable warning Pin
Michael Dunn31-May-06 1:59
sitebuilderMichael Dunn31-May-06 1:59 

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.