Page 7 of 10

HMG 3.1.3 (Test)

Posted: Tue May 21, 2013 9:01 am
by Pablo César
There is a litle mistake in C:\hmg.3.1.3\SOURCE\h_error.prg (in last line), version was 3.1.2.

In order to keep right version, should be corrected and use buildlib.bat again.

Re: HMG 3.1.3 (Test)

Posted: Tue May 21, 2013 9:01 am
by esgici
Muchas gracias doc :)

Viva HMG :D

Re: HMG 3.1.3 (Test)

Posted: Tue May 21, 2013 9:02 am
by esgici
Pablo César wrote:There is a litle mistake in C:\hmg.3.1.3\SOURCE\h_error.prg (in last line), version was 3.1.2.

In order to keep right version, should be corrected and use buildlib.bat again.
+1

Pendings for NEXT release ( REMINDER )

Posted: Tue May 21, 2013 10:47 pm
by Pablo César
Sorry to repeat part of this message again, but it is for a good reason: to remind Mr. Rathinagiri for next release.

In this new release (3.1.3), have not been icluded these pendings... :cry: Probably these demands should be registered in another topic to remind for next releases... or being described here below, it will take better understanding (ones again):

1. ImageBuild.bat in samples, this is needing to change Build.bat file at each sample folders in order to ceases to be essential for the first parameter when run it not at Command Prompt. In other words, means with this suggested changing at Build.bat, then the first parameter will be not essential:
[tr][td]Actual Build.bat at samples folders[/td][td]Recommended New Build.bat[/td][/tr][tr][td]call ..\..\..\build.bat %*[/td][td]@Echo off[/td][/tr][tr][td][/td][td]if "%1"=="" Goto WithOutPar[/td][/tr][tr][td][/td][td]Set MainFile=%1[/td][/tr][tr][td][/td][td]Goto Continue[/td][/tr][tr][td][/td] [td]:WithOutPar[/td][/tr][tr][td][/td][td]for /R %~dp0%~1 %%f in (*.hbp) do (Set MainFile="%%~nf")[/td][/tr][tr][td][/td][td]Goto Continue[/td][/tr][tr][td][/td] [td]:Continue[/td][/tr][tr][td][/td][td]call ..\..\..\build.bat %MainFile%[/td][/tr][/table]

2. ImageBuild.bat at HMG main folder, this proposed is an important question each time we need to use Debug option. Normally we found problems we use debug option upto the problem be solved, then no more is required. But each time we need to used it thru IDE compiling, we need to pass before in "Reset Project Incremental Data". This menu IDE option, attends for normal rebuilding and for rebuild with "debug" option.
[tr][td]Actual Build.bat at main HMG folder[/td] [td]Recommended New Build.bat[/td][/tr]
[tr][td]rem ***************************************[/td]
[td]rem ***************************************[/td][/tr]
[tr][td]rem DELETE FILES FROM PREVIOUS BUILD[/td]
[td]rem DELETE FILES FROM PREVIOUS BUILD[/td][/tr]
[tr][td]rem ***************************************[/td]
[td]rem ***************************************[/td][/tr]
[tr][td][/td]
[td][/td][/tr]
[tr][td]if exist build.log del build.log[/td]
[td]if exist build.log del build.log[/td][/tr]
[tr][td]if exist error.log del error.log[/td]
[td]if exist error.log del error.log[/td][/tr]
[tr][td][/td]
[td]if exist init.cld del init.cld[/td][/tr]
[tr][td][/td]
[td][/td][/tr]
[tr][td]rem ***************************************[/td]
[td]rem ***************************************[/td][/tr]
[tr][td]rem SET HMGPATH[/td]
[td]rem SET HMGPATH[/td][/tr][/table]

3. ImageComboSearchBox, this is a missing combobox (box last) line, see picture below:
Image

4. AutoAdjust sample with complementary functions. As picture shows:
Image

