「N88BASIC互換モードでドラッグドロップを受け付ける」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
#asciiart(blockquote){
#N88BASIC
'自分のウインドウハンドルを取得
Dim hwnd As HWND
hwnd = GetForegroundWindow()
DragAcceptFiles(hwnd, TRUE)'どrを受け入れる
'ウインドウプロシージャのサブクラス化
Dim default_wndproc As *Function(a As Long, s As Long, d As Long, f As Long) As Long
default_wndproc = GetWindowLong(hwnd, GWL_WNDPROC)
SetWindowLong(hwnd, GWL_WNDPROC, AddressOf(Subclass1))
'俺のプロシジャー
Function Subclass1(a As Long, s As Long, d As Long, f As Long) As Long
Dim num As Long
Dim countr As Long
Dim files[333] As Byte
Subclass1=0
Select Case s
Case WM_DROPFILES'ドラッグドロップのしょり
num = DragQueryFile(d, -1, 0, 0)
For countr=0 To num-1
DragQueryFile(d, countr, files, 333)
If GetFileAttributes(files) And FILE_ATTRIBUTE_DIRECTORY Then Print "(ディレクトリ)";
Print MakeStr(files)
Next
Case Else
'自分で処理しないものはデフォ処理
Subclass1=CallWindowProc(default_wndproc,a,s,d,f)
End Select
End Function
}