如何通过一个毫不相关的进程去控制另一进程窗口中数据
2007-02-12 16:19
507 查看
如何通过一个毫不相关的进程去控制另一进程窗口中数据?as,edit框内容等等...,这和我们写程序获取ie的地址栏类似!如下:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
void CMy111Dlg::OnBnClickedButton9()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// TODO: 在此添加控件通知处理程序代码
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*CString str="111";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindow(NULL,str);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
pWnd->SetWindowText(str+".cn");*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd = CWnd::FromHandle((HWND)0x001C093C);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//CString str="111";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd->SetWindowText(str+".cn");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//CString str="Myfirst";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//HWND hWnd;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//hWnd=::FindWindow(NULL,"111");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->FindWindowEx(hWnd,NULL,"Edit",0);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*pWnd=pWnd->FindWindow("IEFrame",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A005);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A005);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A205);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A205);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A205);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowEx(pWnd->m_hWnd,NULL,"WorkerW",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"rebarWindow32",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"comboboxex32",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"combobox",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"edit",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char sz[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd->SendMessage(WM_GETTEXT,255,(LPARAM)sz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString sss;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss.Format("%s",sz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
MessageBox(sss);*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*pWnd=pWnd->FindWindow(NULL,"111");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//方法一
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetDlgItem(0x000003EE);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char sz[255]="23455";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
pWnd->SendMessage(WM_SETTEXT,255,(LPARAM)sz);*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//方法二
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*pWnd=pWnd->GetWindow(GW_CHILD);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
while(pWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{ //pWnd->SetWindowText(str+".cn");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString strcn;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetClassName(pWnd->m_hWnd,strcn.GetBufferSetLength(100),100);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strcn=="Edit")
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString temp;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd->GetWindowText(temp);//?
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char szTxt[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd->SendMessage(WM_GETTEXT,255,(LPARAM)szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
temp.Format("%s",szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//MessageBox(temp);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strcmp(temp,"Myfirst")==0)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MessageBox("find");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd->SetWindowText(temp+".132");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char szTxt[255]=".3255";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char sz[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strcpy(sz,temp);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strcat(sz,szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd->SendMessage(WM_SETTEXT,255,(LPARAM)sz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
else MessageBox("wrong");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetWindow(GW_HWNDNEXT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*CWnd* pMainWnd=AfxGetMainWnd()->GetWindow(GW_HWNDFIRST);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
while(pMainWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString strClassName;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetClassName(pMainWnd->m_hWnd,strClassName.GetBufferSetLength(100),100);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strClassName=="IEFrame")
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChildWnd=CWnd::FromHandle(::FindWindowEx(pMainWnd->m_hWnd,NULL,
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"WorkerW",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChildWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild2Wnd=CWnd::FromHandle(::FindWindowEx(pChildWnd->m_hWnd,NULL, "rebarWindow32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild2Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild3Wnd=CWnd::FromHandle(::FindWindowEx(pChild2Wnd->m_hWnd,NULL,"ComBoBoxEx32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild3Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild4Wnd=CWnd::FromHandle(::FindWindowEx(pChild3Wnd->m_hWnd,NULL,"ComBoBox",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild4Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild5Wnd=CWnd::FromHandle(::FindWindowEx(pChild4Wnd->m_hWnd,NULL,"Edit",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild5Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char szTxt[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pChild5Wnd->SendMessage(WM_GETTEXT,255,(LPARAM)szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString sss;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss.Format("%s",szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MessageBox(sss);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss+=".cn";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strcpy(szTxt,sss);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pChild5Wnd->SendMessage(WM_SETTEXT,255,(LPARAM)szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pMainWnd = pMainWnd->GetWindow(GW_HWNDNEXT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindow("IEFrame",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetWindow(GW_CHILD);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
while(pWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{ CString strcn;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetClassName(pWnd->m_hWnd,strcn.GetBufferSetLength(100),100);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strcn=="WorkerW")
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd2=CWnd::FromHandle(::FindWindowEx(pWnd->m_hWnd,NULL,"rebarWindow32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd2)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd3=CWnd::FromHandle(::FindWindowEx(pWnd2->m_hWnd,NULL,"comboboxex32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd3)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd4=CWnd::FromHandle(::FindWindowEx(pWnd3->m_hWnd,NULL,"combobox",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd4)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd5=CWnd::FromHandle(::FindWindowEx(pWnd4->m_hWnd,NULL,"Edit",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd5)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char buf[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd5->SendMessage(WM_GETTEXT,255,(LPARAM)buf);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString sss;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss.Format("%s",buf);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MessageBox(sss);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetWindow(GW_HWNDNEXT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
void CMy111Dlg::OnBnClickedButton9()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// TODO: 在此添加控件通知处理程序代码
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*CString str="111";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindow(NULL,str);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
pWnd->SetWindowText(str+".cn");*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd = CWnd::FromHandle((HWND)0x001C093C);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//CString str="111";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd->SetWindowText(str+".cn");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//CString str="Myfirst";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//HWND hWnd;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//hWnd=::FindWindow(NULL,"111");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->FindWindowEx(hWnd,NULL,"Edit",0);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*pWnd=pWnd->FindWindow("IEFrame",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A005);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A005);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A205);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A205);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd=pWnd->GetDlgItem(0x0000A205);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowEx(pWnd->m_hWnd,NULL,"WorkerW",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"rebarWindow32",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"comboboxex32",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"combobox",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindowExA(pWnd->m_hWnd,NULL,"edit",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char sz[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd->SendMessage(WM_GETTEXT,255,(LPARAM)sz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString sss;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss.Format("%s",sz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
MessageBox(sss);*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*pWnd=pWnd->FindWindow(NULL,"111");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//方法一
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetDlgItem(0x000003EE);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char sz[255]="23455";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
pWnd->SendMessage(WM_SETTEXT,255,(LPARAM)sz);*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//方法二
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*pWnd=pWnd->GetWindow(GW_CHILD);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
while(pWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{ //pWnd->SetWindowText(str+".cn");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString strcn;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetClassName(pWnd->m_hWnd,strcn.GetBufferSetLength(100),100);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strcn=="Edit")
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString temp;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd->GetWindowText(temp);//?
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char szTxt[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd->SendMessage(WM_GETTEXT,255,(LPARAM)szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
temp.Format("%s",szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//MessageBox(temp);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strcmp(temp,"Myfirst")==0)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MessageBox("find");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//pWnd->SetWindowText(temp+".132");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char szTxt[255]=".3255";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char sz[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strcpy(sz,temp);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strcat(sz,szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd->SendMessage(WM_SETTEXT,255,(LPARAM)sz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
else MessageBox("wrong");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetWindow(GW_HWNDNEXT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*CWnd* pMainWnd=AfxGetMainWnd()->GetWindow(GW_HWNDFIRST);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
while(pMainWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString strClassName;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetClassName(pMainWnd->m_hWnd,strClassName.GetBufferSetLength(100),100);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strClassName=="IEFrame")
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChildWnd=CWnd::FromHandle(::FindWindowEx(pMainWnd->m_hWnd,NULL,
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"WorkerW",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChildWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild2Wnd=CWnd::FromHandle(::FindWindowEx(pChildWnd->m_hWnd,NULL, "rebarWindow32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild2Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild3Wnd=CWnd::FromHandle(::FindWindowEx(pChild2Wnd->m_hWnd,NULL,"ComBoBoxEx32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild3Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild4Wnd=CWnd::FromHandle(::FindWindowEx(pChild3Wnd->m_hWnd,NULL,"ComBoBox",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild4Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pChild5Wnd=CWnd::FromHandle(::FindWindowEx(pChild4Wnd->m_hWnd,NULL,"Edit",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pChild5Wnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char szTxt[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pChild5Wnd->SendMessage(WM_GETTEXT,255,(LPARAM)szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString sss;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss.Format("%s",szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MessageBox(sss);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss+=".cn";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strcpy(szTxt,sss);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pChild5Wnd->SendMessage(WM_SETTEXT,255,(LPARAM)szTxt);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pMainWnd = pMainWnd->GetWindow(GW_HWNDNEXT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->FindWindow("IEFrame",NULL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetWindow(GW_CHILD);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
while(pWnd)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{ CString strcn;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetClassName(pWnd->m_hWnd,strcn.GetBufferSetLength(100),100);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(strcn=="WorkerW")
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd2=CWnd::FromHandle(::FindWindowEx(pWnd->m_hWnd,NULL,"rebarWindow32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd2)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd3=CWnd::FromHandle(::FindWindowEx(pWnd2->m_hWnd,NULL,"comboboxex32",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd3)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd4=CWnd::FromHandle(::FindWindowEx(pWnd3->m_hWnd,NULL,"combobox",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd4)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CWnd* pWnd5=CWnd::FromHandle(::FindWindowEx(pWnd4->m_hWnd,NULL,"Edit",NULL));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
if(pWnd5)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char buf[255];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd5->SendMessage(WM_GETTEXT,255,(LPARAM)buf);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
CString sss;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
sss.Format("%s",buf);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MessageBox(sss);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pWnd=pWnd->GetWindow(GW_HWNDNEXT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
相关文章推荐
- 一个通过回车键调另一个数据窗口相关数据到主窗口的函数
- 如何尽可能麻烦的通过open cv控制一个小灯
- 探讨:Oracle数据库查看一个进程是如何执行相关的实际SQL语句
- ORACLE11g 没有控制文件如何通过rman备份恢复数据的详细实战过程
- 揭露黑客是如何通过上传一个jsp页面控制和攻击你web站点的(含jsp代码)
- 如何打开 两个Editplus(窗口 进程),不想在一个窗口多标签打开程序,这样子很难对比程序
- 如何在mfc中通过线程向主窗口发送数据或者是访问控件
- 关于控制一个外部窗口的相关问题
- 如何控制一个程序只能有一个进程
- PB如何在Datawindow(数据窗口)中控制列的修改方式
- 如何通过使用 VisualC # .NET /VB.NET 向打印机发送数据/控制命令
- php和js如何通过json互相传递数据相关问题探讨
- 如何编写一个能读取Powerbuilder的数据窗口中数据的程序
- 进程之间如何通过消息队列传输大量数据
- C++Windows下如何让窗口进程只运行一个实例
- Oracle数据库查看一个进程是如何执行相关的实际SQL语句
- 如何只保证窗口只打开一次[即只运行一个进程]
- 【PB】如何创建一个动态的数据窗口对象?
- php和js如何通过json互相传递数据相关问题探讨
- 进程通过消息控制其他进程窗口