Winblitz3d copy & paste

Blitz3D Forums/Blitz3D Userlibs/Winblitz3d copy & paste

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Have found win api calls to copy/cut/paste from any control bu my implimentation is causing a mav, anbody have any ideas as to why


;WB3DStyles.bb added -

Const WM_CUT = $300
Const WM_COPY = $301
Const WM_PASTE = $302
Const WM_CLEAR = $303
Const HWND_BROADCAST = $FFFFFFFF

;Copy the contents of a control into the Clipboard
Function WB3D_Copy( hWnd )
    API_SendMessage hWnd, WM_COPY, 0, 0
End Function

; Cut the contents of a control into the Clipboard
Function WB3D_Cut( hWnd )
    API_SendMessage hWnd, WM_CUT, 0, 0
End Function

; Paste the contents of the Clipboard into a control
Function WB3D_Paste( hWnd )
    API_SendMessage hWnd, WM_PASTE, 0, 0
End Function

; Delete the selected contents of a control
Function WB3D_Delete( hWnd )
    API_SendMessage hWnd, WM_CLEAR, 0, 0
End Function

;Blitz3D_GUI_DLL.decls added -

.lib "user32.dll"
API_FindWindow%(class%,title$):"FindWindowA"
API_SendMessage% (hwnd%, wMsg%, wParam%, lParam*) : "SendMessageA"

;My test code

Case WB3D_KEY_F1
	WB3D_Copy( HWND_BROADCAST )
				
Case WB3D_KEY_F2
	WB3D_Paste( HWND_BROADCAST )


;have tried using the window handle from winblitz3d as well as HWND_BROADCAST with the same results

found the function calls here :
http://www.devx.com/vb2themax/Tip/18632