如何遍历 窗口中的所有控件,获得ID? 如同题目 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 HWND hWnd = ::GetWindow(m_hWnd, GW_CHILD); while (hWnd) { int nID = ::GetDlgCtrlID(hWnd);//这个就是ID hWnd = ::GetWindow(hWnd, GW_HWNDNEXT); } BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam) { LPRECT rcParent; int i, idChild; // Retrieve the child-window identifier. Use it to set the // position of the child window. idChild = GetWindowLong(hwndChild, GWL_ID); if (idChild == ID_FIRSTCHILD) i = 0; else if (idChild == ID_SECONDCHILD) i = 1; else i = 2; return TRUE;} void FindID(HWND hParentwnd){EnumChildWindows(hParentwnd, EnumChildProc, NULL);} http://blog.csdn.net/laiyiling/archive/2004/11/21/189305.aspxCWnd *pChildwnd=pWnd->GetWindow(GW_CHILD);//枚举pWnd的所有子控件pChildwnd= pChildwnd->GetNextWindow(); 这种情况下如何获得类的指针呢? 如何响应动态创建控件的事件 怎样给工具栏添加纹理? 帮帮我,急 分割窗口,为何提示异常呀?????快救救我!!!!! 学习vc编界面的时候碰到如下这样一个问题,书上好象讲的不详细,请大虾们指教 超级简单的小小问题(关于弹出一个对话框) 完全采用.net技术制作的.net中文技术讨论社区开张了!!! CTreeCtrl和CListCtrl的结合使用 学习MFC该从哪里入手,我有C的基础,学VC从哪里入手?抱歉没分了 VC vs VB 关于自绘按钮的问题
HWND hWnd = ::GetWindow(m_hWnd, GW_CHILD);
while (hWnd)
{
int nID = ::GetDlgCtrlID(hWnd);//这个就是ID
hWnd = ::GetWindow(hWnd, GW_HWNDNEXT);
}
{
LPRECT rcParent;
int i, idChild;
// Retrieve the child-window identifier. Use it to set the
// position of the child window.
idChild = GetWindowLong(hwndChild, GWL_ID);
if (idChild == ID_FIRSTCHILD)
i = 0;
else if (idChild == ID_SECONDCHILD)
i = 1;
else
i = 2;
return TRUE;
} void FindID(HWND hParentwnd)
{
EnumChildWindows(hParentwnd, EnumChildProc, NULL);
}
pChildwnd= pChildwnd->GetNextWindow();