5. ImageQHTM library sample and QHTM library which is a Gipsysoft free version product that it has all of the features which you are allowed to use for HTML and images files are part of the resources so no external files are needed. Here in attached file in Library package to be added at C:\hmg...\hfcl\Source: click fo downloading library files

6. ImageRight path at HMG installation package at this last version (3.1.3) is suggesting a wrong version which can make confuse for some user, as shows picture below:
Image

7. Imageforgotten to include the Dynamic Menu demo at samples folder.

8. Imageforgotten to implement for 5th parameter in function PutFile (old claim from Mr. Esgici) and new suggestion for extra 6th parameter. The 5th parameter in InputFile will be usefull for default file name and would added a 6th parameter (passing by referance) just know which File of Type have been choosen from user, as follows:
InputFileDialog.jpg
InputFileDialog.jpg (40.57 KiB) Viewed 10595 times
Little modification at h_dialogs.prg (function PutFile) and c_dialogs.c (function C_PutFile). And it will be needing to be in UNICODE mode with HMG_ C functions.

9. ImageIMAGE Control improvement patch made by Dr. Soto. And also needs to correct version to 3.1.3 at C:\hmg.3.1.3\SOURCE\h_error.prg (at last line of file) in this patch.

10. ImageUNICODE_IDE & IDE foldersThere are two IDE version: one in ANSI mode and UNICODE mode. Need to switch IDEs, providing IDE_UNICODE as default IDE.

11. ImageSET MULTIPLE <ON/OFF> WARNING forgotten to add MEMVAR _HMG_lMultiple at begining of at_controlmisc.ch file.

12. ImageSET LANGUAGE TO PORTUGUESE error, this needs correction at C:\hmg.3.1.3\INCLUDE\i_lang.ch file.

Note: All itens sinalized with this Image have been corrected in new releases after version HMG 3.1.3.

Hoping to be helping to garantee complete actualization for the next release.

B.Rgds.

Re: HMG 3.1.3 (Test)

Posted: Wed May 22, 2013 3:35 am
by Rathinagiri
Thanks a lot Pablo.

I think it is time for a new release.

Re: HMG 3.1.3 (Test)

Posted: Wed May 22, 2013 8:20 am
by bpd2000
rathinagiri wrote:Thanks a lot Pablo.

I think it is time for a new release.
Update is due

Re: Pendings for NEXT release ( REMINDER )

Posted: Wed May 22, 2013 11:26 pm
by srvet_claudio
Pablo César wrote: 8. forgotten to implement for 5th parameter in function PutFile (old claim from Mr. Esgici) and new suggestion for extra 6th parameter. The 5th parameter in InputFile will be usefull for default file name and would added a 6th parameter (passing by referance) just know which File of Type have been choosen from user...
Done !!!

Code: Select all

  PutFile ( acFilter , cTitle , cIniFolder , lNoChangeDir , cDefaultFileName, @cExtFile ) --> cSavedFileName

HMG 3.1.3 (Test)

Posted: Thu May 23, 2013 12:17 am
by Pablo César
Great !

I wish to see source code, SOAP... :roll:

Thank you Dr. Soto ! You are so kind !

Re: HMG 3.1.3 (Test)

Posted: Thu May 23, 2013 1:41 am
by srvet_claudio
Pablo César wrote:Great !

I wish to see source code, SOAP... :roll:

Thank you Dr. Soto ! You are so kind !
You want it, here it is: :)

Remember:
cExtFile := NIL ---> Not set selected file extension (traditional behavior)
cExtFile := "" ---> Sets the file extension selected by the user

Code: Select all

