Sep 12, 2018 at 1:10pm UTC  
 
Hello, I've created a window via CreateWindowEx 
Problem is, I can't detect hitting enter in a txtfield 
Enter can only be detected in the window form, but not inside txtfield.. 
Thanks in advance.
 
 
 
 
  Sep 12, 2018 at 2:37pm UTC  
 
Hello, 
 
You could install an eventFilter  on whatever your using for your txtfield. 
 
Regards
 
 
 
 
  Sep 12, 2018 at 3:16pm UTC  
 
Have a look at WM_CHAR, if key == VK_RETURN than check if the txtfield is the active window with GetActiveWindow
 
 
 
 
  Sep 12, 2018 at 3:24pm UTC  
 
if (GetActiveWindow == txtfield)  
or how do i properly type the statement?
 
 
 
 
  Sep 12, 2018 at 3:35pm UTC  
 
GetActiveWindow returns a handle to a window, so you can compare it with the txtfield 
GetActiveWindow() == txtfield
 
 
 
 
  Sep 12, 2018 at 3:52pm UTC  
 
Maybe txtfield isn't the active window at the moment. 
Try GetForegroundWindow instead