fb:porticula NoPaste
fb-derrisch rewritten by /me .bas
Uploader: | csde_rats |
Datum/Zeit: | 04.08.2007 15:14:58 |
#include once "windows.bi"
#include "fb-derrisch.bi"
#define IDD_DLG1 1000
#define IDC_BTN1 1001
#define IDC_EDT1 1002
declare function DlgProc(byval hWnd as HWND, byval uMsg as UINT, byval wParam as WPARAM, byval lParam as LPARAM) as integer
Declare Sub Zaehler (ByVal nix As Integer)
'''
''' Program start
'''
Dim Shared count As Integer
Dim Shared hHandle As HWND
''
'' Create the Dialog
''
ThreadCreate(Procptr(Zaehler), 0)
DialogBoxParam(GetModuleHandle(NULL), Cast(zstring ptr,IDD_DLG1), NULL, @DlgProc, NULL)
''
'' Program has ended
''
ExitProcess(0)
end
'''
''' Program end
'''
function DlgProc(byval hWin as HWND,byval uMsg as UINT,byval wParam as WPARAM,byval lParam as LPARAM) as integer
dim as long id, event, x, y
dim hBtn as HWND
dim rect as RECT
select case uMsg
case WM_INITDIALOG
hHandle = hWin
'
case WM_CLOSE
EndDialog(hWin, 0)
'
case WM_COMMAND
id=loword(wParam)
event=hiword(wParam)
select case id
case IDC_BTN1
EndDialog(hWin, 0)
'
end select
case WM_SIZE
GetClientRect(hWin,@rect)
hBtn=GetDlgItem(hWin,IDC_BTN1)
x=rect.right-100
y=rect.bottom-35
MoveWindow(hBtn,x,y,97,31,TRUE)
'
Case WBM_MALEN
SetDlgItemText(hWin, IDC_EDT1, Str(count))
Return TRUE
case else
return FALSE
'
end select
return TRUE
end function
Sub Zaehler (ByVal nix As Integer)
do
count+=1
Sleep 100
Print Str(count) + "(" + Str(hHandle) + ")"
SendMessage(hHandle,WBM_MALEN,NULL, NULL)
loop
End Sub