*--------------------------------------------------------------------------------------------*
Function Putfile ( aFilter, cTitle, cIniFolder, lNoChangeDir, cDefaultFileName, cExtFile )
*--------------------------------------------------------------------------------------------*
LOCAL cFilter:='' , n, cFileName
 
   IF aFilter == Nil
      aFilter:={}
   EndIf

   IF cTitle == NIL
      cTitle := ""
   ENDIF   

   IF cIniFolder == NIL
      cIniFolder := ""
   ENDIF

   IF cDefaultFileName == NIL
      cDefaultFileName := ""
   ENDIF
   
   FOR n := 1 TO HMG_LEN ( aFilter )
      cFilter = cFilter + aFilter [n] [1] + CHR(0) + aFilter [n] [2] + CHR(0)
   NEXT
   cFilter :=  cFilter + CHR(0)

   cFileName := C_PutFile ( cFilter, cTitle, cIniFolder, lNoChangeDir, cDefaultFileName, @cExtFile)

Return cFileName

Code: Select all

#define HMG_storc(c,i)         hb_storc   (HMG_WCHAR_TO_CHAR(c),i)

Code: Select all

HB_FUNC ( C_PUTFILE )
{
 
 OPENFILENAME ofn;
 TCHAR buffer[1024];
 
 int flags = OFN_FILEMUSTEXIST | OFN_EXPLORER ;
 
 if ( hb_parl(4) )
 {
  flags = flags | OFN_NOCHANGEDIR ;
 }
 
//******************************************************************************************************//   
// ofn.lpstrFilter = A buffer containing pairs of null-terminated filter strings. 
//                   The last string in the buffer must be terminated by two NULL characters.
// The following code converts a ANSI (CHAR) filter string into a UNICODE (UNSIGNED INT) filter string
   
   #define _MAX_FILTER 32*1024
   INT i, j=0, cont=0;
   CHAR *p = (CHAR*) hb_parc(1);
   TCHAR Filter [_MAX_FILTER];
   memset((void*) &Filter, 0, sizeof(Filter));
   
   for (i=0; *p != '\0'; i++)
   {  cont = cont + strlen(p) + 1;
      if (cont < _MAX_FILTER)
      {   lstrcpy (&Filter[j],HMG_CHAR_TO_WCHAR(p));
      /*
         TCHAR Text [100];
         wsprintf(Text,_TEXT("%d  %d  %s"),i,cont,&Filter[j]);
         MessageBox (NULL, Text, _TEXT("DEBUG"), MB_OK);   
      */
          j = j + lstrlen (HMG_CHAR_TO_WCHAR(p)) + 1;
          p = p + strlen(p) + 1;
      }
      else
         break;
   }
//**********************************************************************//   

 lstrcpy (buffer, HMG_parc(5));
 
 memset( (void*) &ofn, 0, sizeof( OPENFILENAME ) );
 ofn.lStructSize = sizeof(OPENFILENAME);
 ofn.hwndOwner = GetActiveWindow() ;
 ofn.lpstrFilter = (LPCTSTR) &Filter;
 ofn.lpstrFile = (LPTSTR) &buffer;
 ofn.nMaxFile = 1024;
 ofn.lpstrInitialDir = (LPCTSTR) HMG_parc(3);
 ofn.lpstrTitle = (LPCTSTR) HMG_parc(2);
 ofn.Flags = flags;
 ofn.lpstrDefExt = (LPCTSTR) HMG_parc(6);
  
 if (GetSaveFileName( &ofn ))
 {   if (HB_ISBYREF(6))
     {  if (ofn.nFileExtension > ofn.nFileOffset)  
            HMG_storc (&ofn.lpstrFile [ofn.nFileExtension], 6);
        else
           HMG_storc (_TEXT(""), 6);
     }
     HMG_retc(ofn.lpstrFile);
 }
 else
     hb_retc( "" );
}

HMG 3.1.3 (Test)

Posted: Thu May 23, 2013 2:30 am
by Pablo César
Thank you dear Claudio !

It is working perfectly ! Better than suggested, because cExtFile return true of extension name, even selecting extension or typing extension name...

Very good, excellant ! Thank you again !