如何使用FindWindowEx获取窗体内控件句柄
展开全部
FindWindowEx(
Parent: HWND; {子窗口的父窗口句柄}
Child: HWND; {子窗口句柄}
ClassName: PChar; {类名}
WindowName: PChar {标题}
): HWND;
比如找Form1窗体的子窗体Form2里面名为"确定"的button
FindWindowEx(Form1.Handle,Form2.Handle,'TButton','确定');
窗体的handle也可以用FindWindow去找
Parent: HWND; {子窗口的父窗口句柄}
Child: HWND; {子窗口句柄}
ClassName: PChar; {类名}
WindowName: PChar {标题}
): HWND;
比如找Form1窗体的子窗体Form2里面名为"确定"的button
FindWindowEx(Form1.Handle,Form2.Handle,'TButton','确定');
窗体的handle也可以用FindWindow去找
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询