in many Sample i found
Code: Select all
procedure AppSys // XBase++ requirement
return
i ask while i have exact that Problem with CMD Box under FinWin with my Sample.
when start Short-Cut from Desktop
when start from Total Commander or Explorer
here is the Code
Code: Select all
#define Use_Gui
#IFDEF __HARBOUR__
#IFDEF Use_Gui
#include "FIVEWIN.CH"
#ELSE
REQUEST HB_GT_WIN_DEFAULT // Console
#define CRLF CHR(13)+CHR(10)
#ENDIF
#define WM_SETTEXT 0x000C
#ELSE
#define CRLF CHR(13)+CHR(10)
#ENDIF
#include "DIRECTRY.CH"
#include "COMMON.CH"
#include "INKEY.CH"
#include "FILEIO.CH"
#define CVERSION '2.05.5'
STATIC nLineCount := 0
STATIC nMasterCount := 0
STATIC lLineContinue := .f.
STATIC lLastContinue := .f.
STATIC nStripComment := 0
STATIC lCommentMode := .f.
STATIC oOutHandle
STATIC cFuncDiv
STATIC lDumpBuffer := .f.
STATIC lMoreToGo := .f.
STATIC aCommand := {}
STATIC aCmdLogic := {}
STATIC aFunction := {}
STATIC cComCase
STATIC cFunCase
STATIC cBoolCase
STATIC nAlignMethod
STATIC nUnCase
STATIC nUnFor
STATIC nUnSequence
STATIC lVerbose
STATIC lMode5
STATIC nComntTab
STATIC lConvertSlash
STATIC lConvertStar
STATIC lConvertArray
STATIC lRemDupMTLine
STATIC lGotClass := .f.
STATIC lDeflate1
STATIC lDeflate2
STATIC lDeflate3
STATIC lDeflate4
STATIC lDeflate5
STATIC nTabIf
STATIC nIndIf
STATIC nTabFor
STATIC nIndFor
STATIC nTabCase
STATIC nIndCase
STATIC nTabFunc
STATIC nIndFunc
STATIC nTabBegin
STATIC nIndBegin
STATIC nTabWhile
STATIC nIndWhile
STATIC nTabClass
STATIC lRestScrn
STATIC nMidScreen := 15
MEMVAR oStatusBox, oInBox, oOutBox, oFont
MEMVAR cStatusBox, cInBox, cOutBox, oForm, oProgress
PROCEDURE AppSys
RETURN
PROCEDURE main( filespec )
LOCAL nTop := 0
LOCAL nLeft := 0
LOCAL nRight := 1024 // ScreenWidth()
LOCAL nBottom := 768 // ScreenHeight()
PUBLIC oStatusBox := ""
PUBLIC oInBox := ""
PUBLIC oOutBox := ""
PUBLIC oFont
PUBLIC oProgress
PUBLIC cStatusBox := ""
PUBLIC cInBox := ""
PUBLIC cOutBox := ""
PUBLIC oForm
ALTD()
DEFAULT filespec TO '*.PRG'
#IFDEF Use_Gui
DEFINE FONT oFont NAME "ARIAL" SIZE 0, - 12
DEFINE WINDOW oForm ;
TITLE " Click FiveWin Version" ;
FROM nTop, nLeft TO nBottom, nRight PIXEL ;
NOMAXIMIZE ;
MENU BuildMenu()
@ 0, 3 PROGRESS oProgress OF oForm SIZE 970, 20
@ 0, - 1 GET oStatusBox VAR cStatusBox ;
OF oForm ;
MEMO ;
SIZE 970, 150 ;
FONT oFont ;
PIXEL
oStatusBox:Move( 30, 20 )
@ 0, - 1 GET oInBox VAR cInBox ;
OF oForm ;
MEMO ;
SIZE 970, 250 ;
FONT oFont ;
PIXEL
oInBox:Move( 190, 20 )
@ 0, - 1 GET oOutBox VAR cOutBox ;
MEMO ;
FONT oFont ;
SIZE 970, 250 ;
OF oForm ;
PIXEL
oOutBox:Move( 450, 20 )
ACTIVATE WINDOW oForm CENTER
#ELSE
StartClick( filespec )
#ENDIF
RETURN
PROCEDURE StartClick( filespec )
RETURN
STATIC FUNCTION BuildMenu()
LOCAL oMenu
LOCAL cPath := GetCurDir()
MENU oMenu
MENUITEM "&File"
MENU
MENUITEM "&Directory" MESSAGE "select Directory" ;
ACTION lay( cPath, 1 )
MENUITEM "&CLICK" MESSAGE "start Click" ;
ACTION StartClick()
MENUITEM "&Exit" MESSAGE "Exit Drag & Drop" ;
ACTION oForm:End()
ENDMENU
// oMenu:addmdi() // This is a standard windows menu
MENUITEM "&Help" MESSAGE "Help on This Prgram"
MENU
MENUITEM "&Contents" MESSAGE "Help on This Prgram"
MENUITEM "&Search for Help on..." MESSAGE "Help on This Prgram"
SEPARATOR
MENUITEM "&About" MESSAGE "Info About this Program" ;
ACTION MsgAbout( "A&O", "Click for FiveWin" )
ENDMENU
ENDMENU
RETURN oMenu
STATIC FUNCTION Lay( cTemp, nFiles )
LOCAL oDlg, oGet
LOCAL cINIfile := Space( 80 )
IIF( !empty( cTemp ), cINIfile := SUBSTR(cTemp+Space( 80 ),1,80), )
DEFINE DIALOG oDlg TITLE "CLICK Directory" ;
SIZE 600, 150
@ 1, 1.5 SAY "Directory" OF oDlg SIZE 100, 8
@ 2, 1.0 GET oGet VAR cINIfile OF oDlg
@ 3, 1.0 BUTTON "open" ;
ACTION( cTemp := CGETFOLDER("Hello",cINIfile), ;
If( !Empty( cTemp ), ( cINIfile := cTemp, oGet:Refresh() ), ) )
@ 3, 21.5 BUTTON "Start CLICK" ACTION( oDlg:hide(), StartClick(), oDlg:End() )
@ 3, 43.0 BUTTON "Exit" ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all
-I..\..\include
-L..\..\lib
-lfiveh
-lfivehc
C:\harbour\contrib\xhb\xhb.hbc
C:\harbour\contrib\hbwin\hbwin.hbc
C:\harbour\contrib\hbmzip\hbmzip.hbc
C:\harbour\contrib\hbziparc\hbziparc.hbc
WIECMD.PRG
Code: Select all
hbmk2 WIECMD.HBP -comp=bcc
Code: Select all
set bcdir=c:\bcc7
set FWDIR=c:\fwh
set fwh=c:\fwh
set GT=gtgui
set HBDIR=c:\harbour
set hdir=c:\harbour
set hdirl=c:\harbour\lib
SET PATH=c:\bcc7\bin;%PATH%
SET INCLUDE=c:\fwh\include;%INCLUDE%
have a nice XMas