Undutchable Posted August 10, 2009 Share Posted August 10, 2009 Hi guys, Basic question but I can't find the answer: I have a inputbox created with GuiCtrlCreateInput, and I would like to validate the user entry per letter. But the GuiGetMsg is only activated when I click on another box from the Gui. I would like a condition to be evaluated every time one letter is inputed in the inpubox. Is there a way? Thanks! >_< Link to comment Share on other sites More sharing options...
SandelPerieanu Posted August 10, 2009 Share Posted August 10, 2009 like this? #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global $gui, $input_box $gui = GUICreate('Main Gui', 250, 30 , -1, -1) $input_box = GUICtrlCreateInput('', 5, 5, 240, 20) GUIRegisterMsg($wm_command, "Input_Change") GUISetState() While 1 $msg = GUIGetMsg() If $msg = $gui_event_close Then Exit WEnd ; Func Input_Change($hwnd, $msg, $wparam, $lparam) #forceref $hwnd, $msg, $lparam Local $nnotifycode = _WinAPI_HiWord($wparam) Local $nid = _WinAPI_LoWord($wparam) If $nid = $input_box And $nnotifycode = $en_change Then ToolTip(GUICtrlRead($input_box)) EndIf EndFunc ;==>Input_Change Link to comment Share on other sites More sharing options...
Undutchable Posted August 10, 2009 Author Share Posted August 10, 2009 psandu.ro, perfect! >_< Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now