Re: NC Clone
Posted: Wed Jan 22, 2020 8:08 pm
Yes, but now i wait for one SUV, not only a wheell.
Good job Jimmy
Pcmodula
Good job Jimmy
Pcmodula
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://mail.hmgforum.com/
Code: Select all
This.OnDropFiles := {| aFiles | ResolveDrop( "oWindow1", HMG_GetFormControls( "oWindow1" ), aFiles )}
Code: Select all
/*
Harbour MiniGUI 1.4 Extended (Build 47)
added by Grigory Filatov
*/
HB_FUNC( DRAGACCEPTFILES )
{
DragAcceptFiles( ( HWND ) HB_PARNL( 1 ), hb_parl( 2 ) );
}
HB_FUNC( DRAGQUERYFILES )
{
HDROP hDrop = ( HDROP ) HB_PARNL( 1 );
int iFiles = DragQueryFile( hDrop, ( UINT ) -1, 0, 0 );
int i;
char bBuffer[ 250 ];
hb_reta( iFiles );
for( i = 0; i < iFiles; i++ )
{
DragQueryFile( hDrop, i, ( char * ) bBuffer, 249 );
HB_STORC( ( char * ) bBuffer, -1, i + 1 );
}
}
HB_FUNC( DRAGFINISH )
{
DragFinish( ( HDROP ) HB_PARNL( 1 ) );
}
Code: Select all
#include "ot4xb.ch"
#include "winuser_constants.ch"
//----------------------------------------------------------------
proc main // Console
local hWnd := SetAppWindow():GetHWnd()
ot4xb_subclasswindow(hWnd,MyHandler(),NIL,"Drop_wndproc")
delegated_eval( {||@shell32:DragAcceptFiles(hWnd,1)} )
while inkey(0) != 27
end
return
//----------------------------------------------------------------
CLASS MyHandler
EXPORTED:
INLINE CLASS METHOD Drop_wndproc(hWnd,nMsg,wp,lp)
local p,cb,aFiles,n,nn
if nMsg == WM_DROPFILES
nn := @shell32:DragQueryFileA(wp,-1,0,0)
if nn > 0
aFiles := Array(nn)
p := _xgrab(260)
for n := 1 to nn
cb := @shell32:DragQueryFileA(wp,n-1,p,260)
aFiles[n] := PeekStr(p,,cb)
next
_xfree(p)
? aFiles
// or PostAppEvent(custom_event, aFiles,, oXbp)
end
return NIL
end
return NIL
ENDCLASS
Code: Select all
ON MOUSEMOVE DragMoveL() ;
ON MOUSEDRAG DragHereL(ThisWindow.Name ,WinLeft.Grid_1.Value) ;
ON MOUSEMOVE DragMoveR() ;
ON MOUSEDRAG DragHereR(ThisWindow.Name,WinRight.Grid_1.Value) ;
i have begin with my Xbase++ Version 2008 and i have made 215 Version since Start
Code: Select all
#pragma BEGINDUMP
#include <windows.h>
#include "hbapi.h"
HB_FUNC ( SHELLFILEOPERATION )
{
SHFILEOPSTRUCT sh;
sh.hwnd = (HWND) hb_parnl(1);
sh.pFrom = hb_parc(2);
sh.pTo = hb_parc(3);
sh.wFunc = hb_parnl(4);
sh.fFlags = hb_parnl(5);
sh.hNameMappings = 0;
sh.lpszProgressTitle = NULL;
hb_retnl( SHFileOperation (&sh) );
}
#pragma ENDDUMP
Code: Select all
DEFINE IMAGELIST imagelst_1 ;
Code: Select all
c_imagelist.c
h_imagelist.prg
Code: Select all
#xtranslate aDir1 => Stack1\[nDimLeft, 1]
#xtranslate cGrid_1 => Stack1\[nDimLeft, 2]
#xtranslate aDir2 => Stack2\[nDimRight, 1]
#xtranslate cGrid_2 => Stack2\[nDimRight, 2]
STATIC nDimLeft := 0
STATIC nDimRight := 0
Code: Select all
PRIVATE Stack1 := {}
PRIVATE Stack2 := {}
...
SP_INIT()
FUNCTION SP_INIT() // init STACK
AADD( Stack1, ARRAY( 2 ) )
nDimLeft := LEN(Stack1)
AADD( Stack2, ARRAY( 2 ) )
nDimRight := LEN(Stack2)
RETURN ( nDimLeft+nDimRight ) // return nThread
Code: Select all
AADD( Stack1, ARRAY( 2 ) )
nDimLeft := LEN(Stack1)
Code: Select all
DEFINE TAB Tab_Left ;
OF WinLeft ;
ON CHANGE Tab_Change_Left()
PROCEDURE Tab_Change_Left()
nDimLeft := WinLeft.Tab_Left.Value
RETURN
Code: Select all
WinLeft.Tab_Left.AddPage( nPageNumber, cCaption, cImageName )
cName := "Grid_" + LTRIM( STR( nPageNumber ) )
DEFINE GRID &cName
PARENT WinLeft
DefLeftGrid()
END GRID
WinLeft.Tab_Left.AddControl( cName, nPagenumber, 30, 0 )
Code: Select all
ONQUERYDATA OnDataRequest( aDir_Left, ThisWindow.Name, This.Name )
Code: Select all
ListView_RedrawItems( nHandle, 1, iMax )
Code: Select all
CASE xKey == VK_T .AND. HMG_VirtualKeyIsPressed( VK_CONTROL )
NewTab()
Code: Select all
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters
DirectoryCacheLifetime
FileNotFoundCacheLifetime
FileInfoCacheLifetime
Code: Select all
IF nDim = 1
nRow := 55
nCol := 0
nHeight := 800 - 070
ELSE
nRow := 0
nCol := 0
nHeight := 800 - 050
ENDIF
Code: Select all
iMax := MAX(iMax , ListViewGetCountPerPage (nHandle) )
iMax := MAX(iMax , 100)
ListView_RedrawItems( nHandle, 1, iMax )
DO EVENTS
Code: Select all
IF nGridFocus = 1
nTab := Getproperty( "WinLeft", "Tab_Left", "Value" )
nTab ++
IF nTab > nDimLeft
nDimLeft := 1
ELSE
nDimLeft := nTab
ENDIF
WinLeft.Tab_Left.Value := nDimLeft
WinLeft.Tab_Left.SetFocus
Domethod( "WinLeft", cGrid_Left, "SetFocus" )
Domethod( "WinLeft", cGrid_Left, "Refresh" )
Code: Select all
Win1.Tab1(1).Grid1.Value := 10