Click here to Skip to main content
15,905,616 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Backing up the windows Registry Pin
David Crow15-Sep-05 3:10
David Crow15-Sep-05 3:10 
GeneralRe: Backing up the windows Registry Pin
ThatsAlok15-Sep-05 3:36
ThatsAlok15-Sep-05 3:36 
GeneralRe: Backing up the windows Registry Pin
David Crow19-Sep-05 3:19
David Crow19-Sep-05 3:19 
GeneralRe: Backing up the windows Registry Pin
ThatsAlok19-Sep-05 3:27
ThatsAlok19-Sep-05 3:27 
QuestionWindows Service with network access Pin
Anonymous14-Sep-05 0:05
Anonymous14-Sep-05 0:05 
AnswerRe: Windows Service with network access Pin
22491714-Sep-05 1:22
22491714-Sep-05 1:22 
QuestionAbout Cursor Blinking : Plz Help Pin
parims13-Sep-05 23:53
parims13-Sep-05 23:53 
AnswerRe: About Cursor Blinking : Plz Help Pin
Nishad S14-Sep-05 0:12
Nishad S14-Sep-05 0:12 
GeneralRe: About Cursor Blinking : Plz Help Pin
parims14-Sep-05 0:38
parims14-Sep-05 0:38 
Questionproblem getting imported function name Pin
gamitech13-Sep-05 23:38
gamitech13-Sep-05 23:38 
QuestionRefreshing Dialog Window(more explanation) Pin
a_david12313-Sep-05 23:38
a_david12313-Sep-05 23:38 
AnswerRe: Refreshing Dialog Window(more explanation) Pin
khan++14-Sep-05 0:09
khan++14-Sep-05 0:09 
QuestionDrag and Drop Pin
Hachaso13-Sep-05 23:32
Hachaso13-Sep-05 23:32 
QuestionProblem with FileIOCompletionRoutine ??? Pin
HumanOsc13-Sep-05 23:08
HumanOsc13-Sep-05 23:08 
AnswerRe: Problem with FileIOCompletionRoutine ??? Pin
cmk14-Sep-05 12:08
cmk14-Sep-05 12:08 
GeneralRe: Problem with FileIOCompletionRoutine ??? Pin
HumanOsc14-Sep-05 22:14
HumanOsc14-Sep-05 22:14 
QuestionDownload web pages Pin
Daniel Strigl13-Sep-05 22:44
Daniel Strigl13-Sep-05 22:44 
AnswerRe: Download web pages Pin
ThatsAlok13-Sep-05 23:07
ThatsAlok13-Sep-05 23:07 
QuestionPls Help how to read from windows(edit box) Pin
tejaswi-teja13-Sep-05 22:35
tejaswi-teja13-Sep-05 22:35 
AnswerRe: Pls Help how to read from windows(edit box) Pin
toxcct13-Sep-05 22:39
toxcct13-Sep-05 22:39 
GeneralRe: Pls Help how to read from windows(edit box) Pin
tejaswi-teja13-Sep-05 23:43
tejaswi-teja13-Sep-05 23:43 
please validate the code here if sth is wrong. Only the case for edit box controls it is not working , i am tinking if any locking they have done there. have tried many other options also all of them commented in the below code.

the main window therei is 'System Event" from which i anm trying to read the contents of all its sub windows( edit boxes e.t.c)




void WManip(CWnd *WndActiveChild ,CWnd *WndParent)
{
CWnd * WndActiveChildRead;
CEdit *WndEdit;
LPTSTR EditText;
COleDataObject ClipObj;
tagSTGMEDIUM *strVar;
LPCTSTR lpctFormat;


int ControlID,WinCount = 0;
CString rString,temprString,text;


WndActiveChild->SetForegroundWindow();
WndActiveChild->SetFocus();
// WndActiveChild->OpenClipboard();
// if (( (WndActiveChild->GetClipboardOwner()) ->GetWindowText(rString) ) != 0 )
// (WndActiveChild->GetClipboardOwner()) ->GetWindowText(rString);


// if (rString != "")
// AfxMessageBox("some thingn hapend "+rString);


ControlID = WndActiveChild->GetDlgCtrlID();
WndActiveChild->GetWindowText(rString);

AfxMessageBox(rString);

//WndEdit = WndActiveChild ;


// ClipObj.AttachClipboard();
// strVar = new tagSTGMEDIUM;
// ClipObj.GetData(CF_TEXT, strVar,NULL);



// WndActiveChild ->GetLine(0,EditText);
// WndParent ->GetDlgItemText(ControlID,rString);


// temprString.Format("%s%d%s", (LPCTSTR) rString,ControlID, (LPCTSTR)EditText ); //(LPCTSTR) rString,
AfxMessageBox(temprString);

// the following code is just for testing i have put.

if (rString.Compare("&Edit") == 0)
{
WndActiveChild->PostMessage(WM_LBUTTONDOWN,0,0);
Sleep(50);
WndActiveChild->PostMessage(WM_LBUTTONUP,0,0);
// WndParent->CheckDlgButton(i,1);
}

// WndActiveChild->EnableWindow(false);
WinCount ++;

}

void CConfigTool_AutomateDlg::OnOK()
{
int i,WinCount = 0;
CString rString,temprString,text;
CEdit EControl;

CWnd * pActWindow,*pActChildWindow,*pActChild1Window, *pActChild2Window ;
// pActWindow = CWnd::GetActiveWindow();
pActWindow = CWnd::FindWindow(NULL ,"System Event");
pActWindow->SetForegroundWindow();


// pActWindow->ShowWindow(SW_SHOWMAXIMIZED);

pActChildWindow = pActWindow->GetTopWindow();
while (pActChildWindow != NULL)
{

WinCount ++;

pActChild1Window = pActChildWindow->GetTopWindow();
while(pActChild1Window != NULL)
{
WinCount ++;

/* pActChild2Window = pActChildWindow->GetTopWindow();
while(pActChild2Window != NULL)
{
WinCount ++;

WManip(pActChild2Window,pActChild1Window);
pActChild2Window = pActChild2Window->GetNextWindow(GW_HWNDNEXT);

} */

WManip(pActChild1Window,pActChildWindow);
pActChild1Window = pActChild1Window->GetNextWindow(GW_HWNDNEXT);

}

WManip(pActChildWindow,pActWindow);
pActChildWindow = pActChildWindow->GetNextWindow(GW_HWNDNEXT);

}



// temprString.Format("%s%d", "Total number of windows" , i);

// AfxMessageBox(temprString);

if (CanExit())
CDialog::OnOK();
}
GeneralRe: Pls Help how to read from windows(edit box) Pin
toxcct14-Sep-05 0:50
toxcct14-Sep-05 0:50 
JokeRe: Pls Help how to read from windows(edit box) Pin
ThatsAlok14-Sep-05 1:39
ThatsAlok14-Sep-05 1:39 
GeneralRe: Pls Help how to read from windows(edit box) Pin
toxcct14-Sep-05 1:46
toxcct14-Sep-05 1:46 
JokeRe: Pls Help how to read from windows(edit box) Pin
ThatsAlok14-Sep-05 18:05
ThatsAlok14-Sep-05 18:05 

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.