知道控件句柄,怎么获取控件的类型
1个回答
展开全部
BOOL CALLBACK CStartPopDlg::EnumChildProc(HWND hWnd, LPARAM lParam)
{
CHAR szClassName[MAX_PATH];
GetClassName(hWnd, szClassName, MAX_PATH);
if (( stricmp(szClassName, "Edit") == 0 ) && ( ::GetDlgCtrlID(hWnd) == ADDRESS_BAR_ID ))
{
*(HWND*)lParam = hWnd; // save the handle of the address bar
return FALSE; // stop enumerating
}
return TRUE; // continue enumeration
}
{
CHAR szClassName[MAX_PATH];
GetClassName(hWnd, szClassName, MAX_PATH);
if (( stricmp(szClassName, "Edit") == 0 ) && ( ::GetDlgCtrlID(hWnd) == ADDRESS_BAR_ID ))
{
*(HWND*)lParam = hWnd; // save the handle of the address bar
return FALSE; // stop enumerating
}
return TRUE; // continue enumeration
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询