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,694 of 10,840   
   Don to expvb   
   Re: Get Control IDs more efficiently   
   06 Dec 08 17:44:44   
   
   XPost: microsoft.public.vb.general.discussion, microsoft.public.vb   
   From: dsarvas@yahoo.com   
      
   I tried l GetWindowLong(GWL_ID) as Scott Seligman suggested but I   
   wasn't getting back IDs I would get when I ran the loop I created.   
   But I'll check again to see if I'm possibly using it improperly.   
      
   Regarding your suggestion to use GetDlgCtrlID(), I was using   
   GetDlgCtrlItem in my loop using the range of IDs in my loop as one of   
   the parameters.  I wasn't aware of GetDlgCtrlID().  By the very name   
   it sounds more like what I'm looking for.  I'll give that a try now.   
   Thanks.   
      
   Don   
      
   On Sat, 6 Dec 2008 12:00:54 -0500, "expvb"  wrote:   
      
   >"Don"  wrote in message   
   >news:493a9d6d.2039234@news.west.cox.net...   
   >> Looks like the way   
   >> I've been doing it is the best I can hope for, then.  Unfortunately,   
   >> if I use a loop of 0 to 100, for instance, I won't find an control ID   
   >> with a very high number.  If I run a loop with a very high limit then   
   >> it may take longer than I want . . . but works.   
   >   
   >What about using GetWindowLong(GWL_ID) as Scott Seligman suggested, or   
   >calling GetDlgCtrlID()?   
   >   
   >   
      
   --- 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