Clear the window debugger [Resolved by NETMAESTRO]
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Here, Grasshopper, lemme teach you how to fish:
Code: Select all
;=====================================================
; Library: ClearDebugWindow
; Author: Lloyd Gallant (netmaestro)
; Date: August 7, 2007
; ====================================================
Procedure FindListBox(hwnd, *lbhwnd.LONG)
cn$=Space(255)
GetClassName_(hwnd, @cn$, 254)
If UCase(cn$) = "LISTBOX"
*lbhwnd\l = hwnd
ProcedureReturn 0
Else
ProcedureReturn 1
EndIf
EndProcedure
Procedure FindDebugWindow(hwnd, *debugoutput.LONG)
wt$ = Space(255)
GetWindowText_(hwnd, @wt$, 254)
If FindString(wt$, "Debug Output", 1) Or FindString(wt$, "Messages du débogueur", 1) Or FindString(wt$, "Debugger-Ausgabe", 1) Or FindString(wt$, "Salida Depurador", 1)
*debugoutput\l = hwnd
ProcedureReturn 0
Else
ProcedureReturn 1
EndIf
EndProcedure
ProcedureDLL ClearDebugWindow()
Protected debugoutput=0, listboxhwnd=0
time = ElapsedMilliseconds()
Repeat
EnumWindows_(@FindDebugWindow(), @debugoutput)
Delay(1)
Until debugoutput Or ElapsedMilliseconds()-time > 200
If debugoutput
EnumChildWindows_(debugoutput, @FindListBox(),@listboxhwnd)
EndIf
If listboxhwnd
SendMessage_(listboxhwnd, #LB_RESETCONTENT,0,0)
ProcedureReturn 1
Else
ProcedureReturn 0
EndIf
EndProcedure
BERESHEIT
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
- electrochrisso
- Addict
- Posts: 989
- Joined: Mon May 14, 2007 2:13 am
- Location: Darling River
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
It is not serious, i like it, if is a frog, or if is a princeIf you kiss the netmaestro, does he turn into a Prince.

It's my hero

I love also FRED, NETMAESTRO, SPARKIE, GNOZAL, TROND, SROD, FREAK, ABBKLAUS, FLYPE, COMTOIS, .....etc (Excuse me for those i forget


I'm a looser of the code

For me, they are all magicians, angels, and it's been 3 years that I admire all, since I started purebasic.
So I dream have friends like them.

A thousand of thousand thanks at all for the dream that I live.


Not a destination