Just starting out? Need help? Post your questions and find answers here.
			
		
		
			
				
								nco2k 							 
						Addict 			
		Posts:  1344 Joined:  Mon Sep 15, 2003 5:55 am 
		
						
						
													
							
						
									
						Post 
					 
								by nco2k  Sat Aug 29, 2009 10:26 am 
			
			
			
			
			anyone know an easy way to get the handle of the window under the cursor? the window im dealing with, does not  belong to my app.
			
			
									
									If OSVersion() = #PB_OS_Windows_ME : End : EndIf
						 
		 
				
		
		 
	 
				
			
		
		
			
				
																			
								SCRJ 							 
						User 			
		Posts:  93 Joined:  Sun Jan 15, 2006 1:36 pm 
		
						
						
						 
													
							
						
									
						Post 
					 
								by SCRJ  Sat Aug 29, 2009 11:31 am 
			
			
			
			
			Try WindowFromPoint_() 
 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								srod 							 
						PureBasic Expert 			
		Posts:  10589 Joined:  Wed Oct 29, 2003 4:35 pmLocation:  Beyond the pale... 
		
						
						
						 
													
							
						
									
						Post 
					 
								by srod  Sat Aug 29, 2009 11:32 am 
			
			
			
			
			WindowFromPoint_().
**DOH : too slow!  
I may look like a mule, but I'm not a complete ass.
						 
		 
				
		
		 
	 
	
						
		
		
			
				
								nco2k 							 
						Addict 			
		Posts:  1344 Joined:  Mon Sep 15, 2003 5:55 am 
		
						
						
						 
													
							
						
									
						Post 
					 
								by nco2k  Sat Aug 29, 2009 11:55 am 
			
			
			
			
			i tried that already, but always got zero as result... vista 64. any ideas? 
Code: Select all 
Repeat
  If GetCursorPos_(@Mouse.POINT)
    Debug WindowFromPoint_(Mouse)
  EndIf
  Delay(1000)
Until GetKeyState_(#VK_ESCAPE) & $8000
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								srod 							 
						PureBasic Expert 			
		Posts:  10589 Joined:  Wed Oct 29, 2003 4:35 pmLocation:  Beyond the pale... 
		
						
						
						 
													
							
						
									
						Post 
					 
								by srod  Sat Aug 29, 2009 11:57 am 
			
			
			
			
			Code: Select all 
Repeat 
  If GetCursorPos_(@Mouse.POINT) 
    Debug WindowFromPoint_(Mouse\y<<32 | mouse\x) 
  EndIf 
  Delay(1000) 
Until GetKeyState_(#VK_ESCAPE) & $8000I may look like a mule, but I'm not a complete ass.
						 
		 
				
		
		 
	 
	
						
		
		
			
				
								nco2k 							 
						Addict 			
		Posts:  1344 Joined:  Mon Sep 15, 2003 5:55 am 
		
						
						
						 
													
							
						
									
						Post 
					 
								by nco2k  Sat Aug 29, 2009 12:02 pm 
			
			
			
			
			ok, thanks. 
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								srod 							 
						PureBasic Expert 			
		Posts:  10589 Joined:  Wed Oct 29, 2003 4:35 pmLocation:  Beyond the pale... 
		
						
						
						 
													
							
						
									
						Post 
					 
								by srod  Sat Aug 29, 2009 12:06 pm 
			
			
			
			
			No problem.
			
			
									
									I may look like a mule, but I'm not a complete ass.