RhinoV3
SP3: Clear command window text
- How to empty/clear command window text/history? |
bas module:
Declare Function
FindWindowEx Lib
"user32" Alias
"FindWindowExA" (ByVal
hWnd1 As Long,
ByVal
hWnd2 As Long,
ByVal
lpsz1 As String,
ByVal
lpsz2 As String)
As
Long
Declare Function SendMessage
Lib "user32"
Alias "SendMessageW"
(ByVal hwnd As
Long, ByVal wMsg
As Long, ByVal wParam
As Long, lParam
As Long) As Long
command button:
Dim win1, win2, glob_rich_hwnd as
long
win1 = FindWindowEx(glob_rh_hwnd, 0&, "AfxControlBar42", "Command")
win2 = FindWindowEx(win1, 0&, "Afx:400000:8:10011:10:0", "Command")
glob_rich_hwnd = FindWindowEx(win2, 0&, "RichEdit20W", "")
SendMessage glob_rich_hwnd, &HC, 0, 0
Of course, proper method would be to use the EnumWindows function, I just needed quick/dirty/working solution ...