home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,709 of 10,840   
   Don to expvb   
   Re: Get Control IDs more efficiently   
   09 Dec 08 15:36:04   
   
   XPost: microsoft.public.vb.general.discussion, microsoft.public.vb   
   From: dsarvas@yahoo.com   
      
   I see BOTH your points without even having to try your suggested code.   
   I see those two lines serve no purpose beyond that point.  I seem to   
   be stuck on this idea that the IDs are needed to grab up the text I   
   need, but the point is well made that I don't.  I'll remove those   
   lines.   
      
   Thanks,   
   Don   
      
   On Tue, 9 Dec 2008 08:55:22 -0500, "expvb"  wrote:   
      
   >   
   >"Don"  wrote in message   
   >news:493e2fe4.10857906@news.west.cox.net...   
   >> Test = GetDlgCtrlID(lastHandle)   
   >> lngCtrlHWND = GetDlgItem(hwnd, Test)   
   >   
   >As Dean suggested, the above two lines are pointless, because you already   
   >have lngCtrlHWND from the call to FindWindowEx, or EnumChildWindows. Try   
   >adding the following lines afterward, which is always True:   
   >   
   >If lastHandle = lngCtrlHWND Then   
   >    Debug.Print "Handles are the same"   
   >Else   
   >    Debug.Print "Handles are NOT the same"   
   >End If   
   >   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca