HMG 3.1.3

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.1.3 (Test)

Post 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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.1.3 (Test)

Post by esgici »

Muchas gracias doc :)

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.1.3 (Test)

Post 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
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Pendings for NEXT release ( REMINDER )

Post 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 10569 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.
Last edited by Pablo César on Tue May 28, 2013 12:20 pm, edited 6 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.1.3 (Test)

Post by Rathinagiri »

Thanks a lot Pablo.

I think it is time for a new release.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG 3.1.3 (Test)

Post by bpd2000 »

rathinagiri wrote:Thanks a lot Pablo.

I think it is time for a new release.
Update is due
BPD
Convert Dream into Reality through HMG
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Pendings for NEXT release ( REMINDER )

Post 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
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.1.3 (Test)

Post by Pablo César »

Great !

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

Thank you Dr. Soto ! You are so kind !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.1.3 (Test)

Post 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( "" );
}
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.1.3 (Test)

Post 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 !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply