Hawkwing Posted September 25, 2009 Share Posted September 25, 2009 I think it's possible, but I've no idea how to do it. It's a text file I'm opening into an edit control if it makes any difference. The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Yashied Posted September 25, 2009 Share Posted September 25, 2009 (edited) expandcollapse popup#Include <Constants.au3> #Include <GUIConstantsEx.au3> #Include <WindowsConstants.au3> #Include <WinAPIEx.au3> Global Const $WM_DROPFILES = 0x0233 Global $hForm, $Msg, $Check, $Edit, $hEdit, $hDll, $pDll, $hProc ; Create GUI $hForm = GUICreate('MyGUI', 400, 400) $Check = GUICtrlCreateCheckbox('Enable Drag && Drop', 20, 370, 120, 19) $Edit = GUICtrlCreateEdit('', 20, 20, 360, 340) $hEdit = GUICtrlGetHandle($Edit) ; Register window proc $hDll = DllCallbackRegister('_WinProc', 'ptr', 'hwnd;uint;wparam;lparam') $pDll = DllCallbackGetPtr($hDll) $hProc = _WinAPI_SetWindowLong($hEdit, $GWL_WNDPROC, $pDll) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE ExitLoop Case $Check _WinAPI_DragAcceptFiles($hEdit, GUICtrlRead($Check) = $GUI_CHECKED) EndSwitch WEnd _WinAPI_SetWindowLong($hEdit, $GWL_WNDPROC, $hProc) DllCallbackFree($hDll) Func _WinProc($hWnd, $iMsg, $wParam, $lParam) Switch $iMsg Case $WM_DROPFILES Local $FileList = _WinAPI_DragQueryFileEx($wParam) If (Not @error) And ($FileList[0] = 1) Then GUICtrlSetData($Edit, FileRead($FileList[1])) EndIf _WinAPI_DragFinish($wParam) Return 0 EndSwitch Return _WinAPI_CallWindowProc($hProc, $hWnd, $iMsg, $wParam, $lParam) EndFunc ;==>_WinProcWinAPIEx.au3 Edited September 25, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... 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